diff mbox series

[2/2] generic/009: fix test failure with overlay over ext4

Message ID 1535394566-18837-3-git-send-email-amir73il@gmail.com (mailing list archive)
State New, archived
Headers show
Series fstests: fix overlay test failure over ext4 | expand

Commit Message

Amir Goldstein Aug. 27, 2018, 6:29 p.m. UTC
When running test with overlayfs and ext4 as base fs, we need to
disable extent zeroout on the underlying base fs.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---

Eryu,

Suggestions for a cleaner approach are welcome.

Thanks,
Amir.

 tests/generic/009 | 3 +++
 1 file changed, 3 insertions(+)

Comments

Eryu Guan Sept. 1, 2018, 5:12 p.m. UTC | #1
On Mon, Aug 27, 2018 at 09:29:26PM +0300, Amir Goldstein wrote:
> When running test with overlayfs and ext4 as base fs, we need to
> disable extent zeroout on the underlying base fs.
> 
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> ---
> 
> Eryu,
> 
> Suggestions for a cleaner approach are welcome.

I thought about it too but came out with no better ideas, I think I'll
just take your patches as-is.


Thanks,
Eryu

> 
> Thanks,
> Amir.
> 
>  tests/generic/009 | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/generic/009 b/tests/generic/009
> index fa6ef46..a4f56d0 100755
> --- a/tests/generic/009
> +++ b/tests/generic/009
> @@ -39,6 +39,9 @@ testfile=$TEST_DIR/009.$$
>  if [ "$FSTYP" = "ext4" ]; then
>  	_ext4_disable_extent_zeroout
>  fi
> +if [ "$FSTYP" = "overlay" -a "$OVL_BASE_FSTYP" = "ext4" ]; then
> +	_ext4_disable_extent_zeroout "$OVL_BASE_TEST_DEV"
> +fi
>  
>  # When PAGE_SIZE > 4096 some filesystems extent layout is different so
>  # it would not match the output.
> -- 
> 2.7.4
>
diff mbox series

Patch

diff --git a/tests/generic/009 b/tests/generic/009
index fa6ef46..a4f56d0 100755
--- a/tests/generic/009
+++ b/tests/generic/009
@@ -39,6 +39,9 @@  testfile=$TEST_DIR/009.$$
 if [ "$FSTYP" = "ext4" ]; then
 	_ext4_disable_extent_zeroout
 fi
+if [ "$FSTYP" = "overlay" -a "$OVL_BASE_FSTYP" = "ext4" ]; then
+	_ext4_disable_extent_zeroout "$OVL_BASE_TEST_DEV"
+fi
 
 # When PAGE_SIZE > 4096 some filesystems extent layout is different so
 # it would not match the output.