[PATCH] overlay/078: Fix cleanup with unpatched kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Darrick wrote: "...
I noticed a massive regression with this week's fstests,
probably because something didn't get cleaned up properly:
...
+rm: cannot remove '/opt/ovl-upper/testfile': Operation not permitted
...

and then the tests after it (e.g. generic/030) fail with:

+mount: /opt/ovl-mnt: mount(2) system call failed: Stale file handle.
..."

Link: https://lore.kernel.org/fstests/20210802230727.GC3601425@magnolia/
Reported-by: Darrick J. Wong <djwong@xxxxxxxxxx>
Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
---
 tests/overlay/078 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/overlay/078 b/tests/overlay/078
index 522e2e3c..d72faf2c 100755
--- a/tests/overlay/078
+++ b/tests/overlay/078
@@ -24,6 +24,7 @@ _cleanup()
 {
 	cd /
 	$CHATTR_PROG -ai $lowertestfile &> /dev/null
+	$CHATTR_PROG -ai $uppertestfile &> /dev/null
 	rm -f $tmp.*
 }
 
@@ -45,6 +46,7 @@ lowerdir=$OVL_BASE_SCRATCH_MNT/$OVL_LOWER
 upperdir=$OVL_BASE_SCRATCH_MNT/$OVL_UPPER
 workdir=$OVL_BASE_SCRATCH_MNT/$OVL_WORK
 lowertestfile=$lowerdir/testfile
+uppertestfile=$upperdir/testfile
 testfile=$SCRATCH_MNT/testfile
 
 _scratch_mkfs
@@ -66,6 +68,7 @@ do_check()
 	$CHATTR_PROG +$attr $lowertestfile
 
 	# Re-create upperdir/workdir
+	$CHATTR_PROG -ai $uppertestfile &> /dev/null
 	rm -rf $upperdir $workdir
 	mkdir -p $upperdir $workdir
 
-- 
2.25.1




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux