From 3a407806711a35c54f2ac49ec0b4acf3e1500a62 Mon Sep 17 00:00:00 2001 From: Erez_Zadok Date: Sun, 22 Jul 2007 03:40:02 -0400 Subject: [PATCH] Ensure that internal program tests immediately abort the entire test. Signed-off-by: Erez Zadok --- t-flock.sh | 4 ++-- t-fsync.sh | 2 +- t-mmap.sh | 8 ++++---- t-open-unlink.sh | 2 +- t-truncate-all.sh | 20 ++++++++++---------- 5 files changed, 18 insertions(+), 18 deletions(-) mode change 100755 => 100644 t-truncate-all.sh diff --git a/t-flock.sh b/t-flock.sh index 6125145..771a831 100755 --- a/t-flock.sh +++ b/t-flock.sh @@ -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 diff --git a/t-fsync.sh b/t-fsync.sh index c8a5615..c36745c 100755 --- a/t-fsync.sh +++ b/t-fsync.sh @@ -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 } diff --git a/t-mmap.sh b/t-mmap.sh index 8632883..93f8a28 100755 --- 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 diff --git a/t-open-unlink.sh b/t-open-unlink.sh index b120cc5..a5c77d9 100755 --- a/t-open-unlink.sh +++ b/t-open-unlink.sh @@ -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 diff --git a/t-truncate-all.sh b/t-truncate-all.sh old mode 100755 new mode 100644 index 411faa2..e4b0bcf --- a/t-truncate-all.sh +++ b/t-truncate-all.sh @@ -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 -- 2.43.0