public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/499: stop fsx from probing insert range call
@ 2018-07-10  7:33 Zorro Lang
  2018-07-10 12:24 ` Lukas Czerner
  0 siblings, 1 reply; 3+ messages in thread
From: Zorro Lang @ 2018-07-10  7:33 UTC (permalink / raw)
  To: fstests

On some old kernel which supports COLLAPSE_RANGE and ZERO_RANGE,
but doesn't support INSERT_RANGE, this case alway fails as:

   QA output created by 499
  +main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling!
   Silence is golden

fsx print one more line to break the golden image.

Due to this case don't need to do INSERT_RANGE operations, so use
-I options to prevent fsx from probing INSERT_RANGE call.

Signed-off-by: Zorro Lang <zlang@redhat.com>
---

Hi,

1) I think using -I option of fsx is better than _notrun when find the system
doesn't support INSERT_RANGE.

2) Although PUCH_HOLE isn't needed either, when a system supports COLLAPSE_RANGE
and ZERO_RANGE, it supports PUCH_HOLE too. So I don't use -H option.

Thanks,
Zorro

 tests/generic/499 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/499 b/tests/generic/499
index 99d6d308..a2eac6ab 100755
--- a/tests/generic/499
+++ b/tests/generic/499
@@ -50,7 +50,7 @@ ENDL
 
 victim=$SCRATCH_MNT/a
 touch $victim
-$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
+$here/ltp/fsx -I --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
 
 echo "Silence is golden"
 status=0
-- 
2.14.4


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

* Re: [PATCH] generic/499: stop fsx from probing insert range call
  2018-07-10  7:33 [PATCH] generic/499: stop fsx from probing insert range call Zorro Lang
@ 2018-07-10 12:24 ` Lukas Czerner
  2018-07-10 12:38   ` Zorro Lang
  0 siblings, 1 reply; 3+ messages in thread
From: Lukas Czerner @ 2018-07-10 12:24 UTC (permalink / raw)
  To: Zorro Lang; +Cc: fstests

On Tue, Jul 10, 2018 at 03:33:05PM +0800, Zorro Lang wrote:
> On some old kernel which supports COLLAPSE_RANGE and ZERO_RANGE,
> but doesn't support INSERT_RANGE, this case alway fails as:
> 
>    QA output created by 499
>   +main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling!
>    Silence is golden
> 
> fsx print one more line to break the golden image.
> 
> Due to this case don't need to do INSERT_RANGE operations, so use
> -I options to prevent fsx from probing INSERT_RANGE call.
> 
> Signed-off-by: Zorro Lang <zlang@redhat.com>
> ---
> 
> Hi,
> 
> 1) I think using -I option of fsx is better than _notrun when find the system
> doesn't support INSERT_RANGE.
> 
> 2) Although PUCH_HOLE isn't needed either, when a system supports COLLAPSE_RANGE
> and ZERO_RANGE, it supports PUCH_HOLE too. So I don't use -H option.

Hi Zorro,

there is no real dependency between fallocate modes, so it is this way for
historical reasons and it might be different for different fs. Not that
this matters much.

> 
> Thanks,
> Zorro
> 
>  tests/generic/499 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/499 b/tests/generic/499
> index 99d6d308..a2eac6ab 100755
> --- a/tests/generic/499
> +++ b/tests/generic/499
> @@ -50,7 +50,7 @@ ENDL
>  
>  victim=$SCRATCH_MNT/a
>  touch $victim
> -$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
> +$here/ltp/fsx -I --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output

The test fails (while the others does not) because we tend to redirect
stderr as well, but we are not doing it here.

IMO the better fix would be to add 2>&1

-Lukas

>  
>  echo "Silence is golden"
>  status=0
> -- 
> 2.14.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] generic/499: stop fsx from probing insert range call
  2018-07-10 12:24 ` Lukas Czerner
@ 2018-07-10 12:38   ` Zorro Lang
  0 siblings, 0 replies; 3+ messages in thread
From: Zorro Lang @ 2018-07-10 12:38 UTC (permalink / raw)
  To: Lukas Czerner; +Cc: fstests

On Tue, Jul 10, 2018 at 02:24:15PM +0200, Lukas Czerner wrote:
> On Tue, Jul 10, 2018 at 03:33:05PM +0800, Zorro Lang wrote:
> > On some old kernel which supports COLLAPSE_RANGE and ZERO_RANGE,
> > but doesn't support INSERT_RANGE, this case alway fails as:
> > 
> >    QA output created by 499
> >   +main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling!
> >    Silence is golden
> > 
> > fsx print one more line to break the golden image.
> > 
> > Due to this case don't need to do INSERT_RANGE operations, so use
> > -I options to prevent fsx from probing INSERT_RANGE call.
> > 
> > Signed-off-by: Zorro Lang <zlang@redhat.com>
> > ---
> > 
> > Hi,
> > 
> > 1) I think using -I option of fsx is better than _notrun when find the system
> > doesn't support INSERT_RANGE.
> > 
> > 2) Although PUCH_HOLE isn't needed either, when a system supports COLLAPSE_RANGE
> > and ZERO_RANGE, it supports PUCH_HOLE too. So I don't use -H option.
> 
> Hi Zorro,
> 
> there is no real dependency between fallocate modes, so it is this way for
> historical reasons and it might be different for different fs. Not that
> this matters much.
> 
> > 
> > Thanks,
> > Zorro
> > 
> >  tests/generic/499 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/generic/499 b/tests/generic/499
> > index 99d6d308..a2eac6ab 100755
> > --- a/tests/generic/499
> > +++ b/tests/generic/499
> > @@ -50,7 +50,7 @@ ENDL
> >  
> >  victim=$SCRATCH_MNT/a
> >  touch $victim
> > -$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
> > +$here/ltp/fsx -I --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
> 
> The test fails (while the others does not) because we tend to redirect
> stderr as well, but we are not doing it here.
> 
> IMO the better fix would be to add 2>&1

Ah, make sense! I was thinking the case need fsx stderr output to break
the golden image. If we filter stderr too, we totally depend on checking
the return value of fsx :)

I'll send a v2.

Thanks,
Zorro

> 
> -Lukas
> 
> >  
> >  echo "Silence is golden"
> >  status=0
> > -- 
> > 2.14.4
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe fstests" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-07-10 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10  7:33 [PATCH] generic/499: stop fsx from probing insert range call Zorro Lang
2018-07-10 12:24 ` Lukas Czerner
2018-07-10 12:38   ` Zorro Lang

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