From: Mark Brown <broonie(a)kernel.org>
[ Upstream commit 27141b690547da5650a420f26ec369ba142a9ebb ]
The PAC exec_sign_all() test spawns some child processes, creating pipes
to be stdin and stdout for the child. It cleans up most of the file
descriptors that are created as part of this but neglects to clean up the
parent end of the child stdin and stdout. Add the missing close() calls.
Signed-off-by: Mark Brown <broonie(a)kernel.org>
Link: https://lore.kernel.org/r/20241111-arm64-pac-test-collisions-v1-1-171875f37…
Signed-off-by: Catalin Marinas <catalin.marinas(a)arm.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
tools/testing/selftests/arm64/pauth/pac.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/arm64/pauth/pac.c b/tools/testing/selftests/arm64/pauth/pac.c
index b743daa772f55..5a07b3958fbf2 100644
--- a/tools/testing/selftests/arm64/pauth/pac.c
+++ b/tools/testing/selftests/arm64/pauth/pac.c
@@ -182,6 +182,9 @@ int exec_sign_all(struct signatures *signed_vals, size_t val)
return -1;
}
+ close(new_stdin[1]);
+ close(new_stdout[0]);
+
return 0;
}
--
2.43.0
From: Mark Brown <broonie(a)kernel.org>
[ Upstream commit 3e360ef0c0a1fb6ce9a302e40b8057c41ba8a9d2 ]
When building for streaming SVE the irritator for SVE skips updates of both
P0 and FFR. While FFR is skipped since it might not be present there is no
reason to skip corrupting P0 so switch to an instruction valid in streaming
mode and move the ifdef.
Signed-off-by: Mark Brown <broonie(a)kernel.org>
Link: https://lore.kernel.org/r/20241107-arm64-fp-stress-irritator-v2-3-c4b9622e3…
Signed-off-by: Catalin Marinas <catalin.marinas(a)arm.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
tools/testing/selftests/arm64/fp/sve-test.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/arm64/fp/sve-test.S b/tools/testing/selftests/arm64/fp/sve-test.S
index fff60e2a25add..4fcb492aee1fb 100644
--- a/tools/testing/selftests/arm64/fp/sve-test.S
+++ b/tools/testing/selftests/arm64/fp/sve-test.S
@@ -304,9 +304,9 @@ function irritator_handler
movi v0.8b, #1
movi v9.16b, #2
movi v31.8b, #3
-#ifndef SSVE
// And P0
- rdffr p0.b
+ ptrue p0.d
+#ifndef SSVE
// And FFR
wrffr p15.b
#endif
--
2.43.0
From: Mark Brown <broonie(a)kernel.org>
[ Upstream commit dca93d29845dfed60910ba13dbfb6ae6a0e19f6d ]
Currently if we encounter an error between fork() and exec() of a child
process we log the error to stderr. This means that the errors don't get
annotated with the child information which makes diagnostics harder and
means that if we miss the exit signal from the child we can deadlock
waiting for output from the child. Improve robustness and output quality
by logging to stdout instead.
Signed-off-by: Mark Brown <broonie(a)kernel.org>
Link: https://lore.kernel.org/r/20241023-arm64-fp-stress-exec-fail-v1-1-ee3c62932…
Signed-off-by: Catalin Marinas <catalin.marinas(a)arm.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
tools/testing/selftests/arm64/fp/fp-stress.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/arm64/fp/fp-stress.c b/tools/testing/selftests/arm64/fp/fp-stress.c
index faac24bdefeb9..80f22789504d6 100644
--- a/tools/testing/selftests/arm64/fp/fp-stress.c
+++ b/tools/testing/selftests/arm64/fp/fp-stress.c
@@ -79,7 +79,7 @@ static void child_start(struct child_data *child, const char *program)
*/
ret = dup2(pipefd[1], 1);
if (ret == -1) {
- fprintf(stderr, "dup2() %d\n", errno);
+ printf("dup2() %d\n", errno);
exit(EXIT_FAILURE);
}
@@ -89,7 +89,7 @@ static void child_start(struct child_data *child, const char *program)
*/
ret = dup2(startup_pipe[0], 3);
if (ret == -1) {
- fprintf(stderr, "dup2() %d\n", errno);
+ printf("dup2() %d\n", errno);
exit(EXIT_FAILURE);
}
@@ -107,16 +107,15 @@ static void child_start(struct child_data *child, const char *program)
*/
ret = read(3, &i, sizeof(i));
if (ret < 0)
- fprintf(stderr, "read(startp pipe) failed: %s (%d)\n",
- strerror(errno), errno);
+ printf("read(startp pipe) failed: %s (%d)\n",
+ strerror(errno), errno);
if (ret > 0)
- fprintf(stderr, "%d bytes of data on startup pipe\n",
- ret);
+ printf("%d bytes of data on startup pipe\n", ret);
close(3);
ret = execl(program, program, NULL);
- fprintf(stderr, "execl(%s) failed: %d (%s)\n",
- program, errno, strerror(errno));
+ printf("execl(%s) failed: %d (%s)\n",
+ program, errno, strerror(errno));
exit(EXIT_FAILURE);
} else {
--
2.43.0
Compiled binary files should be added to .gitignore
'git status' complains:
Untracked files:
(use "git add <file>..." to include in what will be committed)
alsa/global-timer
alsa/utimer-test
Cc: Mark Brown <broonie(a)kernel.org>
Cc: Jaroslav Kysela <perex(a)perex.cz>
Cc: Takashi Iwai <tiwai(a)suse.com>
Cc: Shuah Khan <shuah(a)kernel.org>
Signed-off-by: Li Zhijian <lizhijian(a)fujitsu.com>
---
Cc: linux-sound(a)vger.kernel.org
---
Hello,
Cover letter is here.
This patch set aims to make 'git status' clear after 'make' and 'make
run_tests' for kselftests.
---
V3:
sorted the ignore files
V2:
split as a separate patch from a small one [0]
[0] https://lore.kernel.org/linux-kselftest/20241015010817.453539-1-lizhijian@f…
Signed-off-by: Li Zhijian <lizhijian(a)fujitsu.com>
---
tools/testing/selftests/alsa/.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/alsa/.gitignore b/tools/testing/selftests/alsa/.gitignore
index 12dc3fcd3456..3dd8e1176b89 100644
--- a/tools/testing/selftests/alsa/.gitignore
+++ b/tools/testing/selftests/alsa/.gitignore
@@ -1,3 +1,5 @@
+global-timer
mixer-test
pcm-test
test-pcmtest-driver
+utimer-test
--
2.44.0
The include.sh file is generated for inclusion and should not be executable.
Otherwise, it will be added to kselftest-list.txt. Additionally, add the
executable bit for test.py at the same time to ensure proper functionality.
Fixes: 3ade6ce1255e ("selftests: rds: add testing infrastructure")
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
---
tools/testing/selftests/net/rds/Makefile | 3 ++-
tools/testing/selftests/net/rds/test.py | 0
2 files changed, 2 insertions(+), 1 deletion(-)
mode change 100644 => 100755 tools/testing/selftests/net/rds/test.py
diff --git a/tools/testing/selftests/net/rds/Makefile b/tools/testing/selftests/net/rds/Makefile
index da9714bc7aad..cf30307a829b 100644
--- a/tools/testing/selftests/net/rds/Makefile
+++ b/tools/testing/selftests/net/rds/Makefile
@@ -4,9 +4,10 @@ all:
@echo mk_build_dir="$(shell pwd)" > include.sh
TEST_PROGS := run.sh \
- include.sh \
test.py
+TEST_FILES := include.sh
+
EXTRA_CLEAN := /tmp/rds_logs
include ../../lib.mk
diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py
old mode 100644
new mode 100755
--
2.39.3 (Apple Git-146)
Hi Linus,
Please pull the following kunit update for Linux 6.13-rc1.
This pull request is fixed up with the right fix for the UAF bug and
includes other fixes.
linux_kselftest-kunit-6.13-rc1-fixed
kunit update for Linux 6.13-rc1
-- fixes user-after-free (UAF) bug in kunit_init_suite()
-- adds option to kunit tool to print just the summary of test results
-- adds option to kunit tool to print just the failed test results
-- fixes kunit_zalloc_skb() to use user passed in gfp value instead of
hardcoding GFP_KERNEL
-- fixes kunit_zalloc_skb() kernel doc to include allocation flags variable
-- updates KUnit email address for Brendan Higgins
-- adds LoongArch config to qemu_configs
-- changes tool to allow overriding the shutdown mode from qemu config
-- enables shutdown in loongarch qemu_config
-- fixes potential null dereference in kunit_device_driver_test()
-- fixes debugfs to use IS_ERR() for alloc_string_stream() error check
diff is attached.
Tests passed on my kunit repo & linux-next:
- Build make allmodconfig
./tools/testing/kunit/kunit.py run
./tools/testing/kunit/kunit.py run --alltests
./tools/testing/kunit/kunit.py run --arch x86_64
./tools/testing/kunit/kunit.py run --alltests --arch x86_64
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 2d5404caa8c7bb5c4e0435f94b28834ae5456623:
Linux 6.12-rc7 (2024-11-10 14:19:35 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-kunit-6.13-rc1-fixed
for you to fetch changes up to 62adcae479fe5bc04fa3b6c3f93bd340441f8b25:
kunit: qemu_configs: loongarch: Enable shutdown (2024-11-19 15:26:30 -0700)
----------------------------------------------------------------
linux_kselftest-kunit-6.13-rc1-fixed
kunit update for Linux 6.13-rc1
-- fixes user-after-free (UAF) bug in kunit_init_suite()
-- adds option to kunit tool to print just the summary of test results
-- adds option to kunit tool to print just the failed test results
-- fixes kunit_zalloc_skb() to use user passed in gfp value instead of
hardcoding GFP_KERNEL
-- fixes kunit_zalloc_skb() kernel doc to include allocation flags variable
-- updates KUnit email address for Brendan Higgins
-- adds LoongArch config to qemu_configs
-- changes tool to allow overriding the shutdown mode from qemu config
-- enables shutdown in loongarch qemu_config
-- fixes potential null dereference in kunit_device_driver_test()
-- fixes debugfs to use IS_ERR() for alloc_string_stream() error check
----------------------------------------------------------------
Brendan Higgins (1):
MAINTAINERS: Update KUnit email address for Brendan Higgins
Dan Carpenter (2):
kunit: skb: use "gfp" variable instead of hardcoding GFP_KERNEL
kunit: skb: add gfp to kernel doc for kunit_zalloc_skb()
David Gow (1):
kunit: tool: Only print the summary
Jinjie Ruan (1):
kunit: string-stream: Fix a UAF bug in kunit_init_suite()
Kuan-Wei Chiu (1):
kunit: debugfs: Use IS_ERR() for alloc_string_stream() error check
Rae Moar (1):
kunit: tool: print failed tests only
Thomas Weißschuh (3):
kunit: qemu_configs: Add LoongArch config
kunit: tool: Allow overriding the shutdown mode from qemu config
kunit: qemu_configs: loongarch: Enable shutdown
Zichen Xie (1):
kunit: Fix potential null dereference in kunit_device_driver_test()
MAINTAINERS | 2 +-
include/kunit/skbuff.h | 5 +-
lib/kunit/debugfs.c | 9 +-
lib/kunit/kunit-test.c | 2 +
tools/testing/kunit/kunit.py | 28 +++++-
tools/testing/kunit/kunit_kernel.py | 4 +-
tools/testing/kunit/kunit_parser.py | 134 ++++++++++++++++----------
tools/testing/kunit/kunit_printer.py | 14 ++-
tools/testing/kunit/kunit_tool_test.py | 55 +++++------
tools/testing/kunit/qemu_configs/loongarch.py | 21 ++++
10 files changed, 183 insertions(+), 91 deletions(-)
create mode 100644 tools/testing/kunit/qemu_configs/loongarch.py
----------------------------------------------------------------
The testing effort is increasing throughout the community.
The tests are generally merged into the subsystem trees,
and are of relatively narrow interest. The patch volume on
linux-kselftest(a)vger.kernel.org makes it hard to follow
the changes to the framework, and discuss proposals.
Create a new ML focused on the framework of kselftests,
which will hopefully be similarly low volume to the workflows@
mailing list.
From the responses to v1 I gather that the preference is to
keep the existing list for all (or create an alias to it);
the framework-only section should be the one to have a new
list created.
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
---
Sorry for the delay, the responses to v1 weren't super positive
but I keep thinking this would be very useful :) Or at the very
least I find workflows@ very useful and informative as a maintainer.
Posting as an RFC because we need to create the new ML.
v1: https://lore.kernel.org/20241003142328.622730-1-kuba@kernel.org
CC: shuah(a)kernel.org
CC: Tim.Bird(a)sony.com
CC: linux-kselftest(a)vger.kernel.org
CC: workflows(a)vger.kernel.org
---
MAINTAINERS | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index f245573722ef..345a0657ba1d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12395,7 +12395,7 @@ S: Supported
F: Documentation/admin-guide/reporting-regressions.rst
F: Documentation/process/handling-regressions.rst
-KERNEL SELFTEST FRAMEWORK
+KERNEL SELFTEST
M: Shuah Khan <shuah(a)kernel.org>
M: Shuah Khan <skhan(a)linuxfoundation.org>
L: linux-kselftest(a)vger.kernel.org
@@ -12405,6 +12405,19 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git
F: Documentation/dev-tools/kselftest*
F: tools/testing/selftests/
+KERNEL SELFTEST FRAMEWORK
+M: Shuah Khan <shuah(a)kernel.org>
+M: Shuah Khan <skhan(a)linuxfoundation.org>
+L: linux-kselftest-core(a)vger.kernel.org
+S: Maintained
+F: Documentation/dev-tools/kselftest*
+F: tools/testing/selftests/kselftest/
+F: tools/testing/selftests/lib/
+F: tools/testing/selftests/lib.mk
+F: tools/testing/selftests/Makefile
+F: tools/testing/selftests/*.sh
+F: tools/testing/selftests/*.h
+
KERNEL SMB3 SERVER (KSMBD)
M: Namjae Jeon <linkinjeon(a)kernel.org>
M: Steve French <sfrench(a)samba.org>
--
2.47.0