* [PATCH] generic/469: Skip the test if fallocate keep_size is not supported @ 2019-10-16 10:53 Misono Tomohiro 2019-10-17 2:42 ` Yang Xu 2019-10-18 8:39 ` Eryu Guan 0 siblings, 2 replies; 9+ messages in thread From: Misono Tomohiro @ 2019-10-16 10:53 UTC (permalink / raw) To: fstests This test requires fallocate keep_size. So, skip the test if a target FS does not support the function to avoid false negative. Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> --- tests/generic/469 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/generic/469 b/tests/generic/469 index 47fdf0cf..0c6f8ae5 100755 --- a/tests/generic/469 +++ b/tests/generic/469 @@ -40,6 +40,7 @@ rm -f $seqres.full _supported_fs generic _supported_os Linux _require_test +_require_xfs_io_command "falloc" "-k" run_fsx() { -- 2.21.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] generic/469: Skip the test if fallocate keep_size is not supported 2019-10-16 10:53 [PATCH] generic/469: Skip the test if fallocate keep_size is not supported Misono Tomohiro @ 2019-10-17 2:42 ` Yang Xu 2019-10-17 2:52 ` misono.tomohiro 2019-10-18 8:39 ` Eryu Guan 1 sibling, 1 reply; 9+ messages in thread From: Yang Xu @ 2019-10-17 2:42 UTC (permalink / raw) To: Misono Tomohiro, fstests on 2019/10/16 18:53, Misono Tomohiro wrote: > This test requires fallocate keep_size. So, skip the test if > a target FS does not support the function to avoid false negative. Can you tell me your kernel version and filesystem. IMO this fallocate keep_size feature has been supported since long times ago(xfs implemented it in 2008 and ext4 in 2007). > > Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> > --- > tests/generic/469 | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/generic/469 b/tests/generic/469 > index 47fdf0cf..0c6f8ae5 100755 > --- a/tests/generic/469 > +++ b/tests/generic/469 > @@ -40,6 +40,7 @@ rm -f $seqres.full > _supported_fs generic > _supported_os Linux > _require_test > +_require_xfs_io_command "falloc" "-k" > > run_fsx() > { > ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] generic/469: Skip the test if fallocate keep_size is not supported 2019-10-17 2:42 ` Yang Xu @ 2019-10-17 2:52 ` misono.tomohiro 2019-10-17 3:55 ` Yang Xu 0 siblings, 1 reply; 9+ messages in thread From: misono.tomohiro @ 2019-10-17 2:52 UTC (permalink / raw) To: xuyang2018.jy@cn.fujitsu.com, fstests@vger.kernel.org > > This test requires fallocate keep_size. So, skip the test if a target > > FS does not support the function to avoid false negative. > > Can you tell me your kernel version and filesystem. IMO this fallocate keep_size feature has been supported since long times ago(xfs > implemented it in 2008 and ext4 in 2007). Hi, I'm now testing virtiofs and want to avoid noise. I think NFS 4 does not support fallocate keep_size neither. Thanks. > > > > Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> > > --- > > tests/generic/469 | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/tests/generic/469 b/tests/generic/469 index > > 47fdf0cf..0c6f8ae5 100755 > > --- a/tests/generic/469 > > +++ b/tests/generic/469 > > @@ -40,6 +40,7 @@ rm -f $seqres.full > > _supported_fs generic > > _supported_os Linux > > _require_test > > +_require_xfs_io_command "falloc" "-k" > > > > run_fsx() > > { > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] generic/469: Skip the test if fallocate keep_size is not supported 2019-10-17 2:52 ` misono.tomohiro @ 2019-10-17 3:55 ` Yang Xu 2019-10-17 7:08 ` misono.tomohiro 0 siblings, 1 reply; 9+ messages in thread From: Yang Xu @ 2019-10-17 3:55 UTC (permalink / raw) To: Misono, Tomohiro/味曽野 智礼 Cc: fstests@vger.kernel.org on 2019/10/17 10:52, Misono, Tomohiro/味曽野 智礼 wrote: >>> This test requires fallocate keep_size. So, skip the test if a target >>> FS does not support the function to avoid false negative. >> >> Can you tell me your kernel version and filesystem. IMO this fallocate keep_size feature has been supported since long times ago(xfs >> implemented it in 2008 and ext4 in 2007). > > Hi, > > I'm now testing virtiofs and want to avoid noise. I think NFS 4 does not support fallocate keep_size neither. > Hi I see. But in generic/499, it also uses fallocate keep size, so I think you can also add _require_xfs_io_command "falloc" "-k" in that case(I guess generic/499 doesn't run on your system). ps: In generic/469, it can also add fzero check. Thanks. > Thanks. > >>> >>> Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> >>> --- >>> tests/generic/469 | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/tests/generic/469 b/tests/generic/469 index >>> 47fdf0cf..0c6f8ae5 100755 >>> --- a/tests/generic/469 >>> +++ b/tests/generic/469 >>> @@ -40,6 +40,7 @@ rm -f $seqres.full >>> _supported_fs generic >>> _supported_os Linux >>> _require_test >>> +_require_xfs_io_command "falloc" "-k" >>> >>> run_fsx() >>> { >>> ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] generic/469: Skip the test if fallocate keep_size is not supported 2019-10-17 3:55 ` Yang Xu @ 2019-10-17 7:08 ` misono.tomohiro 0 siblings, 0 replies; 9+ messages in thread From: misono.tomohiro @ 2019-10-17 7:08 UTC (permalink / raw) To: xuyang2018.jy@cn.fujitsu.com; +Cc: fstests@vger.kernel.org > >>> This test requires fallocate keep_size. So, skip the test if a > >>> target FS does not support the function to avoid false negative. > >> > >> Can you tell me your kernel version and filesystem. IMO this > >> fallocate keep_size feature has been supported since long times ago(xfs implemented it in 2008 and ext4 in 2007). > > > > Hi, > > > > I'm now testing virtiofs and want to avoid noise. I think NFS 4 does not support fallocate keep_size neither. > > > Hi > > I see. But in generic/499, it also uses fallocate keep size, so I think you can also add _require_xfs_io_command "falloc" "-k" > in that case(I guess generic/499 doesn't run on your system). > > ps: In generic/469, it can also add fzero check. Thanks, I have sent v2. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] generic/469: Skip the test if fallocate keep_size is not supported 2019-10-16 10:53 [PATCH] generic/469: Skip the test if fallocate keep_size is not supported Misono Tomohiro 2019-10-17 2:42 ` Yang Xu @ 2019-10-18 8:39 ` Eryu Guan 2019-10-18 9:02 ` misono.tomohiro 1 sibling, 1 reply; 9+ messages in thread From: Eryu Guan @ 2019-10-18 8:39 UTC (permalink / raw) To: Misono Tomohiro; +Cc: fstests On Wed, Oct 16, 2019 at 07:53:47PM +0900, Misono Tomohiro wrote: > This test requires fallocate keep_size. So, skip the test if > a target FS does not support the function to avoid false negative. > > Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Would you please paste the false failure you've seen? I can't recall I hit such failures, and I think fsx would just disable unsupported operations and don't cause failure, it just prints a message to stderr, and we already redirect stderr to $seqres.full in run_fsx in 469. Thanks, Eryu > --- > tests/generic/469 | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/generic/469 b/tests/generic/469 > index 47fdf0cf..0c6f8ae5 100755 > --- a/tests/generic/469 > +++ b/tests/generic/469 > @@ -40,6 +40,7 @@ rm -f $seqres.full > _supported_fs generic > _supported_os Linux > _require_test > +_require_xfs_io_command "falloc" "-k" > > run_fsx() > { > -- > 2.21.0 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH] generic/469: Skip the test if fallocate keep_size is not supported 2019-10-18 8:39 ` Eryu Guan @ 2019-10-18 9:02 ` misono.tomohiro 2019-10-18 10:24 ` Eryu Guan 0 siblings, 1 reply; 9+ messages in thread From: misono.tomohiro @ 2019-10-18 9:02 UTC (permalink / raw) To: 'Eryu Guan'; +Cc: fstests@vger.kernel.org > On Wed, Oct 16, 2019 at 07:53:47PM +0900, Misono Tomohiro wrote: > > This test requires fallocate keep_size. So, skip the test if a target > > FS does not support the function to avoid false negative. > > > > Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> > > Would you please paste the false failure you've seen? I can't recall I hit such failures, and I think fsx would just disable unsupported > operations and don't cause failure, it just prints a message to stderr, and we already redirect stderr to $seqres.full in run_fsx > in 469. Hi, I just got output mismatch error: $ cat results/generic/469.out.bad QA output created by 469 fsx --replay-ops fsxops.0 Seed set to 1 main: filesystem does not support fallocate mode FALLOC_FL_KEEP_SIZE, disabling! main: filesystem does not support fallocate mode FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, disabling! main: filesystem does not support fallocate mode FALLOC_FL_ZERO_RANGE, disabling! main: filesystem does not support fallocate mode FALLOC_FL_COLLAPSE_RANGE, disabling! main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling! main: filesystem does not support clone range, disabling! main: filesystem does not support dedupe range, disabling! fallocate: 0x0 to 0x1000 do_preallocate: fallocate: Operation not supported LOG DUMP (1 total operations): 1( 1 mod 256): FALLOC 0x0 thru 0x1000 (0x1000 bytes) PAST_EOF Log of operations saved to "/test1/469.fsx.fsxops"; replay with --replay-ops Correct content saved for comparison (maybe hexdump "/test1/469.fsx" vs "/test1/469.fsx.fsxgood") Thanks. > > Thanks, > Eryu > > > --- > > tests/generic/469 | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/tests/generic/469 b/tests/generic/469 index > > 47fdf0cf..0c6f8ae5 100755 > > --- a/tests/generic/469 > > +++ b/tests/generic/469 > > @@ -40,6 +40,7 @@ rm -f $seqres.full > > _supported_fs generic > > _supported_os Linux > > _require_test > > +_require_xfs_io_command "falloc" "-k" > > > > run_fsx() > > { > > -- > > 2.21.0 > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] generic/469: Skip the test if fallocate keep_size is not supported 2019-10-18 9:02 ` misono.tomohiro @ 2019-10-18 10:24 ` Eryu Guan 2019-10-18 10:52 ` misono.tomohiro 0 siblings, 1 reply; 9+ messages in thread From: Eryu Guan @ 2019-10-18 10:24 UTC (permalink / raw) To: misono.tomohiro@fujitsu.com; +Cc: fstests@vger.kernel.org On Fri, Oct 18, 2019 at 09:02:12AM +0000, misono.tomohiro@fujitsu.com wrote: > > On Wed, Oct 16, 2019 at 07:53:47PM +0900, Misono Tomohiro wrote: > > > This test requires fallocate keep_size. So, skip the test if a target > > > FS does not support the function to avoid false negative. > > > > > > Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> > > > > Would you please paste the false failure you've seen? I can't recall I hit such failures, and I think fsx would just disable unsupported > > operations and don't cause failure, it just prints a message to stderr, and we already redirect stderr to $seqres.full in run_fsx > > in 469. > > Hi, I just got output mismatch error: > > $ cat results/generic/469.out.bad > QA output created by 469 > fsx --replay-ops fsxops.0 > Seed set to 1 > main: filesystem does not support fallocate mode FALLOC_FL_KEEP_SIZE, disabling! > main: filesystem does not support fallocate mode FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, disabling! > main: filesystem does not support fallocate mode FALLOC_FL_ZERO_RANGE, disabling! > main: filesystem does not support fallocate mode FALLOC_FL_COLLAPSE_RANGE, disabling! > main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling! > main: filesystem does not support clone range, disabling! > main: filesystem does not support dedupe range, disabling! > fallocate: 0x0 to 0x1000 > do_preallocate: fallocate: Operation not supported > LOG DUMP (1 total operations): > 1( 1 mod 256): FALLOC 0x0 thru 0x1000 (0x1000 bytes) PAST_EOF > Log of operations saved to "/test1/469.fsx.fsxops"; replay with --replay-ops > Correct content saved for comparison > (maybe hexdump "/test1/469.fsx" vs "/test1/469.fsx.fsxgood") Ah, I recalled that I actually tried to fix this issue before, but Amir didn't like my patch back then :) https://spinics.net/lists/fstests/msg07953.html Because my patch silently ignored 'keep_size' flag when replaying operations, and look at it again, I don't like it either. I think we could just skip the keep_size operations instead of ignoring it. Would you please try this patch? diff --git a/ltp/fsx.c b/ltp/fsx.c index 06d08e4e93f3..ae89bf665db4 100644 --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -2044,6 +2044,9 @@ have_op: if (!fallocate_calls) { log4(OP_FALLOCATE, offset, size, FL_SKIPPED); goto out; + } else if (keep_size && !keep_size_calls) { + log4(OP_FALLOCATE, offset, size, FL_SKIPPED | FL_KEEP_SIZE); + goto out; } break; case OP_PUNCH_HOLE: @@ -2056,6 +2059,9 @@ have_op: if (!zero_range_calls) { log4(OP_ZERO_RANGE, offset, size, FL_SKIPPED); goto out; + } else if (keep_size && !keep_size_calls) { + log4(OP_ZERO_RANGE, offset, size, FL_SKIPPED | FL_KEEP_SIZE); + goto out; } break; case OP_COLLAPSE_RANGE: Thanks! Eryu > > Thanks. > > > > > Thanks, > > Eryu > > > > > --- > > > tests/generic/469 | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/tests/generic/469 b/tests/generic/469 index > > > 47fdf0cf..0c6f8ae5 100755 > > > --- a/tests/generic/469 > > > +++ b/tests/generic/469 > > > @@ -40,6 +40,7 @@ rm -f $seqres.full > > > _supported_fs generic > > > _supported_os Linux > > > _require_test > > > +_require_xfs_io_command "falloc" "-k" > > > > > > run_fsx() > > > { > > > -- > > > 2.21.0 > > > ^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH] generic/469: Skip the test if fallocate keep_size is not supported 2019-10-18 10:24 ` Eryu Guan @ 2019-10-18 10:52 ` misono.tomohiro 0 siblings, 0 replies; 9+ messages in thread From: misono.tomohiro @ 2019-10-18 10:52 UTC (permalink / raw) To: 'Eryu Guan'; +Cc: fstests@vger.kernel.org > On Fri, Oct 18, 2019 at 09:02:12AM +0000, misono.tomohiro@fujitsu.com wrote: > > > On Wed, Oct 16, 2019 at 07:53:47PM +0900, Misono Tomohiro wrote: > > > > This test requires fallocate keep_size. So, skip the test if a > > > > target FS does not support the function to avoid false negative. > > > > > > > > Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> > > > > > > Would you please paste the false failure you've seen? I can't recall > > > I hit such failures, and I think fsx would just disable unsupported > > > operations and don't cause failure, it just prints a message to stderr, and we already redirect stderr to $seqres.full in > run_fsx in 469. > > > > Hi, I just got output mismatch error: > > > > $ cat results/generic/469.out.bad > > QA output created by 469 > > fsx --replay-ops fsxops.0 > > Seed set to 1 > > main: filesystem does not support fallocate mode FALLOC_FL_KEEP_SIZE, disabling! > > main: filesystem does not support fallocate mode FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, disabling! > > main: filesystem does not support fallocate mode FALLOC_FL_ZERO_RANGE, disabling! > > main: filesystem does not support fallocate mode FALLOC_FL_COLLAPSE_RANGE, disabling! > > main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling! > > main: filesystem does not support clone range, disabling! > > main: filesystem does not support dedupe range, disabling! > > fallocate: 0x0 to 0x1000 > > do_preallocate: fallocate: Operation not supported LOG DUMP (1 total > > operations): > > 1( 1 mod 256): FALLOC 0x0 thru 0x1000 (0x1000 bytes) PAST_EOF > > Log of operations saved to "/test1/469.fsx.fsxops"; replay with > > --replay-ops Correct content saved for comparison (maybe hexdump > > "/test1/469.fsx" vs "/test1/469.fsx.fsxgood") > > Ah, I recalled that I actually tried to fix this issue before, but Amir didn't like my patch back then :) > > https://spinics.net/lists/fstests/msg07953.html > > Because my patch silently ignored 'keep_size' flag when replaying operations, and look at it again, I don't like it either. > > I think we could just skip the keep_size operations instead of ignoring it. > > Would you please try this patch? > > diff --git a/ltp/fsx.c b/ltp/fsx.c > index 06d08e4e93f3..ae89bf665db4 100644 > --- a/ltp/fsx.c > +++ b/ltp/fsx.c > @@ -2044,6 +2044,9 @@ have_op: > if (!fallocate_calls) { > log4(OP_FALLOCATE, offset, size, FL_SKIPPED); > goto out; > + } else if (keep_size && !keep_size_calls) { > + log4(OP_FALLOCATE, offset, size, FL_SKIPPED | FL_KEEP_SIZE); > + goto out; > } > break; > case OP_PUNCH_HOLE: > @@ -2056,6 +2059,9 @@ have_op: > if (!zero_range_calls) { > log4(OP_ZERO_RANGE, offset, size, FL_SKIPPED); > goto out; > + } else if (keep_size && !keep_size_calls) { > + log4(OP_ZERO_RANGE, offset, size, FL_SKIPPED | FL_KEEP_SIZE); > + goto out; > } > break; > case OP_COLLAPSE_RANGE: > With this patch, 469 just succeeds on my environment (virtiofs). I'm fine with this approach: Reviewed-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Thanks! > Thanks! > > Eryu > > > > Thanks. > > > > > > > > Thanks, > > > Eryu > > > > > > > --- > > > > tests/generic/469 | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/tests/generic/469 b/tests/generic/469 index > > > > 47fdf0cf..0c6f8ae5 100755 > > > > --- a/tests/generic/469 > > > > +++ b/tests/generic/469 > > > > @@ -40,6 +40,7 @@ rm -f $seqres.full _supported_fs generic > > > > _supported_os Linux _require_test > > > > +_require_xfs_io_command "falloc" "-k" > > > > > > > > run_fsx() > > > > { > > > > -- > > > > 2.21.0 > > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-10-18 10:54 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-10-16 10:53 [PATCH] generic/469: Skip the test if fallocate keep_size is not supported Misono Tomohiro 2019-10-17 2:42 ` Yang Xu 2019-10-17 2:52 ` misono.tomohiro 2019-10-17 3:55 ` Yang Xu 2019-10-17 7:08 ` misono.tomohiro 2019-10-18 8:39 ` Eryu Guan 2019-10-18 9:02 ` misono.tomohiro 2019-10-18 10:24 ` Eryu Guan 2019-10-18 10:52 ` misono.tomohiro
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.