* [PATCH] misc: allow zero duration for fsstress and fsx
@ 2026-01-21 1:26 Darrick J. Wong
2026-01-21 6:45 ` Christoph Hellwig
2026-01-21 15:54 ` Zorro Lang
0 siblings, 2 replies; 8+ messages in thread
From: Darrick J. Wong @ 2026-01-21 1:26 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, xfs
From: Darrick J. Wong <djwong@kernel.org>
Occasionally the common/fuzzy fuzz test helpers manage to time
something just right such that fsx or fsstress get invoked with a zero
second duration. It's harmless to exit immediately without doing
anything, so allow this corner case.
Cc: <fstests@vger.kernel.org> # v2023.05.01
Fixes: 3e85dd4fe4236d ("misc: add duration for long soak tests")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
ltp/fsstress.c | 2 +-
ltp/fsx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index c17ac440414325..b51bd8ada2a3be 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -645,7 +645,7 @@ int main(int argc, char **argv)
exit(87);
}
duration = strtoll(optarg, NULL, 0);
- if (duration < 1) {
+ if (duration < 0) {
fprintf(stderr, "%lld: invalid duration\n", duration);
exit(88);
}
diff --git a/ltp/fsx.c b/ltp/fsx.c
index 626976dd4f9f27..4f8a2d5ab1fc08 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -3375,7 +3375,7 @@ main(int argc, char **argv)
exit(87);
}
duration = strtoll(optarg, NULL, 0);
- if (duration < 1) {
+ if (duration < 0) {
fprintf(stderr, "%lld: invalid duration\n", duration);
exit(88);
}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: allow zero duration for fsstress and fsx
2026-01-21 1:26 [PATCH] misc: allow zero duration for fsstress and fsx Darrick J. Wong
@ 2026-01-21 6:45 ` Christoph Hellwig
2026-01-21 15:54 ` Zorro Lang
1 sibling, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2026-01-21 6:45 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Zorro Lang, fstests, xfs
On Tue, Jan 20, 2026 at 05:26:21PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Occasionally the common/fuzzy fuzz test helpers manage to time
> something just right such that fsx or fsstress get invoked with a zero
> second duration. It's harmless to exit immediately without doing
> anything, so allow this corner case.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: allow zero duration for fsstress and fsx
2026-01-21 1:26 [PATCH] misc: allow zero duration for fsstress and fsx Darrick J. Wong
2026-01-21 6:45 ` Christoph Hellwig
@ 2026-01-21 15:54 ` Zorro Lang
2026-01-21 17:46 ` Darrick J. Wong
1 sibling, 1 reply; 8+ messages in thread
From: Zorro Lang @ 2026-01-21 15:54 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests, xfs
On Tue, Jan 20, 2026 at 05:26:21PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> Occasionally the common/fuzzy fuzz test helpers manage to time
> something just right such that fsx or fsstress get invoked with a zero
> second duration. It's harmless to exit immediately without doing
> anything, so allow this corner case.
Sure, duration=0 is harmless, I'm good with this patch.
Reviewed-by: Zorro Lang <zlang@redhat.com>
Please excuse my nitpicking. I'm curious about the semantics of "--duration=0".
Looking at the output of `fsstress -v --duration=0`, it doesn't actually
'do nothing.' Instead, it behaves similarly to duration=1, where fsstress
attempts to execute operations before timing out and exiting :-D
Thanks,
Zorro
>
> Cc: <fstests@vger.kernel.org> # v2023.05.01
> Fixes: 3e85dd4fe4236d ("misc: add duration for long soak tests")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> ltp/fsstress.c | 2 +-
> ltp/fsx.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> index c17ac440414325..b51bd8ada2a3be 100644
> --- a/ltp/fsstress.c
> +++ b/ltp/fsstress.c
> @@ -645,7 +645,7 @@ int main(int argc, char **argv)
> exit(87);
> }
> duration = strtoll(optarg, NULL, 0);
> - if (duration < 1) {
> + if (duration < 0) {
> fprintf(stderr, "%lld: invalid duration\n", duration);
> exit(88);
> }
> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index 626976dd4f9f27..4f8a2d5ab1fc08 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -3375,7 +3375,7 @@ main(int argc, char **argv)
> exit(87);
> }
> duration = strtoll(optarg, NULL, 0);
> - if (duration < 1) {
> + if (duration < 0) {
> fprintf(stderr, "%lld: invalid duration\n", duration);
> exit(88);
> }
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: allow zero duration for fsstress and fsx
2026-01-21 15:54 ` Zorro Lang
@ 2026-01-21 17:46 ` Darrick J. Wong
2026-01-22 7:21 ` Zorro Lang
0 siblings, 1 reply; 8+ messages in thread
From: Darrick J. Wong @ 2026-01-21 17:46 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, xfs
On Wed, Jan 21, 2026 at 11:54:56PM +0800, Zorro Lang wrote:
> On Tue, Jan 20, 2026 at 05:26:21PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Occasionally the common/fuzzy fuzz test helpers manage to time
> > something just right such that fsx or fsstress get invoked with a zero
> > second duration. It's harmless to exit immediately without doing
> > anything, so allow this corner case.
>
> Sure, duration=0 is harmless, I'm good with this patch.
>
> Reviewed-by: Zorro Lang <zlang@redhat.com>
>
> Please excuse my nitpicking. I'm curious about the semantics of "--duration=0".
> Looking at the output of `fsstress -v --duration=0`, it doesn't actually
> 'do nothing.' Instead, it behaves similarly to duration=1, where fsstress
> attempts to execute operations before timing out and exiting :-D
Yeah, I suppose it's possible to do a very small amount of work.
Would you mind changing that last sentence to read "It's harmless to
exit almost immediately having done very little work, so allow this
corner case." prior to commit?
--D
> Thanks,
> Zorro
>
> >
> > Cc: <fstests@vger.kernel.org> # v2023.05.01
> > Fixes: 3e85dd4fe4236d ("misc: add duration for long soak tests")
> > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > ---
> > ltp/fsstress.c | 2 +-
> > ltp/fsx.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> > index c17ac440414325..b51bd8ada2a3be 100644
> > --- a/ltp/fsstress.c
> > +++ b/ltp/fsstress.c
> > @@ -645,7 +645,7 @@ int main(int argc, char **argv)
> > exit(87);
> > }
> > duration = strtoll(optarg, NULL, 0);
> > - if (duration < 1) {
> > + if (duration < 0) {
> > fprintf(stderr, "%lld: invalid duration\n", duration);
> > exit(88);
> > }
> > diff --git a/ltp/fsx.c b/ltp/fsx.c
> > index 626976dd4f9f27..4f8a2d5ab1fc08 100644
> > --- a/ltp/fsx.c
> > +++ b/ltp/fsx.c
> > @@ -3375,7 +3375,7 @@ main(int argc, char **argv)
> > exit(87);
> > }
> > duration = strtoll(optarg, NULL, 0);
> > - if (duration < 1) {
> > + if (duration < 0) {
> > fprintf(stderr, "%lld: invalid duration\n", duration);
> > exit(88);
> > }
> >
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: allow zero duration for fsstress and fsx
2026-01-21 17:46 ` Darrick J. Wong
@ 2026-01-22 7:21 ` Zorro Lang
2026-01-22 16:13 ` Darrick J. Wong
0 siblings, 1 reply; 8+ messages in thread
From: Zorro Lang @ 2026-01-22 7:21 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests, xfs
On Wed, Jan 21, 2026 at 09:46:01AM -0800, Darrick J. Wong wrote:
> On Wed, Jan 21, 2026 at 11:54:56PM +0800, Zorro Lang wrote:
> > On Tue, Jan 20, 2026 at 05:26:21PM -0800, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <djwong@kernel.org>
> > >
> > > Occasionally the common/fuzzy fuzz test helpers manage to time
> > > something just right such that fsx or fsstress get invoked with a zero
> > > second duration. It's harmless to exit immediately without doing
> > > anything, so allow this corner case.
> >
> > Sure, duration=0 is harmless, I'm good with this patch.
> >
> > Reviewed-by: Zorro Lang <zlang@redhat.com>
> >
> > Please excuse my nitpicking. I'm curious about the semantics of "--duration=0".
> > Looking at the output of `fsstress -v --duration=0`, it doesn't actually
> > 'do nothing.' Instead, it behaves similarly to duration=1, where fsstress
> > attempts to execute operations before timing out and exiting :-D
>
> Yeah, I suppose it's possible to do a very small amount of work.
>
> Would you mind changing that last sentence to read "It's harmless to
> exit almost immediately having done very little work, so allow this
> corner case." prior to commit?
Sure Darick, I can make that change prior to commit :) But I was just
curious to hear your thoughts on:
if (duration == 0) {
/* No action is taken if duration is 0 */
exit(0);
} else if (duration < 0) {
fprintf(stderr, "%lld: invalid duration\n", duration);
exit(88);
}
do you feel that makes more sense semantically :)
Thanks,
Zorro
>
> --D
>
> > Thanks,
> > Zorro
> >
> > >
> > > Cc: <fstests@vger.kernel.org> # v2023.05.01
> > > Fixes: 3e85dd4fe4236d ("misc: add duration for long soak tests")
> > > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > > ---
> > > ltp/fsstress.c | 2 +-
> > > ltp/fsx.c | 2 +-
> > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> > > index c17ac440414325..b51bd8ada2a3be 100644
> > > --- a/ltp/fsstress.c
> > > +++ b/ltp/fsstress.c
> > > @@ -645,7 +645,7 @@ int main(int argc, char **argv)
> > > exit(87);
> > > }
> > > duration = strtoll(optarg, NULL, 0);
> > > - if (duration < 1) {
> > > + if (duration < 0) {
> > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > exit(88);
> > > }
> > > diff --git a/ltp/fsx.c b/ltp/fsx.c
> > > index 626976dd4f9f27..4f8a2d5ab1fc08 100644
> > > --- a/ltp/fsx.c
> > > +++ b/ltp/fsx.c
> > > @@ -3375,7 +3375,7 @@ main(int argc, char **argv)
> > > exit(87);
> > > }
> > > duration = strtoll(optarg, NULL, 0);
> > > - if (duration < 1) {
> > > + if (duration < 0) {
> > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > exit(88);
> > > }
> > >
> >
> >
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: allow zero duration for fsstress and fsx
2026-01-22 7:21 ` Zorro Lang
@ 2026-01-22 16:13 ` Darrick J. Wong
2026-01-24 5:47 ` Zorro Lang
0 siblings, 1 reply; 8+ messages in thread
From: Darrick J. Wong @ 2026-01-22 16:13 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, xfs
On Thu, Jan 22, 2026 at 03:21:00PM +0800, Zorro Lang wrote:
> On Wed, Jan 21, 2026 at 09:46:01AM -0800, Darrick J. Wong wrote:
> > On Wed, Jan 21, 2026 at 11:54:56PM +0800, Zorro Lang wrote:
> > > On Tue, Jan 20, 2026 at 05:26:21PM -0800, Darrick J. Wong wrote:
> > > > From: Darrick J. Wong <djwong@kernel.org>
> > > >
> > > > Occasionally the common/fuzzy fuzz test helpers manage to time
> > > > something just right such that fsx or fsstress get invoked with a zero
> > > > second duration. It's harmless to exit immediately without doing
> > > > anything, so allow this corner case.
> > >
> > > Sure, duration=0 is harmless, I'm good with this patch.
> > >
> > > Reviewed-by: Zorro Lang <zlang@redhat.com>
> > >
> > > Please excuse my nitpicking. I'm curious about the semantics of "--duration=0".
> > > Looking at the output of `fsstress -v --duration=0`, it doesn't actually
> > > 'do nothing.' Instead, it behaves similarly to duration=1, where fsstress
> > > attempts to execute operations before timing out and exiting :-D
> >
> > Yeah, I suppose it's possible to do a very small amount of work.
> >
> > Would you mind changing that last sentence to read "It's harmless to
> > exit almost immediately having done very little work, so allow this
> > corner case." prior to commit?
>
> Sure Darick, I can make that change prior to commit :) But I was just
> curious to hear your thoughts on:
>
> if (duration == 0) {
> /* No action is taken if duration is 0 */
> exit(0);
> } else if (duration < 0) {
> fprintf(stderr, "%lld: invalid duration\n", duration);
> exit(88);
> }
>
> do you feel that makes more sense semantically :)
That would also work. Would you rather have the exits-immediately
version?
--D
> Thanks,
> Zorro
>
> >
> > --D
> >
> > > Thanks,
> > > Zorro
> > >
> > > >
> > > > Cc: <fstests@vger.kernel.org> # v2023.05.01
> > > > Fixes: 3e85dd4fe4236d ("misc: add duration for long soak tests")
> > > > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > > > ---
> > > > ltp/fsstress.c | 2 +-
> > > > ltp/fsx.c | 2 +-
> > > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> > > > index c17ac440414325..b51bd8ada2a3be 100644
> > > > --- a/ltp/fsstress.c
> > > > +++ b/ltp/fsstress.c
> > > > @@ -645,7 +645,7 @@ int main(int argc, char **argv)
> > > > exit(87);
> > > > }
> > > > duration = strtoll(optarg, NULL, 0);
> > > > - if (duration < 1) {
> > > > + if (duration < 0) {
> > > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > > exit(88);
> > > > }
> > > > diff --git a/ltp/fsx.c b/ltp/fsx.c
> > > > index 626976dd4f9f27..4f8a2d5ab1fc08 100644
> > > > --- a/ltp/fsx.c
> > > > +++ b/ltp/fsx.c
> > > > @@ -3375,7 +3375,7 @@ main(int argc, char **argv)
> > > > exit(87);
> > > > }
> > > > duration = strtoll(optarg, NULL, 0);
> > > > - if (duration < 1) {
> > > > + if (duration < 0) {
> > > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > > exit(88);
> > > > }
> > > >
> > >
> > >
> >
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: allow zero duration for fsstress and fsx
2026-01-22 16:13 ` Darrick J. Wong
@ 2026-01-24 5:47 ` Zorro Lang
2026-01-24 16:55 ` Darrick J. Wong
0 siblings, 1 reply; 8+ messages in thread
From: Zorro Lang @ 2026-01-24 5:47 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: fstests, xfs
On Thu, Jan 22, 2026 at 08:13:51AM -0800, Darrick J. Wong wrote:
> On Thu, Jan 22, 2026 at 03:21:00PM +0800, Zorro Lang wrote:
> > On Wed, Jan 21, 2026 at 09:46:01AM -0800, Darrick J. Wong wrote:
> > > On Wed, Jan 21, 2026 at 11:54:56PM +0800, Zorro Lang wrote:
> > > > On Tue, Jan 20, 2026 at 05:26:21PM -0800, Darrick J. Wong wrote:
> > > > > From: Darrick J. Wong <djwong@kernel.org>
> > > > >
> > > > > Occasionally the common/fuzzy fuzz test helpers manage to time
> > > > > something just right such that fsx or fsstress get invoked with a zero
> > > > > second duration. It's harmless to exit immediately without doing
> > > > > anything, so allow this corner case.
> > > >
> > > > Sure, duration=0 is harmless, I'm good with this patch.
> > > >
> > > > Reviewed-by: Zorro Lang <zlang@redhat.com>
> > > >
> > > > Please excuse my nitpicking. I'm curious about the semantics of "--duration=0".
> > > > Looking at the output of `fsstress -v --duration=0`, it doesn't actually
> > > > 'do nothing.' Instead, it behaves similarly to duration=1, where fsstress
> > > > attempts to execute operations before timing out and exiting :-D
> > >
> > > Yeah, I suppose it's possible to do a very small amount of work.
> > >
> > > Would you mind changing that last sentence to read "It's harmless to
> > > exit almost immediately having done very little work, so allow this
> > > corner case." prior to commit?
> >
> > Sure Darick, I can make that change prior to commit :) But I was just
> > curious to hear your thoughts on:
> >
> > if (duration == 0) {
> > /* No action is taken if duration is 0 */
> > exit(0);
> > } else if (duration < 0) {
> > fprintf(stderr, "%lld: invalid duration\n", duration);
> > exit(88);
> > }
> >
> > do you feel that makes more sense semantically :)
>
> That would also work. Would you rather have the exits-immediately
> version?
If both versions are good to you, I perfer the "exits-immediately" one, at least
it fits the semantics of 0 better :)
To save your time I can make this change when I merge it if you agree with that
too. Let me know if there's anything else you'd like to add.
Thanks,
Zorro
>
> --D
>
> > Thanks,
> > Zorro
> >
> > >
> > > --D
> > >
> > > > Thanks,
> > > > Zorro
> > > >
> > > > >
> > > > > Cc: <fstests@vger.kernel.org> # v2023.05.01
> > > > > Fixes: 3e85dd4fe4236d ("misc: add duration for long soak tests")
> > > > > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > > > > ---
> > > > > ltp/fsstress.c | 2 +-
> > > > > ltp/fsx.c | 2 +-
> > > > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> > > > > index c17ac440414325..b51bd8ada2a3be 100644
> > > > > --- a/ltp/fsstress.c
> > > > > +++ b/ltp/fsstress.c
> > > > > @@ -645,7 +645,7 @@ int main(int argc, char **argv)
> > > > > exit(87);
> > > > > }
> > > > > duration = strtoll(optarg, NULL, 0);
> > > > > - if (duration < 1) {
> > > > > + if (duration < 0) {
> > > > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > > > exit(88);
> > > > > }
> > > > > diff --git a/ltp/fsx.c b/ltp/fsx.c
> > > > > index 626976dd4f9f27..4f8a2d5ab1fc08 100644
> > > > > --- a/ltp/fsx.c
> > > > > +++ b/ltp/fsx.c
> > > > > @@ -3375,7 +3375,7 @@ main(int argc, char **argv)
> > > > > exit(87);
> > > > > }
> > > > > duration = strtoll(optarg, NULL, 0);
> > > > > - if (duration < 1) {
> > > > > + if (duration < 0) {
> > > > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > > > exit(88);
> > > > > }
> > > > >
> > > >
> > > >
> > >
> >
> >
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] misc: allow zero duration for fsstress and fsx
2026-01-24 5:47 ` Zorro Lang
@ 2026-01-24 16:55 ` Darrick J. Wong
0 siblings, 0 replies; 8+ messages in thread
From: Darrick J. Wong @ 2026-01-24 16:55 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, xfs
On Sat, Jan 24, 2026 at 01:47:11PM +0800, Zorro Lang wrote:
> On Thu, Jan 22, 2026 at 08:13:51AM -0800, Darrick J. Wong wrote:
> > On Thu, Jan 22, 2026 at 03:21:00PM +0800, Zorro Lang wrote:
> > > On Wed, Jan 21, 2026 at 09:46:01AM -0800, Darrick J. Wong wrote:
> > > > On Wed, Jan 21, 2026 at 11:54:56PM +0800, Zorro Lang wrote:
> > > > > On Tue, Jan 20, 2026 at 05:26:21PM -0800, Darrick J. Wong wrote:
> > > > > > From: Darrick J. Wong <djwong@kernel.org>
> > > > > >
> > > > > > Occasionally the common/fuzzy fuzz test helpers manage to time
> > > > > > something just right such that fsx or fsstress get invoked with a zero
> > > > > > second duration. It's harmless to exit immediately without doing
> > > > > > anything, so allow this corner case.
> > > > >
> > > > > Sure, duration=0 is harmless, I'm good with this patch.
> > > > >
> > > > > Reviewed-by: Zorro Lang <zlang@redhat.com>
> > > > >
> > > > > Please excuse my nitpicking. I'm curious about the semantics of "--duration=0".
> > > > > Looking at the output of `fsstress -v --duration=0`, it doesn't actually
> > > > > 'do nothing.' Instead, it behaves similarly to duration=1, where fsstress
> > > > > attempts to execute operations before timing out and exiting :-D
> > > >
> > > > Yeah, I suppose it's possible to do a very small amount of work.
> > > >
> > > > Would you mind changing that last sentence to read "It's harmless to
> > > > exit almost immediately having done very little work, so allow this
> > > > corner case." prior to commit?
> > >
> > > Sure Darick, I can make that change prior to commit :) But I was just
> > > curious to hear your thoughts on:
> > >
> > > if (duration == 0) {
> > > /* No action is taken if duration is 0 */
> > > exit(0);
> > > } else if (duration < 0) {
> > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > exit(88);
> > > }
> > >
> > > do you feel that makes more sense semantically :)
> >
> > That would also work. Would you rather have the exits-immediately
> > version?
>
> If both versions are good to you, I perfer the "exits-immediately" one, at least
> it fits the semantics of 0 better :)
>
> To save your time I can make this change when I merge it if you agree with that
> too. Let me know if there's anything else you'd like to add.
Your way is fine with me. I don't think I have anything to add, and if
I do I can always send a patch. :)
--D
> Thanks,
> Zorro
>
> >
> > --D
> >
> > > Thanks,
> > > Zorro
> > >
> > > >
> > > > --D
> > > >
> > > > > Thanks,
> > > > > Zorro
> > > > >
> > > > > >
> > > > > > Cc: <fstests@vger.kernel.org> # v2023.05.01
> > > > > > Fixes: 3e85dd4fe4236d ("misc: add duration for long soak tests")
> > > > > > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > > > > > ---
> > > > > > ltp/fsstress.c | 2 +-
> > > > > > ltp/fsx.c | 2 +-
> > > > > > 2 files changed, 2 insertions(+), 2 deletions(-)
> > > > > >
> > > > > > diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> > > > > > index c17ac440414325..b51bd8ada2a3be 100644
> > > > > > --- a/ltp/fsstress.c
> > > > > > +++ b/ltp/fsstress.c
> > > > > > @@ -645,7 +645,7 @@ int main(int argc, char **argv)
> > > > > > exit(87);
> > > > > > }
> > > > > > duration = strtoll(optarg, NULL, 0);
> > > > > > - if (duration < 1) {
> > > > > > + if (duration < 0) {
> > > > > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > > > > exit(88);
> > > > > > }
> > > > > > diff --git a/ltp/fsx.c b/ltp/fsx.c
> > > > > > index 626976dd4f9f27..4f8a2d5ab1fc08 100644
> > > > > > --- a/ltp/fsx.c
> > > > > > +++ b/ltp/fsx.c
> > > > > > @@ -3375,7 +3375,7 @@ main(int argc, char **argv)
> > > > > > exit(87);
> > > > > > }
> > > > > > duration = strtoll(optarg, NULL, 0);
> > > > > > - if (duration < 1) {
> > > > > > + if (duration < 0) {
> > > > > > fprintf(stderr, "%lld: invalid duration\n", duration);
> > > > > > exit(88);
> > > > > > }
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-01-24 16:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21 1:26 [PATCH] misc: allow zero duration for fsstress and fsx Darrick J. Wong
2026-01-21 6:45 ` Christoph Hellwig
2026-01-21 15:54 ` Zorro Lang
2026-01-21 17:46 ` Darrick J. Wong
2026-01-22 7:21 ` Zorro Lang
2026-01-22 16:13 ` Darrick J. Wong
2026-01-24 5:47 ` Zorro Lang
2026-01-24 16:55 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox