aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2018-04-16 12:41:40 +0200
committerEryu Guan <guaneryu@gmail.com>2018-04-22 18:44:12 +0800
commitc0ae9162cac7131176580111f1f268dc7f266f7c (patch)
tree3d4315ce7f829d1e8f154eb2939e4771021c1b89
parenta738e04549ab70434dea6cb069c9a928596c4fdf (diff)
downloadxfstests-dev-c0ae9162cac7131176580111f1f268dc7f266f7c.tar.gz
overlay/040: clean up properly after setting immutable
Test program expects only immutable on lower layer (test failure), but does not expect the immutable file to be on the upper layer. The later case is actually what *should* happen, except overlayfs didn't properly implement this case yet (but is now in the works). Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-xtests/overlay/0404
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/overlay/040 b/tests/overlay/040
index 369fef3c3a..4fff7570c2 100755
--- a/tests/overlay/040
+++ b/tests/overlay/040
@@ -41,7 +41,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
- $CHATTR_PROG -i $lowerdir/foo
+ $CHATTR_PROG -i $lowerdir/foo > /dev/null 2>&1
+ $CHATTR_PROG -i $upperdir/foo > /dev/null 2>&1
rm -f $tmp.*
}
@@ -63,6 +64,7 @@ _scratch_mkfs
# prepare lower test file
lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
+upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER
mkdir -p $lowerdir
touch $lowerdir/foo