* [PATCH 0/2] fstests: fix overlay test failure over ext4
@ 2018-08-27 18:29 Amir Goldstein
2018-08-27 18:29 ` [PATCH 1/2] overlay: do not set OVL_BASE_FSTYP value to "overlay" Amir Goldstein
2018-08-27 18:29 ` [PATCH 2/2] generic/009: fix test failure with overlay over ext4 Amir Goldstein
0 siblings, 2 replies; 4+ messages in thread
From: Amir Goldstein @ 2018-08-27 18:29 UTC (permalink / raw)
To: Eryu Guan; +Cc: Theodore Ts'o, fstests, linux-ext4, linux-unionfs
Eryu,
As I reported earlier, test generic/009 was failing ./check -overlay
run due to a test bug. The test belongs to a class of tests that have
explicit check for a certain $FSTYP, which does not apply when FSTYP is
overlay.
I ran all the tests that check for FSTYP = ext4 with overlay over ext4
and all the tests that check for FSTYP = xfs with overlay over xfs.
generic/009 was the only test that failed because of the exlicit check.
The rest of the tests either passes or did not run for a good reason.
Strangely, tests which _require_seek_data_hole(), that has the exact same
check as generic/009 didn't fail with overlay over ext4. In fact, those
tests also did not with with bare ext4 even when I removed the call
to _ext4_disable_extent_zeroout() from _require_seek_data_hole()???
I tried to come up with a more generic solution, but didn't like any
ideas I had, so I ended up fixing generic/009 in place in the hope that
you either accept it as is or propose a better solution.
The fix depends on the user either setting FSTYP=ext4 in a config file
or setting the variable OVL_BASE_FSTYP before running the test.
I will soon send a patch for kvm-xfstests to Ted that does the latter.
Thanks,
Amir.
Amir Goldstein (2):
overlay: do not set OVL_BASE_FSTYP value to "overlay"
generic/009: fix test failure with overlay over ext4
common/config | 2 +-
tests/generic/009 | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] overlay: do not set OVL_BASE_FSTYP value to "overlay"
2018-08-27 18:29 [PATCH 0/2] fstests: fix overlay test failure over ext4 Amir Goldstein
@ 2018-08-27 18:29 ` Amir Goldstein
2018-08-27 18:29 ` [PATCH 2/2] generic/009: fix test failure with overlay over ext4 Amir Goldstein
1 sibling, 0 replies; 4+ messages in thread
From: Amir Goldstein @ 2018-08-27 18:29 UTC (permalink / raw)
To: Eryu Guan; +Cc: Theodore Ts'o, fstests, linux-ext4, linux-unionfs
The purpose of OVL_BASE_FSTYP is to store the value of FSTYP that is
found in a host config file section.
When there is no host config file or if user sets FSTYP=overlay in config
file, it makes no sense to store the value "overlay" in OVL_BASE_FSTYP
and it is better to leave it empty or leave its current value in tact.
This allows user to set OVL_BASE_FSTYP in config file or before running
the test to support queries about base fs, such as
_require_metadata_journaling, even when running an overlay test.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
common/config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/config b/common/config
index 2f1f272..d85519a 100644
--- a/common/config
+++ b/common/config
@@ -530,7 +530,7 @@ _overlay_config_override()
[ -b "$TEST_DEV" ] || return 0
# Config file may specify base fs type, but we obay -overlay flag
- export OVL_BASE_FSTYP="$FSTYP"
+ [ "$FSTYP" == overlay ] || export OVL_BASE_FSTYP="$FSTYP"
export FSTYP=overlay
# Store original base fs vars
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] generic/009: fix test failure with overlay over ext4
2018-08-27 18:29 [PATCH 0/2] fstests: fix overlay test failure over ext4 Amir Goldstein
2018-08-27 18:29 ` [PATCH 1/2] overlay: do not set OVL_BASE_FSTYP value to "overlay" Amir Goldstein
@ 2018-08-27 18:29 ` Amir Goldstein
2018-09-01 17:12 ` Eryu Guan
1 sibling, 1 reply; 4+ messages in thread
From: Amir Goldstein @ 2018-08-27 18:29 UTC (permalink / raw)
To: Eryu Guan; +Cc: Theodore Ts'o, fstests, linux-ext4, linux-unionfs
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(+)
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] generic/009: fix test failure with overlay over ext4
2018-08-27 18:29 ` [PATCH 2/2] generic/009: fix test failure with overlay over ext4 Amir Goldstein
@ 2018-09-01 17:12 ` Eryu Guan
0 siblings, 0 replies; 4+ messages in thread
From: Eryu Guan @ 2018-09-01 17:12 UTC (permalink / raw)
To: Amir Goldstein; +Cc: Theodore Ts'o, fstests, linux-ext4, linux-unionfs
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-01 21:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-27 18:29 [PATCH 0/2] fstests: fix overlay test failure over ext4 Amir Goldstein
2018-08-27 18:29 ` [PATCH 1/2] overlay: do not set OVL_BASE_FSTYP value to "overlay" Amir Goldstein
2018-08-27 18:29 ` [PATCH 2/2] generic/009: fix test failure with overlay over ext4 Amir Goldstein
2018-09-01 17:12 ` Eryu Guan
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).