public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [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

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