Commit 0b18fed9 authored by Tommi Rantala's avatar Tommi Rantala Committed by Shuah Khan

selftests: pidfd: use ksft_test_result_skip() when skipping test

There's planned tests != run tests in pidfd_test when some test is
skipped:

  $ ./pidfd_test
  TAP version 13
  1..8
  [...]
  # pidfd_send_signal signal recycled pid test: Skipping test
  # Planned tests != run tests (8 != 7)
  # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0

Fix by using ksft_test_result_skip():

  $ ./pidfd_test
  TAP version 13
  1..8
  [...]
  ok 8 # SKIP pidfd_send_signal signal recycled pid test: Unsharing pid namespace not permitted
  # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:1 error:0
Signed-off-by: default avatarTommi Rantala <tommi.t.rantala@nokia.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent ef708634
...@@ -330,7 +330,7 @@ static int test_pidfd_send_signal_recycled_pid_fail(void) ...@@ -330,7 +330,7 @@ static int test_pidfd_send_signal_recycled_pid_fail(void)
ksft_exit_fail_msg("%s test: Failed to recycle pid %d\n", ksft_exit_fail_msg("%s test: Failed to recycle pid %d\n",
test_name, PID_RECYCLE); test_name, PID_RECYCLE);
case PIDFD_SKIP: case PIDFD_SKIP:
ksft_print_msg("%s test: Skipping test\n", test_name); ksft_test_result_skip("%s test: Skipping test\n", test_name);
ret = 0; ret = 0;
break; break;
case PIDFD_XFAIL: case PIDFD_XFAIL:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment