On 4/14/25 03:18, Theodore Ts'o wrote:
On Thu, Apr 03, 2025 at 08:58:19AM +0000, Nirjhar Roy (IBM) wrote:
This patch adds -q <n> option through which one can run a given test <n>
times unconditionally. It also prints pass/fail metrics at the end.
The advantage of this over -L <n> and -i/-I <n> is that:
a. -L <n> will not re-run a flakey test if the test passes for the first time.
b. -I/-i <n> sets up devices during each iteration and hence slower.
Note -q <n> will override -L <n>.
I'm wondering if we need to keep the current behavior of -I/-i. The
primary difference between them and how your proposed -q works is that
instead of iterating over the section, your proposed option iterates
over each test. So for example, if a section contains generic/001 and
generic/002, iterating using -i 3 will do this:
Yes, the motivation to introduce -q was to:
1. Make the re-run faster and not re-format the device. -i re-formats
the device and hence is slightly slower.
2. To unconditionally loop a test - useful for scenarios when a flaky
test doesn't fail for the first time (something that -L) does.
So, are saying that re-formatting a disk on every run, something that -i
does, doesn't have much value and can be removed?
generic/001
generic/002
generic/001
generic/002
generic/001
generic/002
While generic -q 3 would do this instead:
generic/001
generic/001
generic/001
generic/002
generic/002
generic/002
At least for all of the use cases that I can think of where I might
use -i 3, -q 3 is strictly better. So instead of adding more options
which change how we might do iterations, could we perhaps just replace
-i with your new -q? And change -I so that it also works like -q,
except if any test fails, that we stop?
So -I won't re-format the devices during the loop? is that what your
suggestion is?
--NR
- Ted
--
Nirjhar Roy
Linux Kernel Developer
IBM, Bangalore