[igt-dev] [PATCH i-g-t 1/7] lib/tests: Fix test failures with meson 0.50.0
Petri Latvala
petri.latvala at intel.com
Wed Apr 17 08:29:38 UTC 2019
On Tue, Apr 16, 2019 at 04:10:55PM -0400, Lyude wrote:
> From: Lyude Paul <lyude at redhat.com>
>
> Since meson 0.50.0, unit tests which return the GNU standard return code
> 99 will fail, regardless of whether or not should_fail:true is passed to
> test().
... oh bugger.
But I agree with the reasoning for their change.
> Unfortunately, igt_alarm_handler() exits the application with
> return code 99. However, since returning something other then 99 when a
> test times out would also be a bug we can't really change the return
> code igt_alarm_handler() returns.
99 is IGT_EXIT_FAILURE, and we can change that btw. igt_runner doesn't
care for the exit code value as such except for tests without
subtests, and conflicts can only occur when invoking igt_results from
a different version of IGT. Even then unknown exit codes result in
"fail" so we're good. Other parts of IGT don't hardcode the value
(knocking on wood) and we don't support mix-and-match of components
anywhere else.
I'd say go for changing IGT_EXIT_FAILURE to 98 instead of this patch.
> Instead, we can fix this by simply running tests which are expected to
> fail with return code 99 using a wrapper script that translates 99 to 1
> and any other non-zero error code into 99. This essentially makes it so
> that abnormal test failures are considered normal, and vice versa.
(As a side note, all should_fail tests would have to be wrapped with
this, otherwise you just get the same problem with new lib/tests/stuff
that exits with igt_fail()/igt_assert())
--
Petri Latvala
More information about the igt-dev
mailing list