All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v3 0/3] known-fail test tag
@ 2022-01-14 20:53 Petr Vorel
  2022-01-14 20:53 ` [LTP] [PATCH v3 1/3] lib: Add " Petr Vorel
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Petr Vorel @ 2022-01-14 20:53 UTC (permalink / raw)
  To: ltp

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(-)

-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH v3 1/3] lib: Add known-fail test tag
  2022-01-14 20:53 [LTP] [PATCH v3 0/3] known-fail test tag Petr Vorel
@ 2022-01-14 20:53 ` Petr Vorel
  2022-01-14 20:53 ` [LTP] [PATCH v3 2/3] testinfo.pl: Support tag values on more lines Petr Vorel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2022-01-14 20:53 UTC (permalink / raw)
  To: ltp

to save test reviewers time.

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 doc/c-test-api.txt   |  1 +
 docparse/testinfo.pl | 11 ++++++++++-
 lib/tst_test.c       |  8 ++++++--
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/doc/c-test-api.txt b/doc/c-test-api.txt
index 123d3f1fc9..b8bf5fc11b 100644
--- a/doc/c-test-api.txt
+++ b/doc/c-test-api.txt
@@ -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"},
 		{}
diff --git a/docparse/testinfo.pl b/docparse/testinfo.pl
index 891619532f..8712a530f8 100755
--- a/docparse/testinfo.pl
+++ b/docparse/testinfo.pl
@@ -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;
 		}
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 262626312c..844756fbd7 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -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)
-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [LTP] [PATCH v3 2/3] testinfo.pl: Support tag values on more lines
  2022-01-14 20:53 [LTP] [PATCH v3 0/3] known-fail test tag Petr Vorel
  2022-01-14 20:53 ` [LTP] [PATCH v3 1/3] lib: Add " Petr Vorel
@ 2022-01-14 20:53 ` Petr Vorel
  2022-01-14 20:53 ` [LTP] [PATCH v3 3/3] ustat0{1, 2}: Mark failure on Btrfs with known-fail tag Petr Vorel
  2022-01-17 13:12 ` [LTP] [PATCH v3 0/3] known-fail test tag Cyril Hrubis
  3 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2022-01-14 20:53 UTC (permalink / raw)
  To: ltp

if 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/e7e867b8-b57a-7eb2-2432-1627bd3a88fb@toxicpanda.com/"
	},
	{}

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 docparse/testinfo.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docparse/testinfo.pl b/docparse/testinfo.pl
index 8712a530f8..67e435d794 100755
--- a/docparse/testinfo.pl
+++ b/docparse/testinfo.pl
@@ -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;
 		}
-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [LTP] [PATCH v3 3/3] ustat0{1, 2}: Mark failure on Btrfs with known-fail tag
  2022-01-14 20:53 [LTP] [PATCH v3 0/3] known-fail test tag Petr Vorel
  2022-01-14 20:53 ` [LTP] [PATCH v3 1/3] lib: Add " Petr Vorel
  2022-01-14 20:53 ` [LTP] [PATCH v3 2/3] testinfo.pl: Support tag values on more lines Petr Vorel
@ 2022-01-14 20:53 ` Petr Vorel
  2022-01-17 13:12 ` [LTP] [PATCH v3 0/3] known-fail test tag Cyril Hrubis
  3 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2022-01-14 20:53 UTC (permalink / raw)
  To: ltp

ustat() 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).

Suggested-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/syscalls/ustat/ustat01.c | 6 ++++++
 testcases/kernel/syscalls/ustat/ustat02.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
index 0252858beb..66dbc0b184 100644
--- a/testcases/kernel/syscalls/ustat/ustat01.c
+++ b/testcases/kernel/syscalls/ustat/ustat01.c
@@ -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/e7e867b8-b57a-7eb2-2432-1627bd3a88fb@toxicpanda.com/"
+		},
+		{}
+	}
 };
 #else
 TST_TEST_TCONF("testing ustat requires <sys/ustat.h> or <linux/types.h>");
diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
index d08446eaa1..55bdcaedf8 100644
--- a/testcases/kernel/syscalls/ustat/ustat02.c
+++ b/testcases/kernel/syscalls/ustat/ustat02.c
@@ -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/e7e867b8-b57a-7eb2-2432-1627bd3a88fb@toxicpanda.com/"
+		},
+		{}
+	}
 };
 #else
 TST_TEST_TCONF("testing ustat requires <sys/ustat.h> or <linux/types.h>");
-- 
2.34.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v3 0/3] known-fail test tag
  2022-01-14 20:53 [LTP] [PATCH v3 0/3] known-fail test tag Petr Vorel
                   ` (2 preceding siblings ...)
  2022-01-14 20:53 ` [LTP] [PATCH v3 3/3] ustat0{1, 2}: Mark failure on Btrfs with known-fail tag Petr Vorel
@ 2022-01-17 13:12 ` Cyril Hrubis
  2022-01-17 15:11   ` Petr Vorel
  3 siblings, 1 reply; 6+ messages in thread
From: Cyril Hrubis @ 2022-01-17 13:12 UTC (permalink / raw)
  To: Petr Vorel; +Cc: 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:

Reviewed-by: Cyril Hrubis

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH v3 0/3] known-fail test tag
  2022-01-17 13:12 ` [LTP] [PATCH v3 0/3] known-fail test tag Cyril Hrubis
@ 2022-01-17 15:11   ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2022-01-17 15:11 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: ltp

Hi Cyril,

> 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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-17 15:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-14 20:53 [LTP] [PATCH v3 0/3] known-fail test tag Petr Vorel
2022-01-14 20:53 ` [LTP] [PATCH v3 1/3] lib: Add " Petr Vorel
2022-01-14 20:53 ` [LTP] [PATCH v3 2/3] testinfo.pl: Support tag values on more lines Petr Vorel
2022-01-14 20:53 ` [LTP] [PATCH v3 3/3] ustat0{1, 2}: Mark failure on Btrfs with known-fail tag Petr Vorel
2022-01-17 13:12 ` [LTP] [PATCH v3 0/3] known-fail test tag Cyril Hrubis
2022-01-17 15:11   ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.