bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yucong Sun <fallentree@fb.com>
To: <andrii@kernel.org>
Cc: <sunyucong@gmail.com>, <bpf@vger.kernel.org>,
	Yucong Sun <fallentree@fb.com>
Subject: [PATCH v4 bpf-next 3/4] selftests/bpf: also print test name in subtest status message
Date: Mon, 16 Aug 2021 18:03:09 -0700	[thread overview]
Message-ID: <20210817010310.2300741-4-fallentree@fb.com> (raw)
In-Reply-To: <20210817010310.2300741-1-fallentree@fb.com>

This patch add test name in subtest status message line, making it possible to
grep ':OK' in the output to generate a list of passed test+subtest names, which
can be processed to generate argument list to be used with "-a", "-d" exact
string matching.


 #1/1 align/mov:OK
 #1/12 align/pointer variable subtraction:OK
 #1 align:OK

Signed-off-by: Yucong Sun <fallentree@fb.com>
 tools/testing/selftests/bpf/test_progs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
index f0fbead40883..90539b15b744 100644
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@ -150,8 +150,8 @@ void test__end_subtest()
 	dump_test_log(test, sub_error_cnt);
-	fprintf(env.stdout, "#%d/%d %s:%s\n",
-	       test->test_num, test->subtest_num, test->subtest_name,
+	fprintf(env.stdout, "#%d/%d %s/%s:%s\n",
+	       test->test_num, test->subtest_num, test->test_name, test->subtest_name,
 	       sub_error_cnt ? "FAIL" : (test->skip_cnt ? "SKIP" : "OK"));
 	if (sub_error_cnt)

  parent reply	other threads:[~2021-08-17  1:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  1:03 [PATCH v4 bpf-next 0/4] selftests/bpf: Improve the usability of Yucong Sun
2021-08-17  1:03 ` [PATCH v4 bpf-next 1/4] selftests/bpf: skip loading bpf_testmod when using -l to list tests Yucong Sun
2021-08-17  1:03 ` [PATCH v4 bpf-next 2/4] selftests/bpf: correctly display subtest skip status Yucong Sun
2021-08-17  1:03 ` Yucong Sun [this message]
2021-08-17  1:03 ` [PATCH v4 bpf-next 4/4] selftests/bpf: Support glob matching for test selector Yucong Sun
2021-08-17  2:45   ` Andrii Nakryiko
2021-08-17  4:50     ` sunyucong
2021-08-17  2:47 ` [PATCH v4 bpf-next 0/4] selftests/bpf: Improve the usability of Andrii Nakryiko

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:

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

  git send-email \
    --in-reply-to=20210817010310.2300741-4-fallentree@fb.com \
    --to=fallentree@fb.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=sunyucong@gmail.com \


* 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).