Ensure that internal program tests immediately abort the entire test.
authorErez_Zadok <ezk@cs.sunysb.edu>
Sun, 22 Jul 2007 07:40:02 +0000 (03:40 -0400)
committerErez_Zadok <ezk@cs.sunysb.edu>
Sun, 22 Jul 2007 07:40:02 +0000 (03:40 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
t-flock.sh
t-fsync.sh
t-mmap.sh
t-open-unlink.sh
t-truncate-all.sh [changed mode: 0755->0644]

index 612514536d17eecc7e1940f2b77efbee8d7c919b..771a831121928b6e057878371fccc63de6cc2f63 100755 (executable)
@@ -39,13 +39,13 @@ FILES
 
 ( files ) | create_hierarchy
 mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
-./progs/flock-copyup $MOUNTPOINT/a
+./progs/flock-copyup $MOUNTPOINT/a || exit $?
 unmount_union
 ( afterfiles_ro ) | check_hierarchy $TOP_LOWER_DIR
 
 ( files ) | create_hierarchy
 mount_union "" $LOWER_DIR0 $LOWER_DIR1
-./progs/flock-copyup $MOUNTPOINT/a
+./progs/flock-copyup $MOUNTPOINT/a || exit $?
 unmount_union
 ( afterfiles_rw ) | check_hierarchy $TOP_LOWER_DIR
 
index c8a56158647f8355daedd7f1822019595845c534..c36745c882808284b318d1c5e1643db04d4de347 100755 (executable)
@@ -18,7 +18,7 @@ FILES
 function rw {
        ( files ) | create_hierarchy
        mount_union "" $LOWER_DIR0 $LOWER_DIR1
-       ./progs/fsync $MOUNTPOINT/a
+       ./progs/fsync $MOUNTPOINT/a || exit $?
        unmount_union
        ( files ) | check_hierarchy $TOP_LOWER_DIR
 }
index 86328833167f64b5d535e90fb0ffa0762d271473..93f8a2865119cd530d614703d4a0ab46de671488 100755 (executable)
--- a/t-mmap.sh
+++ b/t-mmap.sh
@@ -48,8 +48,8 @@ function test_ro {
     mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
     dd if=/dev/zero of=$LOWER_DIR0/a bs=4096 count=4 2>/dev/null
     dd if=/dev/zero of=$LOWER_DIR1/b bs=4096 count=4 2>/dev/null
-    ./progs/mapper -r $MOUNTPOINT/a > /dev/null
-    ./progs/mapper -r $MOUNTPOINT/b > /dev/null
+    ./progs/mapper -r $MOUNTPOINT/a > /dev/null || exit $?
+    ./progs/mapper -r $MOUNTPOINT/b > /dev/null || exit $?
     unmount_union
     echo -n "[ro] "
     ( afterfiles_ro ) | check_hierarchy $TOP_LOWER_DIR
@@ -61,8 +61,8 @@ function test_rw {
     dd if=/dev/zero of=$LOWER_DIR0/a bs=4096 count=4 2>/dev/null
     dd if=/dev/zero of=$LOWER_DIR1/b bs=4096 count=4 2>/dev/null
     mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
-    ./progs/mapper -w $MOUNTPOINT/a > /dev/null
-    ./progs/mapper -w $MOUNTPOINT/b > /dev/null
+    ./progs/mapper -w $MOUNTPOINT/a > /dev/null || exit $?
+    ./progs/mapper -w $MOUNTPOINT/b > /dev/null || exit $?
     echo -n "[rw] "
     unmount_union
     ( afterfiles_rw ) | check_hierarchy $TOP_LOWER_DIR
index b120cc5e56f1e529c37de2071b7f2964bf60bbe0..a5c77d9dcf9afcb7205fd975b71daa1782aacb88 100755 (executable)
@@ -41,7 +41,7 @@ FILES
 
 ( files ) | create_hierarchy
 mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro
-./progs/open-unlink $MOUNTPOINT/a
+./progs/open-unlink $MOUNTPOINT/a || exit $?
 unmount_union
 ( afterfiles_ro ) | check_hierarchy $TOP_LOWER_DIR
 
old mode 100755 (executable)
new mode 100644 (file)
index 411faa2..e4b0bcf
@@ -62,15 +62,15 @@ if havechattr $LOWER_DIR2 ; then
        chattr +i $LOWER_DIR2/d1/d2/d3/d4/f
 fi
 
-./progs/truncate -f $MOUNTPOINT/a 0
+./progs/truncate -f $MOUNTPOINT/a 0 || exit $?
 
-./progs/truncate -f $MOUNTPOINT/b 5000
+./progs/truncate -f $MOUNTPOINT/b 5000 || exit $?
 
-./progs/truncate -f $MOUNTPOINT/c 10000
+./progs/truncate -f $MOUNTPOINT/c 10000 || exit $?
 
-./progs/truncate -f $MOUNTPOINT/d 10000
+./progs/truncate -f $MOUNTPOINT/d 10000 || exit $?
 
-./progs/truncate -f $MOUNTPOINT/d1/d2/d3/d4/e 10000
+./progs/truncate -f $MOUNTPOINT/d1/d2/d3/d4/e 10000 || exit $?
 
 if [ ! -z "$CHATTR" ] ; then
        shouldfail ./truncate -f $MOUNTPOINT/d1/d2/d3/d4/f 10000
@@ -107,15 +107,15 @@ if havechattr $LOWER_DIR2 ; then
        chattr +i $LOWER_DIR2/d1/d2/d3/d4/f
 fi
 
-./progs/truncate -f $MOUNTPOINT/a 0
+./progs/truncate -f $MOUNTPOINT/a 0 || exit $?
 
-./progs/truncate -f $MOUNTPOINT/b 5000
+./progs/truncate -f $MOUNTPOINT/b 5000 || exit $?
 
-./progs/truncate -f $MOUNTPOINT/c 10000
+./progs/truncate -f $MOUNTPOINT/c 10000 || exit $?
 
-./progs/truncate -f $MOUNTPOINT/d 10000
+./progs/truncate -f $MOUNTPOINT/d 10000 || exit $?
 
-./progs/truncate -f $MOUNTPOINT/d1/d2/d3/d4/e 10000
+./progs/truncate -f $MOUNTPOINT/d1/d2/d3/d4/e 10000 || exit $?
 
 if [ ! -z "$CHATTR" ] ; then
        shouldfail ./progs/truncate -f $MOUNTPOINT/d1/d2/d3/d4/f 10000