[LTP] [PATCH 1/3] lib/tst_test.c: docparse/testinfo.pl: Add support for musl git fixes
Petr Vorel
pvorel@suse.cz
Mon Sep 25 17:13:17 CEST 2023
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).
Link: https://github.com/linux-test-project/ltp/issues/1081
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
docparse/testinfo.pl | 3 ++-
lib/tst_test.c | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/docparse/testinfo.pl b/docparse/testinfo.pl
index 67e435d79..78433c40a 100755
--- a/docparse/testinfo.pl
+++ b/docparse/testinfo.pl
@@ -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
diff --git a/lib/tst_test.c b/lib/tst_test.c
index e2c195645..179f697b7 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -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);
}
--
2.40.1
More information about the ltp
mailing list