diff options
author | Amir Goldstein <amir73il@gmail.com> | 2018-01-26 09:59:07 +0200 |
---|---|---|
committer | Eryu Guan <eguan@redhat.com> | 2018-01-29 15:43:51 +0800 |
commit | 8a2d6ed9fcd9ba255df9d7c5a5486dfc92b722ef (patch) | |
tree | 29275c4180d500d634bbf027de35b703352c1d17 | |
parent | 7aa1d4bcd4297335d6baa11c83a387f74923bce8 (diff) | |
download | xfstests-8a2d6ed9fcd9ba255df9d7c5a5486dfc92b722ef.tar.gz |
overlay: consider index dir with whiteouts clean
Several tests check that index dir is empty after upper entries have
been unlinked. With nfs_export=on, index will contain a whiteout
index entry in that case so, allow chardevs when checking for clean
index dir.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
-rwxr-xr-x | tests/overlay/033 | 8 | ||||
-rwxr-xr-x | tests/overlay/034 | 8 | ||||
-rwxr-xr-x | tests/overlay/048 | 4 |
3 files changed, 15 insertions, 5 deletions
diff --git a/tests/overlay/033 b/tests/overlay/033 index 30780c6012..3e67500141 100755 --- a/tests/overlay/033 +++ b/tests/overlay/033 @@ -69,7 +69,6 @@ report_nlink() # Create lower hardlinks create_hardlinks() { - lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER mkdir -p $lowerdir touch $lowerdir/0 ln $lowerdir/0 $lowerdir/1 @@ -123,9 +122,14 @@ test_hardlinks() rm $SCRATCH_MNT/2 # Verify that orphan index is cleaned when dropping nlink to zero - ls $OVL_BASE_SCRATCH_MNT/$OVL_WORK/index + # With nfs_export=on index will contain a whiteout index entry, so allow + # chardev entries in index dir. + find $workdir/index -mindepth 1 -type c -o -print } +lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER +workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK + # Remove all files from previous tests _scratch_mkfs diff --git a/tests/overlay/034 b/tests/overlay/034 index dc354c6035..d9f9798a8c 100755 --- a/tests/overlay/034 +++ b/tests/overlay/034 @@ -67,11 +67,13 @@ _require_scratch # Without overlay index feature hardlinks are broken on copy up _require_scratch_feature index +lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER +workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK + # Remove all files from previous tests _scratch_mkfs # Create lower hardlink -lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER mkdir -p $lowerdir touch $lowerdir/0 ln $lowerdir/0 $lowerdir/1 @@ -103,7 +105,9 @@ rm $SCRATCH_MNT/4 # Verify that orphan index is cleaned on mount _scratch_cycle_mount index=on -ls $OVL_BASE_SCRATCH_MNT/$OVL_WORK/index +# With nfs_export=on index will contain a whiteout index entry, so allow +# chardev entries in index dir. +find $workdir/index -mindepth 1 -type c -o -print echo "Silence is golden" status=0 diff --git a/tests/overlay/048 b/tests/overlay/048 index 4b2c58f438..3ce62704a3 100755 --- a/tests/overlay/048 +++ b/tests/overlay/048 @@ -111,7 +111,9 @@ test_hardlinks_offline() report_nlink "unlink last lower" # Verify that orphan index is cleaned when dropping nlink to zero - ls $workdir/index + # With nfs_export=on index will contain a whiteout index entry, so allow + # chardev entries in index dir. + find $workdir/index -mindepth 1 -type c -o -print } lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER |