From: Rachita Kothiyal Date: Sun, 21 Oct 2007 07:50:43 +0000 (-0400) Subject: More tests made generic: X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=c6f48c464b0a451331143c3019af891fbbb1bf2e;p=unionfs-regression-odf.git More tests made generic: 1)ioctl 2)link 3)mmap 4)rename-whiteout --- diff --git a/t-ioctl.sh b/t-ioctl.sh index 5ea5df4..a07198c 100755 --- a/t-ioctl.sh +++ b/t-ioctl.sh @@ -19,7 +19,7 @@ cat < /tmp/.expected.$$ @@ -64,6 +65,7 @@ result=$? rm -f /tmp/.expected.$$ /tmp/.saveout.$$ test $result != 0 && exit $result -( files ; afterfiles ) | check_hierarchy $TOP_LOWER_DIR +( files ; afterfiles ) | check_hierarchy +discard_odf complete_test diff --git a/t-link.sh b/t-link.sh index 6914e12..6b62143 100755 --- a/t-link.sh +++ b/t-link.sh @@ -46,9 +46,9 @@ f $LOWER_DIR0/c f $LOWER_DIR1/d5/d f $LOWER_DIR0/d1/f -f $LOWER_DIR0/d1/.wh.g +w $LOWER_DIR0 d1/g -f $LOWER_DIR0/d1/.wh.h +w $LOWER_DIR0 d1/h f $LOWER_DIR1/d1/i f $LOWER_DIR0/d6/x @@ -153,6 +153,7 @@ FILES } function rw { + init_odf $LOWER_DIR0 $LOWER_DIR1 ( directories ; beforefiles) | create_hierarchy mount_union "" $LOWER_DIR0 $LOWER_DIR1 @@ -168,10 +169,12 @@ function rw { link $MOUNTPOINT/d7/j $MOUNTPOINT/d8/k unmount_union - ( directories ; afterfiles_rw ) | check_hierarchy $TOP_LOWER_DIR + ( directories ; afterfiles_rw ) | check_hierarchy + discard_odf } function onelink { + init_odf $LOWER_DIR0 $LOWER_DIR1 ( directories ; beforefiles) | create_hierarchy mount_union "" $LOWER_DIR0 $LOWER_DIR1 @@ -179,10 +182,12 @@ function onelink { link $MOUNTPOINT/a $MOUNTPOINT/k unmount_union - ( directories ; afterfiles_onelink ) | check_hierarchy $TOP_LOWER_DIR + ( directories ; afterfiles_onelink ) | check_hierarchy + discard_odf } function ro { + init_odf $LOWER_DIR0 $LOWER_DIR1=ro ( directories ; beforefiles) | create_hierarchy mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro @@ -197,10 +202,12 @@ function ro { link $MOUNTPOINT/d7/j $MOUNTPOINT/d8/k unmount_union - ( directories ; afterfiles_ro ) | check_hierarchy $TOP_LOWER_DIR + ( directories ; afterfiles_ro ) | check_hierarchy + discard_odf } function BUG391 { + init_odf $LOWER_DIR0 $LOWER_DIR1=ro ( directories ; beforefiles_391) | create_hierarchy mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro @@ -211,7 +218,8 @@ function BUG391 { checktype $MOUNTPOINT/d/b 'f' unmount_union - ( directories ; afterfiles_391) | check_hierarchy $TOP_LOWER_DIR + ( directories ; afterfiles_391) | check_hierarchy + discard_odf } if [ -z "$FXNS" ] ; then diff --git a/t-mmap.sh b/t-mmap.sh index 4d4af50..9868bf0 100755 --- a/t-mmap.sh +++ b/t-mmap.sh @@ -44,6 +44,7 @@ FILES # read-only mmap test function test_ro { + init_odf ( files ) | create_hierarchy 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 @@ -52,11 +53,13 @@ function test_ro { ./progs/mapper -r $MOUNTPOINT/b > /dev/null || exit $? unmount_union echo -n "[ro] " - ( afterfiles_ro ) | check_hierarchy $TOP_LOWER_DIR + ( afterfiles_ro ) | check_hierarchy + discard_odf } # read-write mmap test function test_rw { + init_odf ( files ) | create_hierarchy 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 @@ -65,7 +68,8 @@ function test_rw { ./progs/mapper -w $MOUNTPOINT/b > /dev/null || exit $? echo -n "[rw] " unmount_union - ( afterfiles_rw ) | check_hierarchy $TOP_LOWER_DIR + ( afterfiles_rw ) | check_hierarchy + discard_odf } test_ro diff --git a/t-rename-whiteout.sh b/t-rename-whiteout.sh index 19cfc63..18b37c7 100755 --- a/t-rename-whiteout.sh +++ b/t-rename-whiteout.sh @@ -95,88 +95,101 @@ cat <