On 7/25/22 13:08, Ammar Faizi wrote:
On 7/25/22 6:28 PM, Pavel Begunkov wrote:
Don't see any reason for that
Not that important, just for easy finding. Especially when the number of tests
increase. And yes, it always increases from time to time.
especially since it's not sorted.
It was, but since that skip-cqe.c exists, it's no longer :p
OK, OK, that's trivial, never mind. Let's move on.
New test should use the provided exit code protocol. This should have
been "return T_EXIT_SKIP;"
Oh, I already hate those rules, sounds like they were specifically
honed to make patching harder.
Lol, how damn hard is it to use it.
Not hard to use, I agree, but it's rather yet another thing that
I need to keep in mind and then it unavoidably gets forgotten and
makes to spend extra 10 minutes to fix/retest/resend/etc., which
is annoying.
Testing is not the most exciting part, frameworks are usually
trying to simplify writing tests even if there is a learning
curve. Implicit rules make it worse. I wouldn't have been
complaining if the compiler failed the build or at least
runtests.sh warned about it.
By the way, while we're at it, what is T_EXIT_ERROR? Why it's not used anywhere
and how it's different from T_EXIT_FAIL?
[ Adding Eli to the participants. ]
Ummm... yeah. I am curious about it too now. I just took a look at commit:
ed430fbeb33367 ("tests: migrate some tests to use enum-based exit codes").
Eli said:
From: Eli Schwartz <eschwartz93@xxxxxxxxx>
Date: Mon, 27 Jun 2022 14:39:05 -0400
Subject: [PATCH] tests: migrate some tests to use enum-based exit codes
For maintainability and clarity, eschew the use of integer literals in
reporting test statuses. Instead, use a helper enum which contains
various values from the GNU exitcode protocol. Returning 0 or 1 is
obvious, and in the previous commit the ability to read "skip" (77) was
implemented. The final exit status is 99, which indicates some kind of
error in running the test itself.
A partial migration of existing pass/fail values in test sources is
included.
Signed-off-by: Eli Schwartz <eschwartz93@xxxxxxxxx>
That T_EXIT_ERROR is 99 here. Not sure when to use it in liburing test. Eli?
[ Just for reference in case you (Eli) want to see the full message:
https://lore.kernel.org/io-uring/c89d373f-bc0d-dccf-630f-763e8e1a0fe5@xxxxxxxxx/ ; ]
--
Pavel Begunkov