Re: [igt-dev] [PATCH i-g-t 4/7] lib/igt_core: Just use igt_can_fail() in __igt_run_subtest()

Petri Latvala
2019-04-17T09:05:16Z

On Tue, Apr 16, 2019 at 04:10:58PM -0400, Lyude wrote:
> From: Lyude Paul <lyude@redhat.com>
>
> That's what it's there for.
>
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> ---
> lib/igt_core.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index a637b94e..503503ce 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -903,9 +903,7 @@ bool __igt_run_subtest(const char *subtest_name)
> {
> int i;
>
> - igt_internal_assert(!in_subtest);
> - igt_internal_assert(!in_fixture);
> - igt_internal_assert(test_with_subtests);
> + igt_internal_assert(!igt_can_fail());

For computers it's the same but for humans the meaning is a bit lost
with this change. Meh, whoever wants to implement nested subtests has
to change that part anyway...

Possible rebasing to the changes for the assert patch required, but

Reviewed-by: Petri Latvala <petri.latvala@intel.com>