[LTP] [PATCH] syscalls/keyctl07: skip test if syscall unavailable

Petr Vorel pvorel@suse.cz
Tue Feb 6 12:41:12 CET 2018


Hi,
> If the child is unable to run the test because the syscall is
> unavailable TBROK is currently reported. Look for TCONF from the
> child and report that in this scenario instead.

> Signed-off-by: Steve Muckle <smuckle.linux@gmail.com>
> ---
>  testcases/kernel/syscalls/keyctl/keyctl07.c | 3 +++
>  1 file changed, 3 insertions(+)

> diff --git a/testcases/kernel/syscalls/keyctl/keyctl07.c b/testcases/kernel/syscalls/keyctl/keyctl07.c
> index 39f07eb5fbce..08a585b6c956 100644
> --- a/testcases/kernel/syscalls/keyctl/keyctl07.c
> +++ b/testcases/kernel/syscalls/keyctl/keyctl07.c
> @@ -106,6 +106,9 @@ static void do_test(void)
>  		return;
>  	}

> +	if (WIFEXITED(status) && WEXITSTATUS(status) == TCONF)
> +		tst_brk(TCONF, "syscall not implemented");
> +
>  	tst_brk(TBROK, "Child %s", tst_strstatus(status));
>  }

Pushed, thanks.

Kind regards,
Petr


More information about the ltp mailing list