Skip to contentSkip to conversation

selftests-mm-fix-incorrect-skip-output-in-pkey_sighandler_tests.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 7

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests/mm: fix incorrect skip output in pkey_sighandler_tests
has been removed from the -mm tree. Its filename was
selftests-mm-fix-incorrect-skip-output-in-pkey_sighandler_tests.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Zenghui Yu (Huawei)" <[email protected]>
Subject: selftests/mm: fix incorrect skip output in pkey_sighandler_tests
Date: Tue, 25 Aug 2026 20:30:23 +0800

When pkeys is not supported, ksft_exit_skip() runs with ksft_plan already set, which takes the "ok N # SKIP" branch intended for skipping a single test case. The result is a TAP plan of 5 but only one result line.

 $ ./pkey_sighandler_tests
 TAP version 13
 1..5
 ok 1 # SKIP pkeys not supported
 # 1 skipped test(s) detected. Consider enabling relevant config options to improve coverage.
 # Planned tests != run tests (5 != 1)
 # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:1 error:0

Move ksft_set_plan() after the skip check so ksft_exit_skip() takes the "1..0 # SKIP" branch, the correct TAP representation for skipping an entire test file.

 $ ./pkey_sighandler_tests
 TAP version 13
 1..0 # SKIP pkeys not supported

---

 tools/testing/selftests/mm/pkey_sighandler_tests.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/mm/pkey_sighandler_tests.c renamed from tools/testing/selftests/mm/pkey_sighandler_tests.c~selftests-mm-fix-incorrect-skip-output-in-pkey_sighandler_tests +2 -1
@@ -543,11 +543,12 @@ static void (*pkey_tests[])(void) = {
 int main(int argc, char *argv[])
 {
 	ksft_print_header();
-	ksft_set_plan(ARRAY_SIZE(pkey_tests));
 
 	if (!is_pkeys_supported())
 		ksft_exit_skip("pkeys not supported\n");
 
+	ksft_set_plan(ARRAY_SIZE(pkey_tests));
+
 	for (test_nr = 0; test_nr < ARRAY_SIZE(pkey_tests); test_nr++) {
 		tracing_on();
 		(*pkey_tests[test_nr])();

_

Patches currently in -mm which might be from [email protected] are

selftests-mm-remove-unreachable-returns-after-ksft-exit-helpers.patch docs-mm-damon-design-fix-broken-ref-usage-and-a-typo.patch selftests-mm-fix-size-truncation-in-pagemap_ioctl-test.patch selftests-mm-mark-file-local-symbols-of-pagemap_ioctlc-static.patch selftests-mm-init-page-sizes-early-in-pagemap_ioctl-test.patch selftests-damon-stop-kdamond-on-error-exits-of-no-op-commit-test.patch selftests-damon-ignore-test-generated-damon_dump_output.patch mm-damon-api-remove-unused-nr_damos_-enumerators.patch