Log Message:
-----------
* t-mmap.sh: skip mmap read/write test for jffs2 (doesn't support
writable mappings).
* run-tests: export name of leftmost file system so some tests can
be run conditionally.
Tags:
----
LKML-branch
Modified Files:
--------------
unionfs/regression-2.0:
ChangeLog (r1.1.2.31 -> r1.1.2.32)
run-all-tests (r1.1.2.1 -> r1.1.2.2)
run-tests (r1.1.2.16 -> r1.1.2.17)
t-branchman.sh (r1.1.2.3 -> r1.1.2.4)
t-mmap.sh (r1.1.2.2 -> r1.1.2.3)
t-open.sh (r1.1.2.2 -> r1.1.2.3)
Revision Data
-------------
Index: run-all-tests
===================================================================
RCS file: /home/cvs/unionfs/unionfs/regression-2.0/Attic/run-all-tests,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -Lregression-2.0/run-all-tests -Lregression-2.0/run-all-tests -u -d -b -B
-p -r1.1.2.1 -r1.1.2.2
Index: ChangeLog
===================================================================
RCS file: /home/cvs/unionfs/unionfs/regression-2.0/Attic/ChangeLog,v
retrieving revision 1.1.2.31
retrieving revision 1.1.2.32
diff -Lregression-2.0/ChangeLog -Lregression-2.0/ChangeLog -u -d -b -B -p
-r1.1.2.31 -r1.1.2.32
--- regression-2.0/ChangeLog
+++ regression-2.0/ChangeLog
@@ -1,5 +1,11 @@
2007-06-05 Erez Zadok <[EMAIL PROTECTED]>
+ * t-mmap.sh: skip mmap read/write test for jffs2 (doesn't support
+ writable mappings).
+
+ * run-tests: export name of leftmost file system so some tests can
+ be run conditionally.
+
* run-tests: show lower file system being used.
* run-all-tests: simple wrapper script to run all regression tests
Index: run-tests
===================================================================
RCS file: /home/cvs/unionfs/unionfs/regression-2.0/Attic/run-tests,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -Lregression-2.0/run-tests -Lregression-2.0/run-tests -u -d -b -B -p
-r1.1.2.16 -r1.1.2.17
--- regression-2.0/run-tests
+++ regression-2.0/run-tests
@@ -206,6 +206,9 @@ do
echo "Sleeping for "$delay" seconds between each command."
setup_lower
+ # export the type of leftmost file system, as some tests need to know (jffs2)
+ export FS0
+
# run actual test and abort on error (test script tries to umount unionfs)
runcmd bash $t
@@ -224,3 +227,6 @@ do
# unload unionfs module (check if we leak anything)
runcmd rmmod unionfs
done
+
+# all's well
+exit 0
Index: t-open.sh
===================================================================
RCS file: /home/cvs/unionfs/unionfs/regression-2.0/Attic/t-open.sh,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lregression-2.0/t-open.sh -Lregression-2.0/t-open.sh -u -d -b -B -p
-r1.1.2.2 -r1.1.2.3
--- regression-2.0/t-open.sh
+++ regression-2.0/t-open.sh
@@ -64,11 +64,11 @@ function ro {
checktype $MOUNTPOINT/a 'd'
/bin/ls $MOUNTPOINT/a >/dev/null
- echo "$LOWER_DIR0/b" |diff /mnt/unionfs/b -
- echo "$LOWER_DIR1/c" |diff /mnt/unionfs/c -
- echo "$LOWER_DIR2/d" |diff /mnt/unionfs/d -
+ echo "$LOWER_DIR0/b" | diff /mnt/unionfs/b -
+ echo "$LOWER_DIR1/c" | diff /mnt/unionfs/c -
+ echo "$LOWER_DIR2/d" | diff /mnt/unionfs/d -
- echo "$LOWER_DIR0/e" |diff /mnt/unionfs/e -
+ echo "$LOWER_DIR0/e" | diff /mnt/unionfs/e -
unmount_union
@@ -81,9 +81,9 @@ function copyup {
mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
checktype $MOUNTPOINT/d1/d2/a 'f'
- echo "$LOWER_DIR1/d1/d2/a" |diff /mnt/unionfs/d1/d2/a -
+ echo "$LOWER_DIR1/d1/d2/a" | diff /mnt/unionfs/d1/d2/a -
echo "New data" > /mnt/unionfs/d1/d2/a
- echo "New data" |diff /mnt/unionfs/d1/d2/a -
+ echo "New data" | diff /mnt/unionfs/d1/d2/a -
unmount_union
Index: t-mmap.sh
===================================================================
RCS file: /home/cvs/unionfs/unionfs/regression-2.0/Attic/t-mmap.sh,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lregression-2.0/t-mmap.sh -Lregression-2.0/t-mmap.sh -u -d -b -B -p
-r1.1.2.2 -r1.1.2.3
--- regression-2.0/t-mmap.sh
+++ regression-2.0/t-mmap.sh
@@ -43,19 +43,29 @@ FILES
}
# read-only mmap test
-( files ) | create_hierarchy
-mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
-./progs/mapper -r $MOUNTPOINT/a > /dev/null
-unmount_union
-echo -n "[ro] "
-( afterfiles_ro ) | check_hierarchy $TOP_LOWER_DIR
+function test_ro {
+ ( files ) | create_hierarchy
+ mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
+ ./progs/mapper -r $MOUNTPOINT/a > /dev/null
+ unmount_union
+ echo -n "[ro] "
+ ( afterfiles_ro ) | check_hierarchy $TOP_LOWER_DIR
+}
# read-write mmap test
-( files ) | create_hierarchy
-mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
-./progs/mapper -w $MOUNTPOINT/b > /dev/null
-echo -n "[rw] "
-unmount_union
-( afterfiles_rw ) | check_hierarchy $TOP_LOWER_DIR
+function test_rw {
+ ( files ) | create_hierarchy
+ mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
+ ./progs/mapper -w $MOUNTPOINT/b > /dev/null
+ echo -n "[rw] "
+ unmount_union
+ ( afterfiles_rw ) | check_hierarchy $TOP_LOWER_DIR
+}
+
+test_ro
+# skip on jffs2 (doesn't support writeable mappings)
+if test "$FS0" != "jffs2" ; then
+ test_rw
+fi
complete_test
Index: t-branchman.sh
===================================================================
RCS file: /home/cvs/unionfs/unionfs/regression-2.0/Attic/t-branchman.sh,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -Lregression-2.0/t-branchman.sh -Lregression-2.0/t-branchman.sh -u -d -b
-B -p -r1.1.2.3 -r1.1.2.4
--- regression-2.0/t-branchman.sh
+++ regression-2.0/t-branchman.sh
@@ -37,9 +37,9 @@ function add_before {
mount_union "" $LOWER_DIR0
checktype $MOUNTPOINT/a 'f'
- echo "$LOWER_DIR0/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR0/a" | diff $MOUNTPOINT/a -
unionctl /mnt/unionfs --add --before $LOWER_DIR0 $LOWER_DIR1
- echo "$LOWER_DIR1/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR1/a" | diff $MOUNTPOINT/a -
unmount_union
( files ; afterfiles ) | check_hierarchy $TOP_LOWER_DIR
@@ -50,9 +50,9 @@ function add_after {
mount_union "" $LOWER_DIR0
checktype $MOUNTPOINT/a 'f'
- echo "$LOWER_DIR0/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR0/a" | diff $MOUNTPOINT/a -
unionctl /mnt/unionfs --add --after $LOWER_DIR0 $LOWER_DIR1
- echo "$LOWER_DIR0/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR0/a" | diff $MOUNTPOINT/a -
unmount_union
( files ; afterfiles ) | check_hierarchy $TOP_LOWER_DIR
@@ -63,10 +63,10 @@ function add_multiple {
mount_union "" $LOWER_DIR0
checktype $MOUNTPOINT/a 'f'
- echo "$LOWER_DIR0/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR0/a" | diff $MOUNTPOINT/a -
for ((i = 1; i <= 4; i++)) ; do
unionctl /mnt/unionfs --add $LOWER_DIR/b$i
- echo "$LOWER_DIR/b$i/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR/b$i/a" | diff $MOUNTPOINT/a -
done
unmount_union
@@ -78,9 +78,9 @@ function remove {
mount_union "" $LOWER_DIR1 $LOWER_DIR0
- echo "$LOWER_DIR1/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR1/a" | diff $MOUNTPOINT/a -
unionctl /mnt/unionfs --remove $LOWER_DIR1
- echo "$LOWER_DIR0/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR0/a" | diff $MOUNTPOINT/a -
unmount_union
@@ -92,18 +92,18 @@ function remove_multiple {
mount_union "" $LOWER_DIR0
- echo "$LOWER_DIR0/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR0/a" | diff $MOUNTPOINT/a -
for ((i = 1; i <= 4; i++)) ; do
unionctl /mnt/unionfs --add $LOWER_DIR/b$i
- echo "$LOWER_DIR/b$i/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR/b$i/a" | diff $MOUNTPOINT/a -
done
for ((i = 1; i < 4; i++)) ; do
unionctl /mnt/unionfs --remove $LOWER_DIR/b$i
- echo "$LOWER_DIR/b4/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR/b4/a" | diff $MOUNTPOINT/a -
done
unionctl /mnt/unionfs --remove $LOWER_DIR/b4
- echo "$LOWER_DIR0/a" |diff $MOUNTPOINT/a -
+ echo "$LOWER_DIR0/a" | diff $MOUNTPOINT/a -
unmount_union
( files ; afterfiles ) | check_hierarchy $TOP_LOWER_DIR
@@ -139,11 +139,11 @@ $MOUNTPOINT $LOWER_DIR2 (rw-)
$MOUNTPOINT $LOWER_DIR3 (rw-)
$MOUNTPOINT $LOWER_DIR/b4 (rw-)
TMP
- unionctl $MOUNTPOINT --query |diff - /tmp/$$
+ unionctl $MOUNTPOINT --query | diff - /tmp/$$
cat <<TMP >/tmp/$$
$MOUNTPOINT/b0-only $LOWER_DIR0 (rw-)
TMP
- unionctl $MOUNTPOINT/b0-only --query |diff - /tmp/$$
+ unionctl $MOUNTPOINT/b0-only --query | diff - /tmp/$$
cat <<TMP >/tmp/$$
$MOUNTPOINT/a $LOWER_DIR0 (rw-)
$MOUNTPOINT/a $LOWER_DIR1 (rw-)
@@ -151,7 +151,7 @@ $MOUNTPOINT/a $LOWER_DIR2 (rw-)
$MOUNTPOINT/a $LOWER_DIR3 (rw-)
$MOUNTPOINT/a $LOWER_DIR/b4 (rw-)
TMP
- unionctl $MOUNTPOINT/a --query |diff - /tmp/$$
+ unionctl $MOUNTPOINT/a --query | diff - /tmp/$$
rm -f /tmp/$$
unmount_union
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs