Report clone04 failure on musl
cover Report clone04 failure on musl
This required to add musl-git support into lib.
Petr Vorel (3):
lib/tst_test.c: docparse/testinfo.pl: Add support for musl git fixes
clone04: Add musl-git tag
lib/tst_test.c: Print failure hints also for TBROK
docparse/testinfo.pl | 3 ++- lib/tst_test.c | 8 +++++++- testcases/kernel/syscalls/clone/clone04.c | 5 +++++ 3 files changed, 14 insertions(+), 2 deletions(-)
Signature · 5 lines
2.40.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH 1/3 lib/tst_test.c: docparse/testinfo.pl: Add support for musl git fixes
Similar to other git repos (linux-git, linux-stable-git, glibc-git) we need also to have support for musl fixes in tags (musl-git).
--- docparse/testinfo.pl | 3 ++- lib/tst_test.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-)
docparse/testinfo.pl +2 -1
@@ -13,12 +13,13 @@ use File::Basename qw(dirname); use constant OUTDIR => dirname(abs_path($0)); # tags which expect git tree, also need constant for URL -our @TAGS_GIT = ("linux-git", "linux-stable-git", "glibc-git"); +our @TAGS_GIT = ("linux-git", "linux-stable-git", "glibc-git", "musl-git"); # tags should map these in lib/tst_test.c use constant LINUX_GIT_URL => "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id="; use constant LINUX_STABLE_GIT_URL => "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id="; use constant GLIBC_GIT_URL => "https://sourceware.org/git/?p=glibc.git;a=commit;h="; +use constant MUSL_GIT_URL => "https://git.musl-libc.org/cgit/musl/commit/src/linux/clone.c?id="; use constant CVE_DB_URL => "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-"; sub load_json
lib/tst_test.c +4 -0
@@ -45,6 +45,7 @@ const char *TCID __attribute__((weak));#define LINUX_GIT_URL "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id="#define LINUX_STABLE_GIT_URL "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id="#define GLIBC_GIT_URL "https://sourceware.org/git/?p=glibc.git;a=commit;h=" +#define MUSL_GIT_URL "https://git.musl-libc.org/cgit/musl/commit/src/linux/clone.c?id="#define CVE_DB_URL "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-"#define DEFAULT_TIMEOUT 30
@@ -592,6 +593,8 @@ static void print_test_tags(void)fprintf (stderr,LINUX_STABLE_GIT_URL "%s\n" , tags[i].value); else if (!strcmp(tags[i].name, "glibc-git")) fprintf(stderr, GLIBC_GIT_URL "%s\n", tags[i].value); + else if (!strcmp(tags[i].name, "musl-git")) +fprintf (stderr,MUSL_GIT_URL "%s\n" , tags[i].value);else fprintf (stderr,"%s: %s\n" , tags[i].name, tags[i].value); }
@@ -855,6 +858,7 @@ static void print_failure_hints(void)print_failure_hint ("linux-stable-git" ,"missing stable kernel fixes" ,LINUX_STABLE_GIT_URL );print_failure_hint ("glibc-git" ,"missing glibc fixes" ,GLIBC_GIT_URL ); +print_failure_hint ("musl-git" ,"missing musl fixes" ,MUSL_GIT_URL );print_failure_hint ("CVE" ,"vulnerable to CVE(s)" ,CVE_DB_URL );print_failure_hint ("known-fail" ,"hit by known kernel failures" ,NULL ); }
Signature · 5 lines
2.40.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH 2/3 clone04: Add musl-git tag
In reply to Petr Vorelclone04 test fails on musl due to producing a child process with inconsistent state. The clone() function has been effectively unusable since it was added, recently musl got fix. Mark this fix.
--- testcases/kernel/syscalls/clone/clone04.c | 5 +++++ 1 file changed, 5 insertions(+)
testcases/kernel/syscalls/clone/clone04.c +5 -0
@@ -2,6 +2,7 @@/* * Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved. * Copyright (c) 2012 Wanlong Gao <[email protected]> +* Copyright (c) Linux Test Project, 2003-2023 */ /*\
@@ -44,4 +45,8 @@ static void verify_clone(unsigned int nr)static struct tst_test test = { .tcnt =ARRAY_SIZE (tcases), .test = verify_clone, + .tags = (const struct tst_tag []) { + {"musl-git" ,"fa4a8abd06a4" }, + {} + }, };
Signature · 5 lines
2.40.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
RFC PATCH 3/3 lib/tst_test.c: Print failure hints also for TBROK
In reply to Petr VorelSome kernel/libc bugs are not causing TFAIL, but also TBROK, e.g. clone04 failure on musl, which does:
tst_test.c:1632: TBROK: Test killed by SIGSEGV!
--- lib/tst_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/tst_test.c +3 -1
@@ -880,8 +880,10 @@ static void do_exit(int ret)if (results->warnings) ret |=TWARN ; -if (results->broken) +if (results->broken) { ret |=TBROK ; +print_failure_hints (); + }fprintf (stderr,"\nSummary:\n" );fprintf (stderr,"passed %d\n" , results->passed);
Signature · 5 lines
2.40.1 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Am Montag, 25. September 2023, 17:13:16 CEST schrieb Petr Vorel:
Quoted 11 lines
This required to add musl-git support into lib.
Petr Vorel (3):
lib/tst_test.c:docparse/testinfo.pl: Add support for musl git fixes
clone04: Add musl-git tag
lib/tst_test.c: Print failure hints also for TBROKdocparse/testinfo.pl | 3 ++- lib/tst_test.c | 8 +++++++- testcases/kernel/syscalls/clone/clone04.c | 5 +++++ 3 files changed, 14 insertions(+), 2 deletions(-)
Looks good to me.
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Looks good to me.
I suppose that this is pre-release fix and should go in now.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi all,
thanks for your review, merged.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp