]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
overlay/081: fix test when running with index enabled
authorAmir Goldstein <amir73il@gmail.com>
Sun, 17 Dec 2023 15:00:17 +0000 (17:00 +0200)
committerZorro Lang <zlang@kernel.org>
Sat, 23 Dec 2023 18:56:50 +0000 (02:56 +0800)
Test overlay/081 fails with:
 CONFIG_OVERLAY_FS_INDEX=y
or
 echo Y > /sys/modules/overlay/params/index

The reason is that mount option uuid=off has the undesired side effect
of disabling index feature.

uuid=null is exactly the same as uuid=off for the purpose of this test
but without the undesired side effect.

The test was created to test the new modes uuid=null/auto/on, so the
fact that is is testing the mode uuid=off is just an oversight.

Covert the use of uuid=off to uuid=null to fix this problem.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/overlay/081

index 05156a3c89a3efc96c7accd18fbc596a14af4576..481e993130624a96ea4be0af1c61f48cafcb88d0 100755 (executable)
@@ -5,7 +5,7 @@
 # FSQA Test No. 081
 #
 # Test persistent (and optionally unique) overlayfs fsid
-# with mount options uuid=null/on introduced in kernel v6.6
+# with mount options uuid=null/auto/on introduced in kernel v6.6
 #
 . ./common/preamble
 _begin_fstest auto quick
@@ -55,7 +55,7 @@ _scratch_mount
 
 ovl_fsid=$(stat -f -c '%i' $test_dir)
 [[ "$ovl_fsid" == "$upper_fsid" ]] || \
-       echo "Overlayfs (uuid=auto) and upper fs fsid differ"
+       echo "Overlayfs (after uuid=null) and upper fs fsid differ"
 
 $UMOUNT_PROG $SCRATCH_MNT
 
@@ -74,16 +74,16 @@ _scratch_mount
 
 ovl_fsid=$(stat -f -c '%i' $test_dir)
 [[ "$ovl_fsid" == "$ovl_unique_fsid" ]] || \
-       echo "Overlayfs (uuid=auto) unique fsid is not persistent"
+       echo "Overlayfs (after uuid=on) unique fsid is not persistent"
 
 $UMOUNT_PROG $SCRATCH_MNT
 
 # Test ignore existing persistent fsid on explicit opt-out
-_scratch_mount -o uuid=off
+_scratch_mount -o uuid=null
 
 ovl_fsid=$(stat -f -c '%i' $test_dir)
 [[ "$ovl_fsid" == "$upper_fsid" ]] || \
-       echo "Overlayfs (uuid=off) and upper fs fsid differ"
+       echo "Overlayfs (uuid=null) and upper fs fsid differ"
 
 $UMOUNT_PROG $SCRATCH_MNT
 
@@ -92,7 +92,7 @@ _overlay_scratch_mount_dirs "$upperdir:$lowerdir" "-" "-" -o ro,uuid=on
 
 ovl_fsid=$(stat -f -c '%i' $test_dir)
 [[ "$ovl_fsid" == "$lower_fsid" ]] || \
-       echo "Overlayfs (uuid=null) and lower fs fsid differ"
+       echo "Overlayfs (no upper) and lower fs fsid differ"
 
 # Re-create fresh overlay layers, so following (uuid=auto) mounts
 # will behave as first time mount of a new overlayfs
@@ -110,7 +110,7 @@ _scratch_mount
 ovl_fsid=$(stat -f -c '%i' $test_dir)
 ovl_unique_fsid=$ovl_fsid
 [[ "$ovl_fsid" != "$upper_fsid" ]] || \
-       echo "Overlayfs (uuid=auto) and upper fs fsid are the same"
+       echo "Overlayfs (new) and upper fs fsid are the same"
 
 $UMOUNT_PROG $SCRATCH_MNT