linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tommi Rantala <tommi.t.rantala@nokia.com>
To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <shuah@kernel.org>
Cc: Tommi Rantala <tommi.t.rantala@nokia.com>,
	Christian Brauner <christian@brauner.io>
Subject: [PATCH 05/13] selftests: pidfd: use ksft_test_result_skip() when skipping test
Date: Thu,  8 Oct 2020 15:26:25 +0300	[thread overview]
Message-ID: <20201008122633.687877-6-tommi.t.rantala@nokia.com> (raw)
In-Reply-To: <20201008122633.687877-1-tommi.t.rantala@nokia.com>

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: Tommi Rantala <tommi.t.rantala@nokia.com>
---
 tools/testing/selftests/pidfd/pidfd_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/pidfd/pidfd_test.c b/tools/testing/selftests/pidfd/pidfd_test.c
index c585aaa2acd8..529eb700ac26 100644
--- a/tools/testing/selftests/pidfd/pidfd_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_test.c
@@ -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",
 				   test_name, PID_RECYCLE);
 	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;
 		break;
 	case PIDFD_XFAIL:
-- 
2.26.2


  parent reply	other threads:[~2020-10-08 12:27 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 12:26 [PATCH 00/13] selftests fixes Tommi Rantala
2020-10-08 12:26 ` [PATCH 01/13] selftests: filter kselftest headers from command in lib.mk Tommi Rantala
2020-10-08 20:05   ` Kees Cook
2020-10-09 12:06   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 02/13] selftests: pidfd: fix compilation errors due to wait.h Tommi Rantala
2020-10-08 20:12   ` Kees Cook
2020-10-09  9:43   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 03/13] selftests: add vmaccess to .gitignore Tommi Rantala
2020-10-08 20:05   ` Kees Cook
2020-10-09 12:02   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 04/13] selftests/harness: prettify SKIP message whitespace again Tommi Rantala
2020-10-08 20:06   ` Kees Cook
2020-10-09 12:02   ` Christian Brauner
2020-10-08 12:26 ` Tommi Rantala [this message]
2020-10-09 12:03   ` [PATCH 05/13] selftests: pidfd: use ksft_test_result_skip() when skipping test Christian Brauner
2020-10-08 12:26 ` [PATCH 06/13] selftests: pidfd: skip test on kcmp() ENOSYS Tommi Rantala
2020-10-09 12:04   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 07/13] selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config Tommi Rantala
2020-10-09 12:04   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 08/13] selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c Tommi Rantala
2020-10-09 12:04   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 09/13] selftests: android: fix multiple definition of sock_name Tommi Rantala
2020-10-09 12:05   ` Christian Brauner
2020-11-05 17:14     ` Shuah Khan
2020-10-08 12:26 ` [PATCH 10/13] selftests: proc: fix warning: _GNU_SOURCE redefined Tommi Rantala
2020-10-08 12:26 ` [PATCH 11/13] selftests: core: use SKIP instead of XFAIL in close_range_test.c Tommi Rantala
2020-10-08 20:06   ` Kees Cook
2020-10-09  9:44   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 12/13] selftests: clone3: use SKIP instead of XFAIL Tommi Rantala
2020-10-08 20:06   ` Kees Cook
2020-10-09  9:44   ` Christian Brauner
2020-10-08 12:26 ` [PATCH 13/13] selftests: binderfs: " Tommi Rantala
2020-10-08 20:06   ` Kees Cook
2020-10-09  9:43   ` Christian Brauner
2020-10-09 12:07 ` [PATCH 00/13] selftests fixes Christian Brauner
2020-10-27 23:12 ` Shuah Khan
2020-10-28  1:37 ` Michael Ellerman
2020-10-28 14:31   ` Shuah Khan
2020-10-30  6:15     ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201008122633.687877-6-tommi.t.rantala@nokia.com \
    --to=tommi.t.rantala@nokia.com \
    --cc=christian@brauner.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).