* [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve
@ 2026-06-24 9:18 Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 01/13] tst_test: Add may_kmemleak flag and annotate tests Cyril Hrubis
` (10 more replies)
0 siblings, 11 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
This patchset is mostly preparation for the runtest file generator. We
add two more fields to the tst_test structure. Rewrite tests to new
libraries etc. But it also fixes bugs in the build system. These
patches should go in regardless of the last patch that introduces the
runtest file generator.
Once the runtest generator is merged we can easily add more. e.g.
syscalls-ipc. However the main point of these changes is to have the
complete information on how to filter and run tests in the metadata so
that we can add advanced filtering and features to the kirk test runner.
Or eventually that people can generate their own runtest files on demand
based on the JSON metadata with their own scripts and rules.
Cyril Hrubis (13):
tst_test: Add may_kmemleak flag and annotate tests
keyctl01.sh: Rewrite to the new shell library
keyctl01.sh: Remove the keyctl subcommand check
tst_run_shell: Add support for groups in the env JSON
vma05.sh, keyctl01.sh: Add groups
mem/ksm05: Add proper runtime support
mem/thp01: Add proper runtime support
lib: tst_test: Move the iterations to struct tst_test
syscalls/setsockopt08: Add .iterations = 100
testcases: Fix the CVE tags
build: rules.mk: Fix HOST_MAKE_TARGET rule
mem: vma03: Rewrite to the new test library
metadata: Add runtest file generator
include/mk/rules.mk | 4 +-
include/tst_test.h | 10 +-
lib/tst_test.c | 8 +-
metadata/.gitignore | 1 +
metadata/Makefile | 10 +-
metadata/genruntest.c | 292 ++++++++++++++++++
metadata/metaparse.c | 1 +
runtest/.gitignore | 1 +
runtest/cve | 100 ------
runtest/mm | 4 +-
testcases/commands/keyctl/keyctl01.sh | 89 ++----
testcases/cve/cve-2022-4378.c | 1 +
testcases/cve/cve-2025-21756.c | 1 +
testcases/cve/cve-2025-38236.c | 1 +
testcases/kernel/containers/userns/userns08.c | 2 +-
testcases/kernel/crypto/af_alg08.c | 1 +
testcases/kernel/mem/ksm/ksm05.c | 27 +-
testcases/kernel/mem/thp/thp01.c | 11 +-
testcases/kernel/mem/vma/vma03.c | 189 +++++-------
testcases/kernel/mem/vma/vma05.sh | 3 +
testcases/kernel/pty/pty04.c | 2 +-
.../kernel/security/dirtypipe/dirtypipe.c | 2 +-
testcases/kernel/syscalls/bpf/bpf_prog05.c | 2 +-
testcases/kernel/syscalls/bpf/bpf_prog06.c | 2 +-
testcases/kernel/syscalls/bpf/bpf_prog07.c | 2 +-
.../kernel/syscalls/fsconfig/fsconfig03.c | 1 +
.../gethostbyname_r/gethostbyname_r01.c | 2 +-
.../kernel/syscalls/io_uring/io_uring04.c | 1 +
testcases/kernel/syscalls/kill/kill13.c | 2 +-
.../perf_event_open/perf_event_open03.c | 1 +
.../syscalls/set_mempolicy/set_mempolicy05.c | 2 +-
.../kernel/syscalls/setsockopt/setsockopt03.c | 2 +-
.../kernel/syscalls/setsockopt/setsockopt08.c | 1 +
testcases/lib/tst_run_shell.c | 18 +-
testcases/network/sockets/vsock01.c | 2 +-
testcases/network/sockets/xfrm01.c | 1 +
testcases/network/sockets/xfrm02.c | 1 +
testcases/network/sockets/xfrm03.c | 1 +
38 files changed, 490 insertions(+), 311 deletions(-)
create mode 100644 metadata/genruntest.c
create mode 100644 runtest/.gitignore
delete mode 100644 runtest/cve
mode change 100644 => 100755 testcases/commands/keyctl/keyctl01.sh
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* [LTP] [PATCH 01/13] tst_test: Add may_kmemleak flag and annotate tests
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 10:38 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 02/13] keyctl01.sh: Rewrite to the new shell library Cyril Hrubis
` (9 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
This information was so far recoded only in the comment in the cve
runtest file. Move it to the test so that it appears in the metadata.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
include/tst_test.h | 6 +++++-
metadata/metaparse.c | 1 +
testcases/cve/cve-2022-4378.c | 1 +
testcases/cve/cve-2025-21756.c | 1 +
testcases/cve/cve-2025-38236.c | 1 +
testcases/kernel/crypto/af_alg08.c | 1 +
testcases/kernel/syscalls/fsconfig/fsconfig03.c | 1 +
testcases/kernel/syscalls/io_uring/io_uring04.c | 1 +
.../kernel/syscalls/perf_event_open/perf_event_open03.c | 1 +
testcases/network/sockets/xfrm01.c | 1 +
testcases/network/sockets/xfrm02.c | 1 +
testcases/network/sockets/xfrm03.c | 1 +
12 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/tst_test.h b/include/tst_test.h
index c69362485..4afe4cbe0 100644
--- a/include/tst_test.h
+++ b/include/tst_test.h
@@ -353,6 +353,10 @@ struct tst_fs {
* needed for tests that need to create device files since tmpfs
* at /tmp is usually mounted with 'nodev' option.
*
+ * @may_kmemleak: If set the test may cause a kernel memory leak. If such test
+ * fails it's a good idea to reboot before continuing with
+ * subsequent testcases.
+ *
* @restore_wallclock: Saves wall clock at the start of the test and restores
* it at the end with the help of monotonic timers.
* Testcases that modify system wallclock use this to
@@ -575,7 +579,7 @@ struct tst_fs {
unsigned int skip_in_lockdown:1;
unsigned int skip_in_secureboot:1;
unsigned int skip_in_compat:1;
-
+ unsigned int may_kmemleak:1;
int needs_abi_bits;
diff --git a/metadata/metaparse.c b/metadata/metaparse.c
index a0f94511d..532cbe405 100644
--- a/metadata/metaparse.c
+++ b/metadata/metaparse.c
@@ -1141,6 +1141,7 @@ static struct typemap tst_test_typemap[] = {
{.id = "needs_hugetlbfs", .type = DATA_BOOL},
{.id = "needs_cgroup_nsdelegate", .type = DATA_BOOL},
{.id = "needs_cmds", .child = needs_cmds_typemap},
+ {.id = "may_kmemleak", .type = DATA_BOOL},
{}
};
diff --git a/testcases/cve/cve-2022-4378.c b/testcases/cve/cve-2022-4378.c
index 1cb8ea76c..8213d1b20 100644
--- a/testcases/cve/cve-2022-4378.c
+++ b/testcases/cve/cve-2022-4378.c
@@ -86,6 +86,7 @@ static struct tst_test test = {
.tcnt = ARRAY_SIZE(testcase_list),
.setup = setup,
.cleanup = cleanup,
+ .may_kmemleak = 1,
.taint_check = TST_TAINT_W | TST_TAINT_D,
.needs_kconfigs = (const char *[]) {
"CONFIG_USER_NS=y",
diff --git a/testcases/cve/cve-2025-21756.c b/testcases/cve/cve-2025-21756.c
index 80fb84c47..edc6b2aa5 100644
--- a/testcases/cve/cve-2025-21756.c
+++ b/testcases/cve/cve-2025-21756.c
@@ -87,6 +87,7 @@ static void run(void)
static struct tst_test test = {
.test_all = run,
.taint_check = TST_TAINT_W | TST_TAINT_D,
+ .may_kmemleak = 1,
.tags = (const struct tst_tag[]) {
{"linux-git", "fcdd2242c023"},
{"CVE", "2025-21756"},
diff --git a/testcases/cve/cve-2025-38236.c b/testcases/cve/cve-2025-38236.c
index 16582fe64..f6199c06b 100644
--- a/testcases/cve/cve-2025-38236.c
+++ b/testcases/cve/cve-2025-38236.c
@@ -88,6 +88,7 @@ static struct tst_test test = {
.test_all = run,
.setup = setup,
.cleanup = cleanup,
+ .may_kmemleak = 1,
.needs_kconfigs = (const char *[]) {
"CONFIG_AF_UNIX_OOB=y",
NULL
diff --git a/testcases/kernel/crypto/af_alg08.c b/testcases/kernel/crypto/af_alg08.c
index 937ab1758..2de7aba97 100644
--- a/testcases/kernel/crypto/af_alg08.c
+++ b/testcases/kernel/crypto/af_alg08.c
@@ -159,6 +159,7 @@ static struct tst_test test = {
.test_all = run,
.cleanup = cleanup,
.needs_tmpdir = 1,
+ .may_kmemleak = 1,
.tags = (const struct tst_tag[]) {
{"linux-git", "a664bf3d603d"},
{"CVE", "2026-31431"},
diff --git a/testcases/kernel/syscalls/fsconfig/fsconfig03.c b/testcases/kernel/syscalls/fsconfig/fsconfig03.c
index 43fd4c4a8..68f073836 100644
--- a/testcases/kernel/syscalls/fsconfig/fsconfig03.c
+++ b/testcases/kernel/syscalls/fsconfig/fsconfig03.c
@@ -88,6 +88,7 @@ static struct tst_test test = {
.format_device = 1,
.mntpoint = MNTPOINT,
.all_filesystems = 1,
+ .may_kmemleak = 1,
.taint_check = TST_TAINT_W | TST_TAINT_D,
.skip_filesystems = (const char *const []){"fuse", NULL},
.tags = (const struct tst_tag[]) {
diff --git a/testcases/kernel/syscalls/io_uring/io_uring04.c b/testcases/kernel/syscalls/io_uring/io_uring04.c
index 026caf334..f3b44749e 100644
--- a/testcases/kernel/syscalls/io_uring/io_uring04.c
+++ b/testcases/kernel/syscalls/io_uring/io_uring04.c
@@ -344,6 +344,7 @@ static struct tst_test test = {
.timeout = 60,
.forks_child = 1,
.taint_check = TST_TAINT_W | TST_TAINT_D,
+ .may_kmemleak = 1,
.needs_kconfigs = (const char *[]) {
"CONFIG_RDS",
"CONFIG_RDS_TCP",
diff --git a/testcases/kernel/syscalls/perf_event_open/perf_event_open03.c b/testcases/kernel/syscalls/perf_event_open/perf_event_open03.c
index 389cc3511..cfd563d81 100644
--- a/testcases/kernel/syscalls/perf_event_open/perf_event_open03.c
+++ b/testcases/kernel/syscalls/perf_event_open/perf_event_open03.c
@@ -127,6 +127,7 @@ static struct tst_test test = {
.setup = setup,
.cleanup = cleanup,
.needs_root = 1,
+ .may_kmemleak = 1,
.runtime = 300,
.tags = (const struct tst_tag[]) {
{"linux-git", "7bdb157cdebb"},
diff --git a/testcases/network/sockets/xfrm01.c b/testcases/network/sockets/xfrm01.c
index 2ca77c40f..33905f2a6 100644
--- a/testcases/network/sockets/xfrm01.c
+++ b/testcases/network/sockets/xfrm01.c
@@ -261,6 +261,7 @@ static struct tst_test test = {
.setup = setup,
.cleanup = cleanup,
.needs_tmpdir = 1,
+ .may_kmemleak = 1,
.needs_kconfigs = (const char *[]) {
"CONFIG_USER_NS=y",
"CONFIG_NET_NS=y",
diff --git a/testcases/network/sockets/xfrm02.c b/testcases/network/sockets/xfrm02.c
index cef9e7060..f99b7b53a 100644
--- a/testcases/network/sockets/xfrm02.c
+++ b/testcases/network/sockets/xfrm02.c
@@ -251,6 +251,7 @@ static struct tst_test test = {
.cleanup = cleanup,
.needs_tmpdir = 1,
.forks_child = 1,
+ .may_kmemleak = 1,
.needs_kconfigs = (const char *[]) {
"CONFIG_USER_NS=y",
"CONFIG_NET_NS=y",
diff --git a/testcases/network/sockets/xfrm03.c b/testcases/network/sockets/xfrm03.c
index 676c76e2b..2c83e3ae3 100644
--- a/testcases/network/sockets/xfrm03.c
+++ b/testcases/network/sockets/xfrm03.c
@@ -342,6 +342,7 @@ static struct tst_test test = {
.cleanup = cleanup,
.needs_tmpdir = 1,
.forks_child = 1,
+ .may_kmemleak = 1,
.needs_kconfigs = (const char *[]) {
"CONFIG_USER_NS=y",
"CONFIG_NET_NS=y",
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 02/13] keyctl01.sh: Rewrite to the new shell library
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 01/13] tst_test: Add may_kmemleak flag and annotate tests Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 9:59 ` Andrea Cervesato via ltp
2026-06-24 10:57 ` [LTP] tst_test: Add may_kmemleak flag and annotate tests linuxtestproject.agent
2026-06-24 9:18 ` [LTP] [PATCH 03/13] keyctl01.sh: Remove the keyctl subcommand check Cyril Hrubis
` (8 subsequent siblings)
10 siblings, 2 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
No functional changes.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/commands/keyctl/keyctl01.sh | 55 +++++++++++++++------------
1 file changed, 30 insertions(+), 25 deletions(-)
mode change 100644 => 100755 testcases/commands/keyctl/keyctl01.sh
diff --git a/testcases/commands/keyctl/keyctl01.sh b/testcases/commands/keyctl/keyctl01.sh
old mode 100644
new mode 100755
index 7b357a71e..cdbb8bf8b
--- a/testcases/commands/keyctl/keyctl01.sh
+++ b/testcases/commands/keyctl/keyctl01.sh
@@ -2,22 +2,36 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2017 Fujitsu Ltd.
# Ported: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
+# Copyright (c) 2026 Cyril Hrubis <chrubis@suse.cz>
#
-# This is a regression test about potential uninitialized variable,
-# the test can crash the buggy kernel, and the bug has been fixed in:
+# ---
+# doc
#
-# commit 38327424b40bcebe2de92d07312c89360ac9229a
-# Author: Dan Carpenter <dan.carpenter@oracle.com>
-# Date: Thu Jun 16 15:48:57 2016 +0100
+# This is a regression test for a potential uninitialized variable in
+# key_reject_and_link(). The test can crash the buggy kernel.
+# ---
#
-# KEYS: potential uninitialized variable
+# ---
+# env
+# {
+# "needs_root": true,
+# "needs_tmpdir": true,
+# "needs_cmds": [
+# {"cmd": "keyctl"}
+# ],
+# "save_restore": [
+# ["/proc/sys/kernel/keys/root_maxbytes", null, "TCONF"]
+# ],
+# "tags": [
+# ["linux-git", "38327424b40bcebe2de92d07312c89360ac9229a"],
+# ["CVE", "2016-4470"]
+# ]
+# }
+# ---
+
+. tst_loader.sh
TST_SETUP=setup
-TST_CLEANUP=cleanup
-TST_TESTFUNC=do_test
-TST_NEEDS_ROOT=1
-TST_NEEDS_TMPDIR=1
-TST_NEEDS_CMDS="keyctl"
check_keyctl()
{
@@ -53,26 +67,18 @@ setup()
check_keyctl negate request2 show unlink
PATH_KEYSTAT="/proc/key-users"
- PATH_KEYQUOTA="/proc/sys/kernel/keys/root_maxbytes"
- if [ ! -f "$PATH_KEYSTAT" ] || [ ! -f "$PATH_KEYQUOTA" ]; then
- tst_brk TCONF "'${PATH_KEYSTAT}' or '${PATH_KEYQUOTA}' \
- does not exist"
+ if [ ! -f "$PATH_KEYSTAT" ]; then
+ tst_brk TCONF "'${PATH_KEYSTAT}' does not exist"
fi
ORIG_KEYSZ=`awk -F' +|/' '/ 0:/ {print $8}' $PATH_KEYSTAT`
- ORIG_MAXKEYSZ=`cat $PATH_KEYQUOTA`
}
-cleanup()
+tst_test()
{
- if [ -n "$ORIG_MAXKEYSZ" ]; then
- echo $ORIG_MAXKEYSZ >$PATH_KEYQUOTA
- fi
-}
+ PATH_KEYQUOTA="/proc/sys/kernel/keys/root_maxbytes"
-do_test()
-{
local quota_excd=0
local maxkeysz=$((ORIG_KEYSZ + 100))
@@ -108,5 +114,4 @@ do_test()
tst_res TPASS "Bug not reproduced"
}
-. tst_test.sh
-tst_run
+. tst_run.sh
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 03/13] keyctl01.sh: Remove the keyctl subcommand check
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 01/13] tst_test: Add may_kmemleak flag and annotate tests Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 02/13] keyctl01.sh: Rewrite to the new shell library Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 10:38 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 04/13] tst_run_shell: Add support for groups in the env JSON Cyril Hrubis
` (7 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
The test was introduced 10 years ago and the functionality is now
present on all supported distributions.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/commands/keyctl/keyctl01.sh | 31 ---------------------------
1 file changed, 31 deletions(-)
diff --git a/testcases/commands/keyctl/keyctl01.sh b/testcases/commands/keyctl/keyctl01.sh
index cdbb8bf8b..514b6b8bf 100755
--- a/testcases/commands/keyctl/keyctl01.sh
+++ b/testcases/commands/keyctl/keyctl01.sh
@@ -33,39 +33,8 @@
TST_SETUP=setup
-check_keyctl()
-{
- local nosup
- for op in $@; do
- nosup=0
-
- if ! keyctl 2>&1 | grep -q "keyctl $op"; then
- nosup=1
- fi
-
- if [ "$op" = "request2" ]; then
- local key=`keyctl request2 user debug:foo bar`
- if [ $? -ne 0 ]; then
- nosup=1
- fi
- fi
-
- if [ "$op" = "unlink" ]; then
- if ! keyctl unlink $key @s; then
- nosup=1
- fi
- fi
-
- if [ $nosup -ne 0 ]; then
- tst_brk TCONF "keyctl operation $op not supported"
- fi
- done
-}
-
setup()
{
- check_keyctl negate request2 show unlink
-
PATH_KEYSTAT="/proc/key-users"
if [ ! -f "$PATH_KEYSTAT" ]; then
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 04/13] tst_run_shell: Add support for groups in the env JSON
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
` (2 preceding siblings ...)
2026-06-24 9:18 ` [LTP] [PATCH 03/13] keyctl01.sh: Remove the keyctl subcommand check Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups Cyril Hrubis
` (6 subsequent siblings)
10 siblings, 0 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
If present we assert that the groups is an array of strings but we don't
use the value since it's not used by the test itself. With that we can
add groups to the shell tests and they will end up being carried on to
the metadata.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/lib/tst_run_shell.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/testcases/lib/tst_run_shell.c b/testcases/lib/tst_run_shell.c
index 2778fb6d5..fa893304a 100644
--- a/testcases/lib/tst_run_shell.c
+++ b/testcases/lib/tst_run_shell.c
@@ -57,6 +57,7 @@ enum test_attr_ids {
DEV_MIN_SIZE,
FILESYSTEMS,
FORMAT_DEVICE,
+ GROUPS,
MIN_CPUS,
MIN_MEM_AVAIL,
MIN_KVER,
@@ -91,6 +92,7 @@ static ujson_obj_attr test_attrs[] = {
UJSON_OBJ_ATTR_IDX(DEV_MIN_SIZE, "dev_min_size", UJSON_INT),
UJSON_OBJ_ATTR_IDX(FILESYSTEMS, "filesystems", UJSON_ARR),
UJSON_OBJ_ATTR_IDX(FORMAT_DEVICE, "format_device", UJSON_BOOL),
+ UJSON_OBJ_ATTR_IDX(GROUPS, "groups", UJSON_ARR),
UJSON_OBJ_ATTR_IDX(MIN_CPUS, "min_cpus", UJSON_INT),
UJSON_OBJ_ATTR_IDX(MIN_MEM_AVAIL, "min_mem_avail", UJSON_INT),
UJSON_OBJ_ATTR_IDX(MIN_KVER, "min_kver", UJSON_STR),
@@ -125,7 +127,7 @@ static ujson_obj test_obj = {
.attr_cnt = UJSON_ARRAY_SIZE(test_attrs),
};
-static const char *const *parse_strarr(ujson_reader *reader, ujson_val *val)
+static const char *const *parse_strarr(ujson_reader *reader, ujson_val *val, bool alloc)
{
unsigned int cnt = 0, i = 0;
char **ret;
@@ -141,6 +143,9 @@ static const char *const *parse_strarr(ujson_reader *reader, ujson_val *val)
cnt++;
}
+ if (!alloc)
+ return NULL;
+
ujson_reader_state_load(reader, state);
ret = SAFE_MALLOC(sizeof(char *) * (cnt + 1));
@@ -242,7 +247,7 @@ static struct tst_fs *parse_filesystems(ujson_reader *reader, ujson_val *val)
UJSON_OBJ_FOREACH_FILTER(reader, val, &fs_obj, ujson_empty_obj) {
switch ((enum fs_ids)val->idx) {
case MKFS_OPTS:
- ret[i].mkfs_opts = parse_strarr(reader, val);
+ ret[i].mkfs_opts = parse_strarr(reader, val, true);
break;
case MKFS_SIZE_OPT:
ret[i].mkfs_size_opt = strdup(val->val_str);
@@ -462,6 +467,9 @@ static void parse_metadata(void)
case FORMAT_DEVICE:
test.format_device = val.val_bool;
break;
+ case GROUPS:
+ parse_strarr(&reader, &val, false);
+ break;
case MIN_CPUS:
if (val.val_int <= 0)
ujson_err(&reader, "Minimal number of cpus must be > 0");
@@ -514,7 +522,7 @@ static void parse_metadata(void)
test.needs_hugetlbfs = val.val_bool;
break;
case NEEDS_KCONFIGS:
- test.needs_kconfigs = parse_strarr(&reader, &val);
+ test.needs_kconfigs = parse_strarr(&reader, &val, true);
break;
case NEEDS_ROFS:
test.needs_rofs = val.val_bool;
@@ -538,7 +546,7 @@ static void parse_metadata(void)
test.save_restore = parse_save_restore(&reader, &val);
break;
case SKIP_FILESYSTEMS:
- test.skip_filesystems = parse_strarr(&reader, &val);
+ test.skip_filesystems = parse_strarr(&reader, &val, true);
break;
case SKIP_IN_COMPAT:
test.skip_in_compat = val.val_bool;
@@ -550,7 +558,7 @@ static void parse_metadata(void)
test.skip_in_secureboot = val.val_bool;
break;
case SUPPORTED_ARCHS:
- test.supported_archs = parse_strarr(&reader, &val);
+ test.supported_archs = parse_strarr(&reader, &val, true);
break;
case TAGS:
test.tags = parse_tags(&reader, &val);
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
` (3 preceding siblings ...)
2026-06-24 9:18 ` [LTP] [PATCH 04/13] tst_run_shell: Add support for groups in the env JSON Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 10:42 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 06/13] mem/ksm05: Add proper runtime support Cyril Hrubis
` (5 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
Unlike the C library the shell metadata parser does not process the
JSON, hence the tags are added manually.
Since we have just a few shell tests, automatic group discovery is not
worth the effort. If we get more shell tests we will need to rewrite the
shell metadata parser to load the JSON into a memory, modify it, and
then save it.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/commands/keyctl/keyctl01.sh | 3 +++
testcases/kernel/mem/vma/vma05.sh | 3 +++
2 files changed, 6 insertions(+)
diff --git a/testcases/commands/keyctl/keyctl01.sh b/testcases/commands/keyctl/keyctl01.sh
index 514b6b8bf..2b2244fae 100755
--- a/testcases/commands/keyctl/keyctl01.sh
+++ b/testcases/commands/keyctl/keyctl01.sh
@@ -22,6 +22,9 @@
# "save_restore": [
# ["/proc/sys/kernel/keys/root_maxbytes", null, "TCONF"]
# ],
+# "groups": [
+# "keyctl", "cve", "regression"
+# ],
# "tags": [
# ["linux-git", "38327424b40bcebe2de92d07312c89360ac9229a"],
# ["CVE", "2016-4470"]
diff --git a/testcases/kernel/mem/vma/vma05.sh b/testcases/kernel/mem/vma/vma05.sh
index b9654e80c..497abf34f 100755
--- a/testcases/kernel/mem/vma/vma05.sh
+++ b/testcases/kernel/mem/vma/vma05.sh
@@ -34,6 +34,9 @@
# "cmd": "uname"
# }
# ],
+# "groups": [
+# "vsyscall", "regression"
+# ],
# "save_restore": [
# ["/proc/sys/kernel/core_pattern", "core", "TBROK"],
# ["/proc/sys/kernel/core_uses_pid", "0", "TBROK"]
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 06/13] mem/ksm05: Add proper runtime support
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
` (4 preceding siblings ...)
2026-06-24 9:18 ` [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 12:04 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 08/13] lib: tst_test: Move the iterations to struct tst_test Cyril Hrubis
` (4 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
The test was executed with -I 10 in all instances. It's cleaner to
define the min_runtime in the test and loop the test function until it's
exhausted.
One of the bonuses we get from this conversion is that the TPASS message
is printed once at the end of the test and we do not flood the logs.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
runtest/cve | 2 +-
runtest/mm | 2 +-
testcases/kernel/mem/ksm/ksm05.c | 27 ++++++++++++++++-----------
3 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/runtest/cve b/runtest/cve
index cc664bb93..789e16aac 100644
--- a/runtest/cve
+++ b/runtest/cve
@@ -1,6 +1,6 @@
# Tests which check for vulnerabilities by CVE number
cve-2011-0999 thp01 -I 120
-cve-2011-2183 ksm05 -I 10
+cve-2011-2183 ksm05
cve-2011-2496 vma03
cve-2012-0957 uname04
cve-2014-0196 cve-2014-0196
diff --git a/runtest/mm b/runtest/mm
index 7d75b65c8..98ec0a4c4 100644
--- a/runtest/mm
+++ b/runtest/mm
@@ -60,7 +60,7 @@ ksm03 ksm03
ksm03_1 ksm03 -u 128
ksm04 ksm04
ksm04_1 ksm04 -u 128
-ksm05 ksm05 -I 10
+ksm05 ksm05
ksm06 ksm06
ksm06_1 ksm06 -n 10
ksm06_2 ksm06 -n 8000
diff --git a/testcases/kernel/mem/ksm/ksm05.c b/testcases/kernel/mem/ksm/ksm05.c
index 35197914e..0faba54b6 100644
--- a/testcases/kernel/mem/ksm/ksm05.c
+++ b/testcases/kernel/mem/ksm/ksm05.c
@@ -57,15 +57,6 @@ static void test_ksm(void)
long ps;
pid_t pid;
void *ptr;
- struct sigaction sa;
-
- memset (&sa, '\0', sizeof(sa));
- sa.sa_handler = sighandler;
- sa.sa_flags = 0;
- TEST(sigaction(SIGSEGV, &sa, NULL));
- if (TST_RET == -1)
- tst_brk(TBROK | TRERRNO,
- "SIGSEGV signal setup failed");
ps = sysconf(_SC_PAGESIZE);
@@ -80,7 +71,20 @@ static void test_ksm(void)
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
tst_brk(TBROK, "invalid signal received: %d", status);
- tst_res(TPASS, "still alive.");
+}
+
+static void run(void)
+{
+ struct sigaction sa = {
+ .sa_handler = sighandler
+ };
+
+ SAFE_SIGACTION(SIGSEGV, &sa, NULL);
+
+ while (tst_remaining_runtime())
+ test_ksm();
+
+ tst_res(TPASS, "Still alive");
}
static void sighandler(int sig)
@@ -91,7 +95,8 @@ static void sighandler(int sig)
static struct tst_test test = {
.needs_root = 1,
.forks_child = 1,
- .test_all = test_ksm,
+ .test_all = run,
+ .min_runtime = 10,
.save_restore = (const struct tst_path_val[]) {
{PATH_MM_KSM_RUN, "1", TST_SR_TBROK},
{PATH_MM_KSM_SMART_SCAN, "0",
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 08/13] lib: tst_test: Move the iterations to struct tst_test
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
` (5 preceding siblings ...)
2026-06-24 9:18 ` [LTP] [PATCH 06/13] mem/ksm05: Add proper runtime support Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 12:05 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 10/13] testcases: Fix the CVE tags Cyril Hrubis
` (3 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
This allows us to set the default number of iterations in the tst_test
structure.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
include/tst_test.h | 4 ++++
lib/tst_test.c | 8 +++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/include/tst_test.h b/include/tst_test.h
index 4afe4cbe0..6befb7787 100644
--- a/include/tst_test.h
+++ b/include/tst_test.h
@@ -478,6 +478,9 @@ struct tst_fs {
* probabilistic or fuzzy synchronization tests).
* If not set, a default minimum of 1 second is enforced.
*
+ * @iterations: The default value for the number of test iterations, i.e. the
+ * -i command line parameter.
+ *
* @setup: Setup callback is called once at the start of the test in order to
* prepare the test environment.
*
@@ -608,6 +611,7 @@ struct tst_fs {
int timeout;
int runtime;
int min_runtime;
+ unsigned int iterations;
void (*setup)(void);
void (*cleanup)(void);
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 5c3607016..e1166c0c6 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -64,7 +64,6 @@ const char *TCID __attribute__((weak));
struct tst_test *tst_test;
static const char *tcid;
-static int iterations = 1;
static float duration = -1;
static float timeout_mul = -1;
static int reproducible_output;
@@ -834,7 +833,7 @@ static void parse_opts(int argc, char *argv[])
print_test_tags();
exit(0);
case 'i':
- iterations = SAFE_STRTOL(optarg, 0, INT_MAX);
+ tst_test->iterations = SAFE_STRTOL(optarg, 0, UINT_MAX);
break;
case 'I':
if (tst_test->runtime > 0)
@@ -1484,6 +1483,9 @@ static void do_setup(int argc, char *argv[])
}
}
+ if (tst_test->iterations == 0)
+ tst_test->iterations = 1;
+
if (tst_test->mount_device)
tst_test->format_device = 1;
@@ -1770,7 +1772,7 @@ static void testrun(void)
for (;;) {
cont = 0;
- if (i < (unsigned int)iterations) {
+ if (i < tst_test->iterations) {
i++;
cont = 1;
}
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 10/13] testcases: Fix the CVE tags
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
` (6 preceding siblings ...)
2026-06-24 9:18 ` [LTP] [PATCH 08/13] lib: tst_test: Move the iterations to struct tst_test Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 12:05 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 11/13] build: rules.mk: Fix HOST_MAKE_TARGET rule Cyril Hrubis
` (2 subsequent siblings)
10 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
The tags should be in the format year-seq. With the CVE prefix our
tolling is broken e.g. tst_test.c prints wrong URLs.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/containers/userns/userns08.c | 2 +-
testcases/kernel/pty/pty04.c | 2 +-
testcases/kernel/security/dirtypipe/dirtypipe.c | 2 +-
testcases/kernel/syscalls/bpf/bpf_prog05.c | 2 +-
testcases/kernel/syscalls/bpf/bpf_prog06.c | 2 +-
testcases/kernel/syscalls/bpf/bpf_prog07.c | 2 +-
testcases/kernel/syscalls/gethostbyname_r/gethostbyname_r01.c | 2 +-
testcases/kernel/syscalls/kill/kill13.c | 2 +-
testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c | 2 +-
testcases/kernel/syscalls/setsockopt/setsockopt03.c | 2 +-
testcases/network/sockets/vsock01.c | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/testcases/kernel/containers/userns/userns08.c b/testcases/kernel/containers/userns/userns08.c
index 2ee4da558..4196bb064 100644
--- a/testcases/kernel/containers/userns/userns08.c
+++ b/testcases/kernel/containers/userns/userns08.c
@@ -139,7 +139,7 @@ static struct tst_test test = {
},
.tags = (const struct tst_tag[]) {
{"linux-git", "d2f007dbe7e4"},
- {"CVE", "CVE-2018-18955"},
+ {"CVE", "2018-18955"},
{}
},
};
diff --git a/testcases/kernel/pty/pty04.c b/testcases/kernel/pty/pty04.c
index 8bd1bfff5..b23cc0a9d 100644
--- a/testcases/kernel/pty/pty04.c
+++ b/testcases/kernel/pty/pty04.c
@@ -494,7 +494,7 @@ static struct tst_test test = {
.needs_root = 1,
.tags = (const struct tst_tag[]){
{"linux-git", "b9258a2cece4ec1f020715fe3554bc2e360f6264"},
- {"CVE", "CVE-2020-11494"},
+ {"CVE", "2020-11494"},
{}
}
};
diff --git a/testcases/kernel/security/dirtypipe/dirtypipe.c b/testcases/kernel/security/dirtypipe/dirtypipe.c
index 981793e64..a1bbe9465 100644
--- a/testcases/kernel/security/dirtypipe/dirtypipe.c
+++ b/testcases/kernel/security/dirtypipe/dirtypipe.c
@@ -164,7 +164,7 @@ static struct tst_test test = {
},
.tags = (const struct tst_tag[]) {
{"linux-git", "9d2231c5d74e"},
- {"CVE", "CVE-2022-0847"},
+ {"CVE", "2022-0847"},
{},
}
};
diff --git a/testcases/kernel/syscalls/bpf/bpf_prog05.c b/testcases/kernel/syscalls/bpf/bpf_prog05.c
index 05cb34e13..6412ca205 100644
--- a/testcases/kernel/syscalls/bpf/bpf_prog05.c
+++ b/testcases/kernel/syscalls/bpf/bpf_prog05.c
@@ -210,7 +210,7 @@ static struct tst_test test = {
{"linux-git", "468f6eafa6c4"},
{"linux-git", "e88b2c6e5a4d"},
{"linux-git", "9b00f1b78809"},
- {"CVE", "CVE-2021-3444"},
+ {"CVE", "2021-3444"},
{}
}
};
diff --git a/testcases/kernel/syscalls/bpf/bpf_prog06.c b/testcases/kernel/syscalls/bpf/bpf_prog06.c
index f701e9599..830159427 100644
--- a/testcases/kernel/syscalls/bpf/bpf_prog06.c
+++ b/testcases/kernel/syscalls/bpf/bpf_prog06.c
@@ -149,7 +149,7 @@ static struct tst_test test = {
},
.tags = (const struct tst_tag[]) {
{"linux-git", "64620e0a1e71"},
- {"CVE", "CVE-2021-4204"},
+ {"CVE", "2021-4204"},
{}
}
};
diff --git a/testcases/kernel/syscalls/bpf/bpf_prog07.c b/testcases/kernel/syscalls/bpf/bpf_prog07.c
index e3bf6e7cc..d82f97faf 100644
--- a/testcases/kernel/syscalls/bpf/bpf_prog07.c
+++ b/testcases/kernel/syscalls/bpf/bpf_prog07.c
@@ -153,7 +153,7 @@ static struct tst_test test = {
},
.tags = (const struct tst_tag[]) {
{"linux-git", "64620e0a1e71"},
- {"CVE", "CVE-2022-23222"},
+ {"CVE", "2022-23222"},
{}
}
};
diff --git a/testcases/kernel/syscalls/gethostbyname_r/gethostbyname_r01.c b/testcases/kernel/syscalls/gethostbyname_r/gethostbyname_r01.c
index e4c0cb716..73bf5da99 100644
--- a/testcases/kernel/syscalls/gethostbyname_r/gethostbyname_r01.c
+++ b/testcases/kernel/syscalls/gethostbyname_r/gethostbyname_r01.c
@@ -56,7 +56,7 @@ static struct tst_test test = {
.test_all = check_vulnerable,
.tags = (const struct tst_tag[]) {
{"glibc-git", "d5dd6189d506"},
- {"CVE", "CVE-2015-0235"},
+ {"CVE", "2015-0235"},
{}
}
};
diff --git a/testcases/kernel/syscalls/kill/kill13.c b/testcases/kernel/syscalls/kill/kill13.c
index ca281ca6c..bf6e4efeb 100644
--- a/testcases/kernel/syscalls/kill/kill13.c
+++ b/testcases/kernel/syscalls/kill/kill13.c
@@ -37,7 +37,7 @@ static struct tst_test test = {
},
.tags = (const struct tst_tag[]) {
{"linux-git", "4ea77014af0d"},
- {"CVE", "CVE-2018-10124"},
+ {"CVE", "2018-10124"},
{}
}
};
diff --git a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c
index 65061bf3d..7481dcd8d 100644
--- a/testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c
+++ b/testcases/kernel/syscalls/set_mempolicy/set_mempolicy05.c
@@ -117,7 +117,7 @@ static struct tst_test test = {
},
.tags = (const struct tst_tag[]) {
{"linux-git", "cf01fb9985e8"},
- {"CVE", "CVE-2017-7616"},
+ {"CVE", "2017-7616"},
{}
}
};
diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt03.c b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
index 90d546611..134734acd 100644
--- a/testcases/kernel/syscalls/setsockopt/setsockopt03.c
+++ b/testcases/kernel/syscalls/setsockopt/setsockopt03.c
@@ -79,7 +79,7 @@ static struct tst_test test = {
.needs_root = 1,
.tags = (const struct tst_tag[]){
{"linux-git", "ce683e5f9d04"},
- {"CVE", "CVE-2016-4997"},
+ {"CVE", "2016-4997"},
{}
}
};
diff --git a/testcases/network/sockets/vsock01.c b/testcases/network/sockets/vsock01.c
index e46f663ed..84c9f9577 100644
--- a/testcases/network/sockets/vsock01.c
+++ b/testcases/network/sockets/vsock01.c
@@ -118,7 +118,7 @@ static struct tst_test test = {
},
.tags = (const struct tst_tag[]) {
{"linux-git", "c518adafa39f"},
- {"CVE", "CVE-2021-26708"},
+ {"CVE", "2021-26708"},
{}
},
};
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 11/13] build: rules.mk: Fix HOST_MAKE_TARGET rule
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
` (7 preceding siblings ...)
2026-06-24 9:18 ` [LTP] [PATCH 10/13] testcases: Fix the CVE tags Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 12:05 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 12/13] mem: vma03: Rewrite to the new test library Cyril Hrubis
2026-06-24 9:19 ` [LTP] [PATCH 13/13] metadata: Add runtest file generator Cyril Hrubis
10 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
The rule was written with $< which means that the additional C files
were not picked for compilation. Correct it to $^ instead.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
include/mk/rules.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/mk/rules.mk b/include/mk/rules.mk
index c7da6d37f..2c15c4af1 100644
--- a/include/mk/rules.mk
+++ b/include/mk/rules.mk
@@ -35,9 +35,9 @@ endif
$(HOST_MAKE_TARGETS): %: %.c
ifdef VERBOSE
- $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $< $(HOST_LDLIBS) -o $@
+ $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $^ $(HOST_LDLIBS) -o $@
else
- @$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $< $(HOST_LDLIBS) -o $@
+ @$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) $^ $(HOST_LDLIBS) -o $@
@echo HOSTCC $(target_rel_dir)$@
endif
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 12/13] mem: vma03: Rewrite to the new test library
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
` (8 preceding siblings ...)
2026-06-24 9:18 ` [LTP] [PATCH 11/13] build: rules.mk: Fix HOST_MAKE_TARGET rule Cyril Hrubis
@ 2026-06-24 9:18 ` Cyril Hrubis
2026-06-24 9:19 ` [LTP] [PATCH 13/13] metadata: Add runtest file generator Cyril Hrubis
10 siblings, 0 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:18 UTC (permalink / raw)
To: ltp
We also drop the __NR_mmap2 ifdef because the lapi/syscalls.h defines
the fallbacks to -1 when a syscall is not implemented on an achitecture,
so the macro is always defined.
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
testcases/kernel/mem/vma/vma03.c | 189 ++++++++++++-------------------
1 file changed, 73 insertions(+), 116 deletions(-)
diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
index da1f5be99..7694e7e9a 100644
--- a/testcases/kernel/mem/vma/vma03.c
+++ b/testcases/kernel/mem/vma/vma03.c
@@ -1,149 +1,106 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2026 Cyril Hrubis <chrubis@suse.cz>
+ */
+
+/*\
+ * CVE-2011-2496 regression test.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
+ * Verify that :manpage:`mremap(2)` correctly rejects an expansion that
+ * would cause the page-offset (pgoff) inside the mapping to wrap around
+ * due to overflow.
*
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * The normal :manpage:`mmap(2)` paths all prevent creating a mapping
+ * whose pgoff could wrap, but an expanding :manpage:`mremap(2)` was
+ * able to take a valid mapping and grow it past the wrap boundary.
*
- * Further, this software is distributed without any warranty that it
- * is free of the rightful claim of any third person regarding
- * infringement or the like. Any license provided herein, whether
- * implied or otherwise, applies only to this software file. Patent
- * licenses, if any, provided herein do not apply to combinations of
- * this program with other software, or any other product whatsoever.
+ * The test uses :manpage:`mmap2(2)` to create a file-backed mapping at
+ * a pgoff near ``ULONG_MAX``, then attempts to double its size with
+ * :manpage:`mremap(2)`. The kernel must reject this with ``EINVAL``.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301, USA.
- */
-/*
- * This is a reproducer for CVE-2011-2496.
- *
- * The normal mmap paths all avoid creating a mapping where the pgoff
- * inside the mapping could wrap around due to overflow. However, an
- * expanding mremap() can take such a non-wrapping mapping and make it
- * bigger and cause a wrapping condition. There is also another case
- * where we expand mappings hiding in plain sight: the automatic stack
- * expansion.
- *
- * This program tries to remap a mapping with a new size that would
- * wrap pgoff. Notice that it only works on 32-bit arch for now.
+ * This test only runs on 32-bit systems with a 32-bit kernel because
+ * the overflow requires a 32-bit ``unsigned long`` address space.
*/
#define _GNU_SOURCE
-#include "config.h"
-#include <sys/types.h>
#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/syscall.h>
-#include <errno.h>
-#include <fcntl.h>
#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "test.h"
-#include "tso_safe_macros.h"
-#include "tst_kernel.h"
+#include "tst_test.h"
#include "lapi/abisize.h"
+#include "lapi/syscalls.h"
-char *TCID = "vma03";
-int TST_TOTAL = 1;
-
-#ifdef __NR_mmap2
#define TESTFILE "testfile"
+static int fd = -1;
static size_t pgsz;
-static int fd;
+static void *map = MAP_FAILED;
-static void *mmap2(void *addr, size_t length, int prot,
- int flags, int fd, off_t pgoffset);
-static void setup(void);
-static void cleanup(void);
-
-int main(int argc, char *argv[])
+static void setup(void)
{
- int lc;
- void *map, *remap;
- off_t pgoff;
-
- if (TST_ABI != 32 || tst_kernel_bits() != 32) {
- tst_brkm(TCONF, NULL,
- "test is designed for 32-bit system only.");
- }
+ if (TST_ABI != 32 || tst_kernel_bits() != 32)
+ tst_brk(TCONF, "test is designed for 32-bit systems only");
- tst_parse_opts(argc, argv, NULL, NULL);
-
- pgsz = sysconf(_SC_PAGE_SIZE);
- setup();
-
- for (lc = 0; TEST_LOOPING(lc); lc++) {
- tst_count = 0;
-
- fd = SAFE_OPEN(NULL, TESTFILE, O_RDWR);
-
- /*
- * The pgoff is counted in 4K units and must be page-aligned,
- * hence we must align it down to page_size/4096 in a case that
- * the system has page_size > 4K.
- */
- pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
- map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
- fd, pgoff);
- if (map == MAP_FAILED)
- tst_brkm(TBROK | TERRNO, cleanup, "mmap2");
-
- remap = mremap(map, pgsz, 2 * pgsz, 0);
- if (remap == MAP_FAILED) {
- if (errno == EINVAL)
- tst_resm(TPASS, "mremap failed as expected.");
- else
- tst_resm(TFAIL | TERRNO, "mremap");
- munmap(map, pgsz);
- } else {
- tst_resm(TFAIL, "mremap succeeded unexpectedly.");
- munmap(remap, 2 * pgsz);
- }
-
- close(fd);
- }
+ pgsz = getpagesize();
- cleanup();
- tst_exit();
+ SAFE_CREAT(TESTFILE, 0644);
}
-static void *mmap2(void *addr, size_t length, int prot,
- int flags, int fd, off_t pgoffset)
+static void run(void)
{
- return (void *)syscall(SYS_mmap2, addr, length, prot,
- flags, fd, pgoffset);
-}
+ /*
+ * pgoff is counted in 4K units, must be page-aligned, so
+ * align down to page_size/4096 for systems with page_size > 4K.
+ */
+ off_t pgoff = (ULONG_MAX - 1) & (~((pgsz - 1) >> 12));
-static void setup(void)
-{
- tst_sig(FORK, DEF_HANDLER, cleanup);
+ fd = SAFE_OPEN(TESTFILE, O_RDWR);
+
+ map = (void *)tst_syscall(__NR_mmap2, NULL, pgsz,
+ PROT_READ | PROT_WRITE,
+ MAP_PRIVATE, fd, pgoff);
+
+ if (map == MAP_FAILED) {
+ tst_brk(TBROK | TERRNO, "mmap2(%s, pgoff=%ld)",
+ TESTFILE, (long)pgoff);
+ }
+
+ void *remap = mremap(map, pgsz, 2 * pgsz, 0);
- tst_tmpdir();
+ if (remap == MAP_FAILED) {
+ if (errno == EINVAL)
+ tst_res(TPASS, "mremap() failed with EINVAL as expected");
+ else
+ tst_res(TFAIL | TERRNO, "mremap() failed unexpectedly");
- fd = SAFE_CREAT(NULL, TESTFILE, 0644);
- close(fd);
+ SAFE_MUNMAP(map, pgsz);
+ } else {
+ tst_res(TFAIL, "mremap() succeeded unexpectedly");
+ SAFE_MUNMAP(remap, 2 * pgsz);
+ }
- TEST_PAUSE;
+ map = MAP_FAILED;
+ SAFE_CLOSE(fd);
}
static void cleanup(void)
{
- tst_rmdir();
-}
-#else /* __NR_mmap2 */
-int main(int argc, char *argv[])
-{
- tst_brkm(TCONF, NULL, "__NR_mmap2 is not defined on your system");
+ if (map != MAP_FAILED)
+ SAFE_MUNMAP(map, pgsz);
+
+ if (fd != -1)
+ SAFE_CLOSE(fd);
}
-#endif
+
+static struct tst_test test = {
+ .test_all = run,
+ .setup = setup,
+ .cleanup = cleanup,
+ .needs_tmpdir = 1,
+ .tags = (const struct tst_tag[]) {
+ {"linux-git", "982134ba6261"},
+ {"CVE", "2011-2496"},
+ {}
+ }
+};
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [LTP] [PATCH 13/13] metadata: Add runtest file generator
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
` (9 preceding siblings ...)
2026-06-24 9:18 ` [LTP] [PATCH 12/13] mem: vma03: Rewrite to the new test library Cyril Hrubis
@ 2026-06-24 9:19 ` Cyril Hrubis
2026-06-24 12:14 ` Andrea Cervesato via ltp
2026-06-24 13:22 ` Andrea Cervesato via ltp
10 siblings, 2 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 9:19 UTC (permalink / raw)
To: ltp
Now just for the runtest/cve file.
The changes in the file are:
- request_key03 is executed once and checks for both CVEs
(we have many tests that check for more than one CVE and we execute
rest of them once as well)
- if we have more than one test per CVE the suffixes are now numbered
(it was random before)
- if test checks for more than one CVE the test tag is the oldest one
(the crypto_user01 test jumps up in the runtest file, but again this
makes it more consistent)
- kvm CVE tests are included, I do not see a reason to filter them out
but we can add that filter if deemed necessary
- the file also includes landlock07 that should have been included but
wasn't
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
---
metadata/.gitignore | 1 +
metadata/Makefile | 10 +-
metadata/genruntest.c | 292 ++++++++++++++++++++++++++++++++++++++++++
runtest/.gitignore | 1 +
runtest/cve | 100 ---------------
5 files changed, 302 insertions(+), 102 deletions(-)
create mode 100644 metadata/genruntest.c
create mode 100644 runtest/.gitignore
delete mode 100644 runtest/cve
diff --git a/metadata/.gitignore b/metadata/.gitignore
index bb6399e5c..ae33412a6 100644
--- a/metadata/.gitignore
+++ b/metadata/.gitignore
@@ -1,3 +1,4 @@
metaparse
metaparse-sh
+genruntest
ltp.json
diff --git a/metadata/Makefile b/metadata/Makefile
index 6939b9f76..fcd63f385 100644
--- a/metadata/Makefile
+++ b/metadata/Makefile
@@ -6,15 +6,21 @@ top_srcdir ?= ..
include $(top_srcdir)/include/mk/env_pre.mk
include $(top_srcdir)/include/mk/functions.mk
-MAKE_TARGETS := ltp.json
-HOST_MAKE_TARGETS := metaparse metaparse-sh
+MAKE_TARGETS := ltp.json ../runtest/cve
+HOST_MAKE_TARGETS := metaparse metaparse-sh genruntest
INSTALL_DIR = metadata
+genruntest: genruntest.c $(addprefix $(top_srcdir)/libs/ujson/, ujson_reader.c ujson_common.c ujson_utf.c)
+genruntest: HOST_CFLAGS+=-I$(top_srcdir)/include/
+
.PHONY: ltp.json
ltp.json: metaparse metaparse-sh
$(abs_srcdir)/parse.sh > ltp.json
+../runtest/cve: ltp.json genruntest
+ ${top_builddir}/metadata/genruntest ltp.json cve > ../runtest/cve
+
test:
$(MAKE) -C $(abs_srcdir)/tests/ test
diff --git a/metadata/genruntest.c b/metadata/genruntest.c
new file mode 100644
index 000000000..193c7fa50
--- /dev/null
+++ b/metadata/genruntest.c
@@ -0,0 +1,292 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2026 Cyril Hrubis <chrubis@suse.cz>
+ *
+ * Generate LTP runtest files from ltp.json metadata.
+ *
+ * Usage: genruntest ltp.json cve
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <ujson.h>
+
+struct cve_entry {
+ char name[128];
+ char binary[128];
+ int cve_year;
+ int cve_seq;
+ int may_kmemleak;
+};
+
+static struct cve_entry *entries;
+static unsigned int entry_cnt;
+static unsigned int entry_size;
+
+static void add_entry(const char *cve_id, const char *binary,
+ int may_kmemleak)
+{
+ const char *id = cve_id;
+
+ if (entry_cnt >= entry_size) {
+ entry_size = entry_size ? entry_size * 2 : 128;
+ entries = realloc(entries, entry_size * sizeof(*entries));
+ if (!entries) {
+ fprintf(stderr, "Out of memory\n");
+ exit(1);
+ }
+ }
+
+ struct cve_entry *e = &entries[entry_cnt++];
+
+ snprintf(e->name, sizeof(e->name), "cve-%s", id);
+ snprintf(e->binary, sizeof(e->binary), "%s", binary);
+ e->may_kmemleak = may_kmemleak;
+
+ if (sscanf(id, "%d-%d", &e->cve_year, &e->cve_seq) != 2) {
+ fprintf(stderr, "ERROR: Invalid CVE id '%s' should be 'year-seq'\n", cve_id);
+ exit(1);
+ }
+}
+
+static int cmp_entries(const void *a, const void *b)
+{
+ const struct cve_entry *ea = a;
+ const struct cve_entry *eb = b;
+
+ if (ea->cve_year != eb->cve_year)
+ return ea->cve_year - eb->cve_year;
+
+ if (ea->cve_seq != eb->cve_seq)
+ return ea->cve_seq - eb->cve_seq;
+
+ return strcmp(ea->binary, eb->binary);
+}
+
+/*
+ * Count how many entries share the same CVE name.
+ */
+static int count_same(unsigned int idx)
+{
+ int cnt = 1;
+
+ while (idx + cnt < entry_cnt &&
+ !strcmp(entries[idx].name, entries[idx + cnt].name))
+ cnt++;
+
+ return cnt;
+}
+
+static void print_entries(int kmemleak)
+{
+ unsigned int i;
+
+ for (i = 0; i < entry_cnt;) {
+ int cnt = count_same(i);
+ int j;
+
+ for (j = 0; j < cnt; j++) {
+ struct cve_entry *e = &entries[i + j];
+
+ if (e->may_kmemleak != kmemleak)
+ continue;
+
+ if (cnt > 1)
+ printf("%s-%02d %s\n", e->name, j + 1, e->binary);
+ else
+ printf("%s %s\n", e->name, e->binary);
+ }
+
+ i += cnt;
+ }
+}
+
+enum test_attr_ids {
+ ATTR_MAY_KMEMLEAK,
+ ATTR_TAGS,
+};
+
+static ujson_obj_attr test_attrs[] = {
+ UJSON_OBJ_ATTR_IDX(ATTR_MAY_KMEMLEAK, "may_kmemleak", UJSON_BOOL),
+ UJSON_OBJ_ATTR_IDX(ATTR_TAGS, "tags", UJSON_ARR),
+};
+
+static ujson_obj test_obj = {
+ .attrs = test_attrs,
+ .attr_cnt = UJSON_ARRAY_SIZE(test_attrs),
+};
+
+static int parse_cve_tags(ujson_reader *reader, const char *binary,
+ int may_kmemleak, int do_add)
+{
+ char buf[256];
+ ujson_val val = UJSON_VAL_INIT(buf, sizeof(buf));
+ int cnt = 0;
+ char *oldest_id = NULL;
+ int oldest_year = 0, oldest_seq = 0;
+
+ UJSON_ARR_FOREACH(reader, &val) {
+ char *name = NULL;
+ char *value = NULL;
+
+ if (val.type != UJSON_ARR) {
+ ujson_arr_skip(reader);
+ continue;
+ }
+
+ UJSON_ARR_FOREACH(reader, &val) {
+ if (val.type != UJSON_STR)
+ continue;
+
+ if (!name)
+ name = strdup(val.val_str);
+ else if (!value)
+ value = strdup(val.val_str);
+ }
+
+ if (name && value && !strcmp(name, "CVE")) {
+ if (do_add) {
+ const char *id = value;
+ int year, seq;
+
+ if (!strncmp(id, "CVE-", 4))
+ id += 4;
+
+ if (sscanf(id, "%d-%d", &year, &seq) == 2) {
+ if (!oldest_id ||
+ year < oldest_year ||
+ (year == oldest_year && seq < oldest_seq)) {
+ free(oldest_id);
+ oldest_id = strdup(value);
+ oldest_year = year;
+ oldest_seq = seq;
+ }
+ }
+ }
+ cnt++;
+ }
+
+ free(name);
+ free(value);
+ }
+
+ if (do_add && oldest_id)
+ add_entry(oldest_id, binary, may_kmemleak);
+
+ free(oldest_id);
+
+ return cnt;
+}
+
+static void parse_test(ujson_reader *reader, const char *binary)
+{
+ char buf[256];
+ ujson_val val = UJSON_VAL_INIT(buf, sizeof(buf));
+ int may_kmemleak = 0;
+ int cve_cnt = 0;
+
+ ujson_reader_state obj_state = ujson_reader_state_save(reader);
+
+ UJSON_OBJ_FOREACH_FILTER(reader, &val, &test_obj, NULL) {
+ switch ((enum test_attr_ids)val.idx) {
+ case ATTR_MAY_KMEMLEAK:
+ may_kmemleak = val.val_bool;
+ break;
+ case ATTR_TAGS:
+ cve_cnt = parse_cve_tags(reader, NULL, 0, 0);
+ break;
+ }
+ }
+
+ if (!cve_cnt)
+ return;
+
+ ujson_reader_state_load(reader, obj_state);
+
+ UJSON_OBJ_FOREACH_FILTER(reader, &val, &test_obj, NULL) {
+ switch ((enum test_attr_ids)val.idx) {
+ case ATTR_MAY_KMEMLEAK:
+ break;
+ case ATTR_TAGS:
+ parse_cve_tags(reader, binary, may_kmemleak, 1);
+ break;
+ }
+ }
+}
+
+enum top_attr_ids {
+ TOP_TESTS,
+};
+
+static ujson_obj_attr top_attrs[] = {
+ UJSON_OBJ_ATTR_IDX(TOP_TESTS, "tests", UJSON_OBJ),
+};
+
+static ujson_obj top_obj = {
+ .attrs = top_attrs,
+ .attr_cnt = UJSON_ARRAY_SIZE(top_attrs),
+};
+
+static void gen_cve(ujson_reader *reader)
+{
+ char buf[256];
+ ujson_val val = UJSON_VAL_INIT(buf, sizeof(buf));
+
+ UJSON_OBJ_FOREACH_FILTER(reader, &val, &top_obj, NULL) {
+ if (val.idx != TOP_TESTS)
+ continue;
+
+ UJSON_OBJ_FOREACH(reader, &val) {
+ char binary[128];
+
+ snprintf(binary, sizeof(binary), "%s", val.id);
+
+ if (val.type == UJSON_OBJ)
+ parse_test(reader, binary);
+ else
+ ujson_obj_skip(reader);
+ }
+ }
+
+ if (ujson_reader_err(reader)) {
+ ujson_err_print(reader);
+ exit(1);
+ }
+
+ qsort(entries, entry_cnt, sizeof(*entries), cmp_entries);
+
+ printf("# Tests which check for vulnerabilities by CVE number\n");
+ print_entries(0);
+ printf("# Tests below may cause kernel memory leak\n");
+ print_entries(1);
+}
+
+int main(int argc, char *argv[])
+{
+ ujson_reader *reader;
+
+ if (argc != 3) {
+ fprintf(stderr, "Usage: %s ltp.json runtest_name\n", argv[0]);
+ return 1;
+ }
+
+ if (strcmp(argv[2], "cve")) {
+ fprintf(stderr, "Unknown runtest: %s\n", argv[2]);
+ return 1;
+ }
+
+ reader = ujson_reader_load(argv[1]);
+ if (!reader) {
+ fprintf(stderr, "Failed to load '%s'\n", argv[1]);
+ return 1;
+ }
+
+ gen_cve(reader);
+
+ ujson_reader_free(reader);
+ free(entries);
+
+ return 0;
+}
diff --git a/runtest/.gitignore b/runtest/.gitignore
new file mode 100644
index 000000000..290696707
--- /dev/null
+++ b/runtest/.gitignore
@@ -0,0 +1 @@
+cve
diff --git a/runtest/cve b/runtest/cve
deleted file mode 100644
index 5f29d1686..000000000
--- a/runtest/cve
+++ /dev/null
@@ -1,100 +0,0 @@
-# Tests which check for vulnerabilities by CVE number
-cve-2011-0999 thp01
-cve-2011-2183 ksm05
-cve-2011-2496 vma03
-cve-2012-0957 uname04
-cve-2014-0196 cve-2014-0196
-cve-2015-0235 gethostbyname_r01
-cve-2015-3290 cve-2015-3290
-cve-2015-7550 keyctl02
-cve-2016-4470 keyctl01.sh
-cve-2016-4997 setsockopt03
-cve-2016-5195 dirtyc0w
-cve-2016-7042 cve-2016-7042
-cve-2016-7117 cve-2016-7117
-cve-2016-8655 setsockopt06
-cve-2016-9604 keyctl08
-cve-2016-9793 setsockopt04
-cve-2016-10044 cve-2016-10044
-cve-2017-2618 cve-2017-2618
-cve-2017-2636 pty05
-cve-2017-2671 cve-2017-2671
-cve-2017-5754 meltdown
-cve-2017-6951 request_key05
-cve-2017-7308 setsockopt02
-cve-2017-7472 keyctl04
-cve-2017-7616 set_mempolicy05
-cve-2017-8890 accept02
-cve-2017-10661 timerfd_settime02
-cve-2017-12192 keyctl07
-cve-2017-12193 add_key04
-cve-2017-15274 add_key02
-cve-2017-15299 request_key03 -b cve-2017-15299
-cve-2017-15537 ptrace07
-cve-2017-15649 fanout01
-cve-2017-15951 request_key03 -b cve-2017-15951
-cve-2017-16939 cve-2017-16939
-cve-2017-16995 bpf_prog03
-cve-2017-17052 cve-2017-17052
-cve-2017-17053 cve-2017-17053
-cve-2017-17712 sendmsg03
-cve-2017-17805 af_alg02
-cve-2017-17806 af_alg01
-cve-2017-17807 request_key04
-cve-2017-18075 pcrypt_aead01
-cve-2017-18344 timer_create03
-cve-2017-1000111 setsockopt07
-cve-2017-1000112 setsockopt05
-cve-2017-1000364 stack_clash
-cve-2017-1000380 snd_timer01
-cve-2017-1000405 thp04
-cve-2018-5803 sctp_big_chunk
-cve-2018-6927 futex_cmp_requeue02
-cve-2018-7566 snd_seq01
-cve-2018-8897 ptrace09
-cve-2018-9568 connect02
-cve-2018-10124 kill13
-cve-2018-11508 adjtimex03
-cve-2018-12896 timer_settime03
-cve-2018-13405 creat09
-cve-2018-18445 bpf_prog04
-cve-2018-18559 bind06
-cve-2018-18955 userns08
-cve-2018-19854 crypto_user01
-cve-2018-1000001 realpath01
-cve-2018-1000199 ptrace08
-cve-2018-1000204 ioctl_sg01
-cve-2019-8912 af_alg07
-cve-2020-11494 pty04
-cve-2020-14386 sendto03
-cve-2020-14416 pty03
-cve-2020-25705 icmp_rate_limit01
-cve-2020-29373 io_uring02
-cve-2020-36557 pty06
-cve-2021-3444 bpf_prog05
-cve-2021-3609 can_bcm01
-cve-2021-4034 execve06
-cve-2021-4197_1 cgroup_core01
-cve-2021-4197_2 cgroup_core02
-cve-2021-4204 bpf_prog06
-cve-2021-22555 setsockopt08
-cve-2021-26708 vsock01
-cve-2021-22600 setsockopt09
-cve-2021-38604 mq_notify03
-cve-2022-0847 dirtypipe
-cve-2022-2590 dirtyc0w_shmem
-cve-2022-23222 bpf_prog07
-cve-2023-1829 tcindex01
-cve-2023-0461 setsockopt10
-cve-2023-31248 nft02
-# Tests below may cause kernel memory leak
-cve-2020-25704 perf_event_open03
-cve-2022-0185 fsconfig03
-cve-2022-4378 cve-2022-4378
-cve-2025-38236 cve-2025-38236
-cve-2025-21756 cve-2025-21756
-cve-2026-31431 af_alg08
-cve-2026-43284 xfrm01
-cve-2026-43494 io_uring04
-cve-2026-46300 xfrm02
-cve-2026-46300-skb-segment xfrm03
--
2.53.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 02/13] keyctl01.sh: Rewrite to the new shell library
2026-06-24 9:18 ` [LTP] [PATCH 02/13] keyctl01.sh: Rewrite to the new shell library Cyril Hrubis
@ 2026-06-24 9:59 ` Andrea Cervesato via ltp
2026-06-24 10:57 ` [LTP] tst_test: Add may_kmemleak flag and annotate tests linuxtestproject.agent
1 sibling, 0 replies; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 9:59 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 01/13] tst_test: Add may_kmemleak flag and annotate tests
2026-06-24 9:18 ` [LTP] [PATCH 01/13] tst_test: Add may_kmemleak flag and annotate tests Cyril Hrubis
@ 2026-06-24 10:38 ` Andrea Cervesato via ltp
2026-06-24 10:41 ` Cyril Hrubis
0 siblings, 1 reply; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 10:38 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
This seems to be one of the first steps towards an
"informational" metadata that can be used by the executors,
such as kirk or openQA, isn't it?
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 03/13] keyctl01.sh: Remove the keyctl subcommand check
2026-06-24 9:18 ` [LTP] [PATCH 03/13] keyctl01.sh: Remove the keyctl subcommand check Cyril Hrubis
@ 2026-06-24 10:38 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 10:38 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 01/13] tst_test: Add may_kmemleak flag and annotate tests
2026-06-24 10:38 ` Andrea Cervesato via ltp
@ 2026-06-24 10:41 ` Cyril Hrubis
0 siblings, 0 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 10:41 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> This seems to be one of the first steps towards an
> "informational" metadata that can be used by the executors,
> such as kirk or openQA, isn't it?
Indeed. I test with this tag fails the automation should reboot/reload
from snapshot before continuing the test.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 9:18 ` [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups Cyril Hrubis
@ 2026-06-24 10:42 ` Andrea Cervesato via ltp
2026-06-24 10:50 ` Cyril Hrubis
0 siblings, 1 reply; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 10:42 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
as I already mentioned, I think we should do this in all tests,
instead of having it only for shell tests. I know manual groups
are error-prone, but they give us good control over what we are
setting up.
I'm not sure if adding groups based on folders as we decided to
do it for C API is a good idea. A tst_test->groups array feels
better suited, if shell tests can't automatically support the
same approach.
We should have the same approach for both C and shell tests
to keep consistency.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 10:42 ` Andrea Cervesato via ltp
@ 2026-06-24 10:50 ` Cyril Hrubis
2026-06-24 11:10 ` Cyril Hrubis
2026-06-24 11:14 ` Andrea Cervesato via ltp
0 siblings, 2 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 10:50 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> as I already mentioned, I think we should do this in all tests,
> instead of having it only for shell tests. I know manual groups
> are error-prone, but they give us good control over what we are
> setting up.
>
> I'm not sure if adding groups based on folders as we decided to
> do it for C API is a good idea. A tst_test->groups array feels
> better suited, if shell tests can't automatically support the
> same approach.
I fear that we will have a lot of typos and wrong data in there. We had
quite a few wrong CVE tags already, because we weren't checking them for
validity.
I'm okay with this as long as we have a checks in 'make check' that make
sure that the manually assigned groups are correct. For that we would
need the same heuristic we have for automatic groups to check that we
didn't miss anything and a list of valid groups to check againts to
guard againts typos.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] tst_test: Add may_kmemleak flag and annotate tests
2026-06-24 9:18 ` [LTP] [PATCH 02/13] keyctl01.sh: Rewrite to the new shell library Cyril Hrubis
2026-06-24 9:59 ` Andrea Cervesato via ltp
@ 2026-06-24 10:57 ` linuxtestproject.agent
2026-06-24 11:08 ` Cyril Hrubis
1 sibling, 1 reply; 36+ messages in thread
From: linuxtestproject.agent @ 2026-06-24 10:57 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
On Wed, 24 Jun 2026, Cyril Hrubis wrote:
> tst_test: Add may_kmemleak flag and annotate tests
--- [PATCH 1/13] ---
> This information was so far recoded only in the comment in the cve
Typo: "recoded" should be "recorded".
--- [PATCH 8/13] ---
> lib: tst_test: Move the iterations to struct tst_test
> - iterations = SAFE_STRTOL(optarg, 0, INT_MAX);
> + tst_test->iterations = SAFE_STRTOL(optarg, 0, UINT_MAX);
safe_strtol() takes `long min, long max` parameters. On 32-bit
systems where sizeof(long) == 4, passing UINT_MAX (4294967295U) as
a long overflows to -1, making the valid range [0, -1]. This causes
the range check to reject all positive values, breaking the -i
option on 32-bit.
Should this use INT_MAX (as before) or SAFE_STRTOUL?
--- [PATCH 10/13] ---
> The tags should be in the format year-seq. With the CVE prefix our
> tolling is broken e.g. tst_test.c prints wrong URLs.
Typo: "tolling" should be "tooling".
--- [PATCH 12/13] ---
> We also drop the __NR_mmap2 ifdef because the lapi/syscalls.h defines
> the fallbacks to -1 when a syscall is not implemented on an achitecture,
Typo: "achitecture" should be "architecture".
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] tst_test: Add may_kmemleak flag and annotate tests
2026-06-24 10:57 ` [LTP] tst_test: Add may_kmemleak flag and annotate tests linuxtestproject.agent
@ 2026-06-24 11:08 ` Cyril Hrubis
0 siblings, 0 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 11:08 UTC (permalink / raw)
To: linuxtestproject.agent; +Cc: ltp
Hi!
> > tst_test: Add may_kmemleak flag and annotate tests
>
> --- [PATCH 1/13] ---
>
> > This information was so far recoded only in the comment in the cve
>
> Typo: "recoded" should be "recorded".
>
> --- [PATCH 8/13] ---
>
> > lib: tst_test: Move the iterations to struct tst_test
>
> > - iterations = SAFE_STRTOL(optarg, 0, INT_MAX);
> > + tst_test->iterations = SAFE_STRTOL(optarg, 0, UINT_MAX);
>
> safe_strtol() takes `long min, long max` parameters. On 32-bit
> systems where sizeof(long) == 4, passing UINT_MAX (4294967295U) as
> a long overflows to -1, making the valid range [0, -1]. This causes
> the range check to reject all positive values, breaking the -i
> option on 32-bit.
>
> Should this use INT_MAX (as before) or SAFE_STRTOUL?
Good catch, indeed this should be changed to SAFE_STRTOUL()
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 10:50 ` Cyril Hrubis
@ 2026-06-24 11:10 ` Cyril Hrubis
2026-06-24 11:14 ` Andrea Cervesato via ltp
1 sibling, 0 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 11:10 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> I'm okay with this as long as we have a checks in 'make check' that make
> sure that the manually assigned groups are correct. For that we would
> need the same heuristic we have for automatic groups to check that we
> didn't miss anything and a list of valid groups to check againts to
> guard againts typos.
And also duplicity check.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 10:50 ` Cyril Hrubis
2026-06-24 11:10 ` Cyril Hrubis
@ 2026-06-24 11:14 ` Andrea Cervesato via ltp
2026-06-24 12:28 ` Cyril Hrubis
1 sibling, 1 reply; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 11:14 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
> Hi!
> > as I already mentioned, I think we should do this in all tests,
> > instead of having it only for shell tests. I know manual groups
> > are error-prone, but they give us good control over what we are
> > setting up.
> >
> > I'm not sure if adding groups based on folders as we decided to
> > do it for C API is a good idea. A tst_test->groups array feels
> > better suited, if shell tests can't automatically support the
> > same approach.
>
> I fear that we will have a lot of typos and wrong data in there. We had
> quite a few wrong CVE tags already, because we weren't checking them for
> validity.
>
> I'm okay with this as long as we have a checks in 'make check' that make
> sure that the manually assigned groups are correct. For that we would
> need the same heuristic we have for automatic groups to check that we
> didn't miss anything and a list of valid groups to check againts to
> guard againts typos.
Don't forget we also have the agent that works quite good on these
small tasks. We can add a rule and make sure they are always valid
groups.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 06/13] mem/ksm05: Add proper runtime support
2026-06-24 9:18 ` [LTP] [PATCH 06/13] mem/ksm05: Add proper runtime support Cyril Hrubis
@ 2026-06-24 12:04 ` Andrea Cervesato via ltp
2026-06-24 12:17 ` Cyril Hrubis
0 siblings, 1 reply; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 12:04 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
> static void sighandler(int sig)
> @@ -91,7 +95,8 @@ static void sighandler(int sig)
> static struct tst_test test = {
> .needs_root = 1,
> .forks_child = 1,
> - .test_all = test_ksm,
> + .test_all = run,
> + .min_runtime = 10,
Even if this is technically correct, I'm not 100% sure about it.
Now if we want to manually test the binary, we have to wait 10
seconds by default, while before we had to explicitly use -I.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 08/13] lib: tst_test: Move the iterations to struct tst_test
2026-06-24 9:18 ` [LTP] [PATCH 08/13] lib: tst_test: Move the iterations to struct tst_test Cyril Hrubis
@ 2026-06-24 12:05 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 12:05 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 10/13] testcases: Fix the CVE tags
2026-06-24 9:18 ` [LTP] [PATCH 10/13] testcases: Fix the CVE tags Cyril Hrubis
@ 2026-06-24 12:05 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 12:05 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 11/13] build: rules.mk: Fix HOST_MAKE_TARGET rule
2026-06-24 9:18 ` [LTP] [PATCH 11/13] build: rules.mk: Fix HOST_MAKE_TARGET rule Cyril Hrubis
@ 2026-06-24 12:05 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 12:05 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 13/13] metadata: Add runtest file generator
2026-06-24 9:19 ` [LTP] [PATCH 13/13] metadata: Add runtest file generator Cyril Hrubis
@ 2026-06-24 12:14 ` Andrea Cervesato via ltp
2026-06-24 12:25 ` Cyril Hrubis
2026-06-24 13:22 ` Andrea Cervesato via ltp
1 sibling, 1 reply; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 12:14 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Hi Cyril,
this is a bit controversial, because we would like to get rid of
runtest files. Also, we should start thinking about moving tests
variants inside the tst_test struct first, otherwise we will always
generate runtest files which re not taking into account tests
parameters.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 06/13] mem/ksm05: Add proper runtime support
2026-06-24 12:04 ` Andrea Cervesato via ltp
@ 2026-06-24 12:17 ` Cyril Hrubis
2026-06-24 12:20 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 12:17 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> > static void sighandler(int sig)
> > @@ -91,7 +95,8 @@ static void sighandler(int sig)
> > static struct tst_test test = {
> > .needs_root = 1,
> > .forks_child = 1,
> > - .test_all = test_ksm,
> > + .test_all = run,
> > + .min_runtime = 10,
>
> Even if this is technically correct, I'm not 100% sure about it.
> Now if we want to manually test the binary, we have to wait 10
> seconds by default, while before we had to explicitly use -I.
I would say that the defaults should be geared towards testing not
development. If a test needs 10 seconds to trigger the bug, the default
run without any parameters should run for 10 seconds.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 06/13] mem/ksm05: Add proper runtime support
2026-06-24 12:17 ` Cyril Hrubis
@ 2026-06-24 12:20 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 12:20 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 13/13] metadata: Add runtest file generator
2026-06-24 12:14 ` Andrea Cervesato via ltp
@ 2026-06-24 12:25 ` Cyril Hrubis
0 siblings, 0 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 12:25 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> this is a bit controversial, because we would like to get rid of
> runtest files.
Eventually yes, but we will need this for the transition period. There
are a lot of systems out there using runtest files, including openQA. We
will have to keep the runtest files for a deprecation period, which will
last at least a year or two, before we can drop them. During that period
generating the runtest files is in my opinion the best option.
> Also, we should start thinking about moving tests variants inside the
> tst_test struct first, otherwise we will always generate runtest files
> which re not taking into account tests parameters.
One step at a time. There are quite a lot of test that does not have any
parameters. And quite a few that shouldn't have any parameters. I would
say that the -I parameter for CVE reproduces is a hack, because the test
is "broken" without any parameters, since the chances it triggers a bug
is really small.
There are test where the test variants needs to be encoded in the test
structure, these are mostly the I/O stress test where we encode
different offsets/sizes in the parameters. But that shouldn't stop us
from automating what can be automated already.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 11:14 ` Andrea Cervesato via ltp
@ 2026-06-24 12:28 ` Cyril Hrubis
2026-06-24 12:37 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 12:28 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> > I fear that we will have a lot of typos and wrong data in there. We had
> > quite a few wrong CVE tags already, because we weren't checking them for
> > validity.
> >
> > I'm okay with this as long as we have a checks in 'make check' that make
> > sure that the manually assigned groups are correct. For that we would
> > need the same heuristic we have for automatic groups to check that we
> > didn't miss anything and a list of valid groups to check againts to
> > guard againts typos.
>
> Don't forget we also have the agent that works quite good on these
> small tasks. We can add a rule and make sure they are always valid
> groups.
Honestly I'm not 100% convinced that the agent would spot all issues,
maybe it would maybe it wouldn't but would you trust it will?
Also linter should be cheaper and pretty easy for this case.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 12:28 ` Cyril Hrubis
@ 2026-06-24 12:37 ` Andrea Cervesato via ltp
2026-06-24 13:21 ` Cyril Hrubis
0 siblings, 1 reply; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 12:37 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
> Also linter should be cheaper and pretty easy for this case.
We can easily do that yes, but I don't know where we could implement
this inside the make check command. I guess we need one more script
verifying the parent folders/test tags and cross-checking with the
group name which has been assigned.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 12:37 ` Andrea Cervesato via ltp
@ 2026-06-24 13:21 ` Cyril Hrubis
2026-06-24 13:25 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 13:21 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> > Also linter should be cheaper and pretty easy for this case.
>
> We can easily do that yes, but I don't know where we could implement
> this inside the make check command. I guess we need one more script
> verifying the parent folders/test tags and cross-checking with the
> group name which has been assigned.
Or we can write a linter for the metadata. I guess that we can add that
to the metaparse tool. We need to check the tags for correctness
somewhere as well, otherwise we will get wrongly formatted CVE tags in
the future as well.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 13/13] metadata: Add runtest file generator
2026-06-24 9:19 ` [LTP] [PATCH 13/13] metadata: Add runtest file generator Cyril Hrubis
2026-06-24 12:14 ` Andrea Cervesato via ltp
@ 2026-06-24 13:22 ` Andrea Cervesato via ltp
2026-06-24 13:27 ` Cyril Hrubis
1 sibling, 1 reply; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 13:22 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
There's a build issue related to runtest/ folder. It seems like
by the time you call genruntest the folder is not present yet.
https://github.com/linux-test-project/ltp/actions/runs/28095394061/job/83183512348
This needs to be fixed in v2.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups
2026-06-24 13:21 ` Cyril Hrubis
@ 2026-06-24 13:25 ` Andrea Cervesato via ltp
0 siblings, 0 replies; 36+ messages in thread
From: Andrea Cervesato via ltp @ 2026-06-24 13:25 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: ltp
> Hi!
> > > Also linter should be cheaper and pretty easy for this case.
> >
> > We can easily do that yes, but I don't know where we could implement
> > this inside the make check command. I guess we need one more script
> > verifying the parent folders/test tags and cross-checking with the
> > group name which has been assigned.
>
> Or we can write a linter for the metadata. I guess that we can add that
> to the metaparse tool. We need to check the tags for correctness
> somewhere as well, otherwise we will get wrongly formatted CVE tags in
> the future as well.
>
> --
> Cyril Hrubis
> chrubis@suse.cz
That's a good idea. Let's keep metadata stuff into the metadata folder.
I will take a look at this.
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
* Re: [LTP] [PATCH 13/13] metadata: Add runtest file generator
2026-06-24 13:22 ` Andrea Cervesato via ltp
@ 2026-06-24 13:27 ` Cyril Hrubis
0 siblings, 0 replies; 36+ messages in thread
From: Cyril Hrubis @ 2026-06-24 13:27 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi!
> There's a build issue related to runtest/ folder. It seems like
> by the time you call genruntest the folder is not present yet.
>
> https://github.com/linux-test-project/ltp/actions/runs/28095394061/job/83183512348
>
> This needs to be fixed in v2.
Sigh, that's the out-of-tree build, we should have dropped that long
time ago, since it overcomplicates everything...
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2026-06-24 13:27 UTC | newest]
Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24 9:18 [LTP] [PATCH 00/13] runtest generator prototype for runtest/cve Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 01/13] tst_test: Add may_kmemleak flag and annotate tests Cyril Hrubis
2026-06-24 10:38 ` Andrea Cervesato via ltp
2026-06-24 10:41 ` Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 02/13] keyctl01.sh: Rewrite to the new shell library Cyril Hrubis
2026-06-24 9:59 ` Andrea Cervesato via ltp
2026-06-24 10:57 ` [LTP] tst_test: Add may_kmemleak flag and annotate tests linuxtestproject.agent
2026-06-24 11:08 ` Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 03/13] keyctl01.sh: Remove the keyctl subcommand check Cyril Hrubis
2026-06-24 10:38 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 04/13] tst_run_shell: Add support for groups in the env JSON Cyril Hrubis
2026-06-24 9:18 ` [LTP] [PATCH 05/13] vma05.sh, keyctl01.sh: Add groups Cyril Hrubis
2026-06-24 10:42 ` Andrea Cervesato via ltp
2026-06-24 10:50 ` Cyril Hrubis
2026-06-24 11:10 ` Cyril Hrubis
2026-06-24 11:14 ` Andrea Cervesato via ltp
2026-06-24 12:28 ` Cyril Hrubis
2026-06-24 12:37 ` Andrea Cervesato via ltp
2026-06-24 13:21 ` Cyril Hrubis
2026-06-24 13:25 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 06/13] mem/ksm05: Add proper runtime support Cyril Hrubis
2026-06-24 12:04 ` Andrea Cervesato via ltp
2026-06-24 12:17 ` Cyril Hrubis
2026-06-24 12:20 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 08/13] lib: tst_test: Move the iterations to struct tst_test Cyril Hrubis
2026-06-24 12:05 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 10/13] testcases: Fix the CVE tags Cyril Hrubis
2026-06-24 12:05 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 11/13] build: rules.mk: Fix HOST_MAKE_TARGET rule Cyril Hrubis
2026-06-24 12:05 ` Andrea Cervesato via ltp
2026-06-24 9:18 ` [LTP] [PATCH 12/13] mem: vma03: Rewrite to the new test library Cyril Hrubis
2026-06-24 9:19 ` [LTP] [PATCH 13/13] metadata: Add runtest file generator Cyril Hrubis
2026-06-24 12:14 ` Andrea Cervesato via ltp
2026-06-24 12:25 ` Cyril Hrubis
2026-06-24 13:22 ` Andrea Cervesato via ltp
2026-06-24 13:27 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox