known-fail test tag
v3 cover known-fail test tag
Hi,
changes v2->v3:
* new commit: testinfo.pl: Support tag values on more lines
* use URL
Petr Vorel (3):
lib: Add known-fail test tag
testinfo.pl: Support tag values on more lines ustat0{1,2}: Mark failure on Btrfs with known-fail tag
doc/c-test-api.txt | 1 + docparse/testinfo.pl | 17 ++++++++++++++++- lib/tst_test.c | 8 ++++++-- testcases/kernel/syscalls/ustat/ustat01.c | 6 ++++++ testcases/kernel/syscalls/ustat/ustat02.c | 6 ++++++ 5 files changed, 35 insertions(+), 3 deletions(-)
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 1/3 lib: Add known-fail test tag
to save test reviewers time.
--- doc/c-test-api.txt | 1 + docparse/testinfo.pl | 11 ++++++++++- lib/tst_test.c | 8 ++++++-- 3 files changed, 17 insertions(+), 3 deletions(-)
doc/c-test-api.txt +1 -0
@@ -2259,6 +2259,7 @@ struct tst_test test = { .tags = (const struct tst_tag[]) { {"linux-git", "9392a27d88b9"}, {"linux-git", "ff002b30181d"}, + {"known-fail", "ustat() is known to fail with EINVAL on Btrfs"}, {"linux-stable-git", "c4a23c852e80"}, {"CVE", "2020-29373"}, {}
docparse/testinfo.pl +10 -1
@@ -74,6 +74,10 @@ sub tag_url { return eval("main::$key") . $value; } + if ('known-fail') { + return ''; + } + die("unknown constant '$key' for tag $tag, define it!"); }
@@ -432,6 +436,7 @@ sub content_all_tests } my $k = @$tag[0]; my $v = @$tag[1]; + my $url; if (defined($$git_url{$k})) { $commits{$k} = () unless (defined($commits{$k}));
@@ -443,7 +448,11 @@ sub content_all_tests $v .= ' ("' . $commits{$k}{$v} . '")'; } - $v = html_a(tag_url($k, @$tag[1]), $v); + $url = tag_url($k, @$tag[1]); + if ($url) { + $v = html_a($url, $v); + } + $content .= "\n|" . reference($k) . "\n|$v\n"; $tmp2 = 1; }
lib/tst_test.c +6 -2
@@ -763,10 +763,13 @@ static void print_failure_hint(const char *tag, const char *hint, hint_printed =1 ;fprintf (stderr,"\n" );print_colored ("HINT: " ); -fprintf (stderr,"You _MAY_ be %s, see:\n\n" , hint); +fprintf (stderr,"You _MAY_ be %s:\n\n" , hint); } -fprintf (stderr,"%s%s\n" , url, tags[i].value); +if (url) +fprintf (stderr,"%s%s\n" , url, tags[i].value); +else +fprintf (stderr,"%s\n" , tags[i].value); } } }
@@ -779,6 +782,7 @@ static void print_failure_hints(void) LINUX_STABLE_GIT_URL);print_failure_hint ("glibc-git" ,"missing glibc fixes" ,GLIBC_GIT_URL );print_failure_hint ("CVE" ,"vulnerable to CVE(s)" ,CVE_DB_URL ); +print_failure_hint ("known-fail" ,"hit by known kernel failures" ,NULL ); }static void do_exit (int ret)
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 2/3 testinfo.pl: Support tag values on more lines
In reply to Petr Vorelif value is too long, i.e. adding URL:
.tags = (const struct tst_tag[]) {
{"known-fail", "ustat() is known to fail with EINVAL on Btrfs, see "
"https://lore.kernel.org/linux-btrfs/[email protected]/"
},
{}--- docparse/testinfo.pl | 6 ++++++ 1 file changed, 6 insertions(+)
docparse/testinfo.pl +6 -0
@@ -453,6 +453,12 @@ sub content_all_tests $v = html_a($url, $v); } + # tag value value can be split into more lines if too long + # i.e. URL in known-fail + for (@$tag[2 .. $#$tag]) { + $v .= " $_"; + } + $content .= "\n|" . reference($k) . "\n|$v\n"; $tmp2 = 1; }
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v3 3/3 ustat0{1, 2}: Mark failure on Btrfs with known-fail tag
In reply to Petr Vorelustat() has been always broken on Btrfs and it's unlikely to be fixed due ustat() being deprecated (glibc doesn't expose this system call anymore).
--- testcases/kernel/syscalls/ustat/ustat01.c | 6 ++++++ testcases/kernel/syscalls/ustat/ustat02.c | 6 ++++++ 2 files changed, 12 insertions(+)
testcases/kernel/syscalls/ustat/ustat01.c +6 -0
@@ -44,6 +44,12 @@ static void setup(void)static struct tst_test test = { .test_all = run, .setup = setup, + .tags = (const struct tst_tag []) { + {"known-fail" ,"ustat() is known to fail with EINVAL on Btrfs, see" +"https://lore.kernel.org/linux-btrfs/[email protected]/" + }, + {} + } };#else TST_TEST_TCONF ("testing ustat requires <sys/ustat.h> or <linux/types.h>" );
testcases/kernel/syscalls/ustat/ustat02.c +6 -0
@@ -63,6 +63,12 @@ static struct tst_test test = { .test = run, .setup = setup, .tcnt = ARRAY_SIZE(tc), + .tags = (const struct tst_tag []) { + {"known-fail" ,"ustat() is known to fail with EINVAL on Btrfs, see" +"https://lore.kernel.org/linux-btrfs/[email protected]/" + }, + {} + } };#else TST_TEST_TCONF ("testing ustat requires <sys/ustat.h> or <linux/types.h>" );
Signature · 5 lines
2.34.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Looks good, there may be a minor things that can be adjusted later, but I would like to get this in before the release so:
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Cyril,
Quoted 5 lines
Hi!
Looks good, there may be a minor things that can be adjusted later, but I would like to get this in before the release so:Reviewed-by Cyril Hrubis
OK, merged as is. Thanks!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp