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.
[zlang: No action is taken if duration is 0]
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>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
exit(87);
}
duration = strtoll(optarg, NULL, 0);
- if (duration < 1) {
+ 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);
}
exit(87);
}
duration = strtoll(optarg, NULL, 0);
- if (duration < 1) {
+ 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);
}