public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] overlay/084: Fix test to match new xwhiteouts dir on-disk format
@ 2024-02-03  8:12 Amir Goldstein
  2024-02-05 10:17 ` Alexander Larsson
  0 siblings, 1 reply; 2+ messages in thread
From: Amir Goldstein @ 2024-02-03  8:12 UTC (permalink / raw)
  To: Zorro Lang; +Cc: Miklos Szeredi, Alexander Larsson, linux-unionfs, fstests

The xwhiteouts feature, which is tested in this test, was added to
overlayfs in kernel v6.7.

The on-disk format of the xwhiteouts directory was changed in kernel
v6.8-rc2, specfically by commit 420332b94119 ("ovl: mark xwhiteouts
directory with overlay.opaque='x'") and backported to kernel v6.7.3,
so this test now fails on kernel >= v6.8-rc2 and => v6.7.3.

Adapt the test to the new on-disk format and add a hint to make sure
that the on-disk format change is backported to v6.7 based kernels.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 tests/overlay/084 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/overlay/084 b/tests/overlay/084
index 8465caeb..778396a1 100755
--- a/tests/overlay/084
+++ b/tests/overlay/084
@@ -25,6 +25,11 @@ _cleanup()
 
 # real QA test starts here
 _supported_fs overlay
+# This test does not run on kernels prior ro v6.7 and now it will also make sure
+# that the following on-disk format change was backported to v6.7 based kernels
+_fixed_by_kernel_commit 420332b94119 \
+	"ovl: mark xwhiteouts directory with overlay.opaque='x'"
+
 # We use non-default scratch underlying overlay dirs, we need to check
 # them explicity after test.
 _require_scratch_nocheck
@@ -115,7 +120,8 @@ do_test_xwhiteout()
 
 	mkdir -p $basedir/lower $basedir/upper $basedir/work
 	touch $basedir/lower/regular $basedir/lower/hidden  $basedir/upper/hidden
-	setfattr -n $prefix.overlay.whiteouts -v "y" $basedir/upper
+	# overlay.opaque="x" means directory has xwhiteout children
+	setfattr -n $prefix.overlay.opaque -v "x" $basedir/upper
 	setfattr -n $prefix.overlay.whiteout -v "y" $basedir/upper/hidden
 
 	# Test the hidden is invisible
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] overlay/084: Fix test to match new xwhiteouts dir on-disk format
  2024-02-03  8:12 [PATCH] overlay/084: Fix test to match new xwhiteouts dir on-disk format Amir Goldstein
@ 2024-02-05 10:17 ` Alexander Larsson
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Larsson @ 2024-02-05 10:17 UTC (permalink / raw)
  To: Amir Goldstein, Zorro Lang; +Cc: Miklos Szeredi, linux-unionfs, fstests

On Sat, 2024-02-03 at 10:12 +0200, Amir Goldstein wrote:
> The xwhiteouts feature, which is tested in this test, was added to
> overlayfs in kernel v6.7.
> 
> The on-disk format of the xwhiteouts directory was changed in kernel
> v6.8-rc2, specfically by commit 420332b94119 ("ovl: mark xwhiteouts
> directory with overlay.opaque='x'") and backported to kernel v6.7.3,
> so this test now fails on kernel >= v6.8-rc2 and => v6.7.3.
> 
> Adapt the test to the new on-disk format and add a hint to make sure
> that the on-disk format change is backported to v6.7 based kernels.
> 
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Acked-by: Alexander Larsson <alexl@redhat.com>

> ---
>  tests/overlay/084 | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/overlay/084 b/tests/overlay/084
> index 8465caeb..778396a1 100755
> --- a/tests/overlay/084
> +++ b/tests/overlay/084
> @@ -25,6 +25,11 @@ _cleanup()
>  
>  # real QA test starts here
>  _supported_fs overlay
> +# This test does not run on kernels prior ro v6.7 and now it will
> also make sure
> +# that the following on-disk format change was backported to v6.7
> based kernels
> +_fixed_by_kernel_commit 420332b94119 \
> +	"ovl: mark xwhiteouts directory with overlay.opaque='x'"
> +
>  # We use non-default scratch underlying overlay dirs, we need to
> check
>  # them explicity after test.
>  _require_scratch_nocheck
> @@ -115,7 +120,8 @@ do_test_xwhiteout()
>  
>  	mkdir -p $basedir/lower $basedir/upper $basedir/work
>  	touch $basedir/lower/regular $basedir/lower/hidden 
> $basedir/upper/hidden
> -	setfattr -n $prefix.overlay.whiteouts -v "y" $basedir/upper
> +	# overlay.opaque="x" means directory has xwhiteout children
> +	setfattr -n $prefix.overlay.opaque -v "x" $basedir/upper
>  	setfattr -n $prefix.overlay.whiteout -v "y"
> $basedir/upper/hidden
>  
>  	# Test the hidden is invisible

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-=-=
 Alexander Larsson                                            Red Hat,
Inc 
       alexl@redhat.com            alexander.larsson@gmail.com 
He's a time-tossed vegetarian rock star with a mysterious suitcase 
handcuffed to his arm. She's a tortured foul-mouthed mercenary with the
power to see death. They fight crime! 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-05 10:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-03  8:12 [PATCH] overlay/084: Fix test to match new xwhiteouts dir on-disk format Amir Goldstein
2024-02-05 10:17 ` Alexander Larsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox