linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Eryu Guan <guaneryu@gmail.com>
Cc: "Darrick J . Wong" <darrick.wong@oracle.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	linux-unionfs@vger.kernel.org, fstests@vger.kernel.org,
	"Darrick J . Wong" <djwong@kernel.org>
Subject: [PATCH] overlay/078: Fix cleanup with unpatched kernel
Date: Tue,  3 Aug 2021 10:07:58 +0300	[thread overview]
Message-ID: <20210803070758.2242590-1-amir73il@gmail.com> (raw)

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@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 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


                 reply	other threads:[~2021-08-03  7:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210803070758.2242590-1-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).