* [PATCH v2 0/5] selftest/arm64: Fix MTE test setup and TAP reporting
@ 2026-08-21 14:15 Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 1/5] selftests/arm64: Print TAP header Muhammad Usama Anjum
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-21 14:15 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Mark Brown, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
Cc: Muhammad Usama Anjum
Running the mainline arm64 MTE selftests on a Pixel 8 exposed three
independent reporting problems. Fix each issue independently, then
add an arm64 Kconfig fragment covering the facilities used by the MTE
tests.
Testing was performed on a Pixel 8 with an Android 6.1 kernel built with
the new configuration. All nine static MTE binaries returned success.
Changes since v1:
- Add missing MTE TAP headers as an output-only cleanup and clarify why
line buffering prevents duplicate GCR_EL1 plan output.
- Validate KSM privileges and optional sysfs access before setup.
- Move and expand the arm64 config fragment, and standardize subjects on
the selftests/arm64 prefix.
Muhammad Usama Anjum (5):
selftests/arm64: Print TAP header
selftests/arm64: Print missing MTE TAP headers
selftests/arm64: Treat KSM merge_across_nodes as optional
selftests/arm64: Fix MTE prctl TAP plan
selftests/arm64: Add MTE test config fragment
tools/testing/selftests/arm64/config | 17 ++++++++++
.../selftests/arm64/mte/check_buffer_fill.c | 2 ++
.../selftests/arm64/mte/check_child_memory.c | 2 ++
.../arm64/mte/check_gcr_el1_cswitch.c | 1 +
.../arm64/mte/check_hugetlb_options.c | 2 ++
.../selftests/arm64/mte/check_ksm_options.c | 31 +++++++++++++++++--
.../selftests/arm64/mte/check_mmap_options.c | 2 ++
.../testing/selftests/arm64/mte/check_prctl.c | 2 +-
.../arm64/mte/check_tags_inclusion.c | 2 ++
.../selftests/arm64/mte/check_user_mem.c | 2 ++
10 files changed, 59 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/arm64/config
--
2.47.3
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/5] selftests/arm64: Print TAP header
2026-08-21 14:15 [PATCH v2 0/5] selftest/arm64: Fix MTE test setup and TAP reporting Muhammad Usama Anjum
@ 2026-08-21 14:15 ` Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers Muhammad Usama Anjum
` (3 subsequent siblings)
4 siblings, 0 replies; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-21 14:15 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Mark Brown, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
Cc: Muhammad Usama Anjum
The GCR_EL1 context-switch test prints its TAP plan before forking 1,024
child processes. When stdout is fully buffered, the plan remains in the
stdio buffer. Each child inherits the pending "1..1" line and flushes its
copy from exit(), producing repeated plan lines.
ksft_print_header() enables line buffering before printing the TAP
header. Call it before the plan so the plan is flushed before the child
processes are forked.
Fixes: 29f080881601 ("kselftest/arm64: check GCR_EL1 after context switch")
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Muhammad Usama Anjum <usama.anjum@arm.com>
---
Changes since v1:
- Explain how line buffering prevents duplicate plan lines.
- Use the selftests/arm64 subject prefix.
---
tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c b/tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c
index 325bca0de0f6e..d23f154d3288c 100644
--- a/tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c
+++ b/tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c
@@ -131,6 +131,7 @@ int main(int argc, char *argv[])
if (err)
return err;
+ ksft_print_header();
ksft_set_plan(1);
evaluate_test(mte_gcr_fork_test(),
--
2.47.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers
2026-08-21 14:15 [PATCH v2 0/5] selftest/arm64: Fix MTE test setup and TAP reporting Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 1/5] selftests/arm64: Print TAP header Muhammad Usama Anjum
@ 2026-08-21 14:15 ` Muhammad Usama Anjum
2026-08-21 16:04 ` Mark Brown
2026-08-21 14:15 ` [PATCH v2 3/5] selftests/arm64: Treat KSM merge_across_nodes as optional Muhammad Usama Anjum
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-21 14:15 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Mark Brown, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
Cc: Muhammad Usama Anjum
Most of the remaining MTE tests set a TAP plan and emit results without
first printing the TAP version header. Direct execution therefore starts
with a plan such as "1..20" instead of "TAP version 13".
Print the header in every remaining MTE test that is missing it. Do so
before setup and prerequisite checks so early failures and whole-test
skips also retain the header.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@arm.com>
---
Newly introduced. This is an output-format consistency change and does
not fix duplicated output or alter test execution behavior.
---
tools/testing/selftests/arm64/mte/check_buffer_fill.c | 2 ++
tools/testing/selftests/arm64/mte/check_child_memory.c | 2 ++
tools/testing/selftests/arm64/mte/check_hugetlb_options.c | 2 ++
tools/testing/selftests/arm64/mte/check_ksm_options.c | 2 ++
tools/testing/selftests/arm64/mte/check_mmap_options.c | 2 ++
tools/testing/selftests/arm64/mte/check_tags_inclusion.c | 2 ++
tools/testing/selftests/arm64/mte/check_user_mem.c | 2 ++
7 files changed, 14 insertions(+)
diff --git a/tools/testing/selftests/arm64/mte/check_buffer_fill.c b/tools/testing/selftests/arm64/mte/check_buffer_fill.c
index ff4e075033493..039b1d7d85663 100644
--- a/tools/testing/selftests/arm64/mte/check_buffer_fill.c
+++ b/tools/testing/selftests/arm64/mte/check_buffer_fill.c
@@ -406,6 +406,8 @@ int main(int argc, char *argv[])
size_t page_size = getpagesize();
int item = ARRAY_SIZE(sizes);
+ ksft_print_header();
+
sizes[item - 3] = page_size - 1;
sizes[item - 2] = page_size;
sizes[item - 1] = page_size + 1;
diff --git a/tools/testing/selftests/arm64/mte/check_child_memory.c b/tools/testing/selftests/arm64/mte/check_child_memory.c
index 5e97ee792e4d2..e6a8acca2a941 100644
--- a/tools/testing/selftests/arm64/mte/check_child_memory.c
+++ b/tools/testing/selftests/arm64/mte/check_child_memory.c
@@ -146,6 +146,8 @@ int main(int argc, char *argv[])
int err;
int item = ARRAY_SIZE(sizes);
+ ksft_print_header();
+
page_size = getpagesize();
if (!page_size) {
ksft_print_msg("ERR: Unable to get page size\n");
diff --git a/tools/testing/selftests/arm64/mte/check_hugetlb_options.c b/tools/testing/selftests/arm64/mte/check_hugetlb_options.c
index aad1234c7e0fe..23e4a7a9950c1 100644
--- a/tools/testing/selftests/arm64/mte/check_hugetlb_options.c
+++ b/tools/testing/selftests/arm64/mte/check_hugetlb_options.c
@@ -230,6 +230,8 @@ int main(int argc, char *argv[])
void *map_ptr;
unsigned long map_size;
+ ksft_print_header();
+
err = mte_default_setup();
if (err)
return err;
diff --git a/tools/testing/selftests/arm64/mte/check_ksm_options.c b/tools/testing/selftests/arm64/mte/check_ksm_options.c
index 0cf5faef17248..866f0929b6647 100644
--- a/tools/testing/selftests/arm64/mte/check_ksm_options.c
+++ b/tools/testing/selftests/arm64/mte/check_ksm_options.c
@@ -132,6 +132,8 @@ int main(int argc, char *argv[])
{
int err;
+ ksft_print_header();
+
err = mte_default_setup();
if (err)
return err;
diff --git a/tools/testing/selftests/arm64/mte/check_mmap_options.c b/tools/testing/selftests/arm64/mte/check_mmap_options.c
index c100af3012cbb..492f2cd41f43b 100644
--- a/tools/testing/selftests/arm64/mte/check_mmap_options.c
+++ b/tools/testing/selftests/arm64/mte/check_mmap_options.c
@@ -945,6 +945,8 @@ int main(int argc, char *argv[])
},
};
+ ksft_print_header();
+
err = mte_default_setup();
if (err)
return err;
diff --git a/tools/testing/selftests/arm64/mte/check_tags_inclusion.c b/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
index 4b764f2a81857..6b4fa6705d7c1 100644
--- a/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
+++ b/tools/testing/selftests/arm64/mte/check_tags_inclusion.c
@@ -175,6 +175,8 @@ int main(int argc, char *argv[])
{
int err;
+ ksft_print_header();
+
err = mte_default_setup();
if (err)
return err;
diff --git a/tools/testing/selftests/arm64/mte/check_user_mem.c b/tools/testing/selftests/arm64/mte/check_user_mem.c
index fb7936c4e0978..af343aa617323 100644
--- a/tools/testing/selftests/arm64/mte/check_user_mem.c
+++ b/tools/testing/selftests/arm64/mte/check_user_mem.c
@@ -201,6 +201,8 @@ int main(int argc, char *argv[])
int tag_offsets[] = {page_sz, MT_GRANULE_SIZE};
char test_name[TEST_NAME_MAX];
+ ksft_print_header();
+
page_sz = getpagesize();
if (!page_sz) {
ksft_print_msg("ERR: Unable to get page size\n");
--
2.47.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 3/5] selftests/arm64: Treat KSM merge_across_nodes as optional
2026-08-21 14:15 [PATCH v2 0/5] selftest/arm64: Fix MTE test setup and TAP reporting Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 1/5] selftests/arm64: Print TAP header Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers Muhammad Usama Anjum
@ 2026-08-21 14:15 ` Muhammad Usama Anjum
2026-08-21 15:43 ` Mark Brown
2026-08-21 14:15 ` [PATCH v2 4/5] selftests/arm64: Fix MTE prctl TAP plan Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 5/5] selftests/arm64: Add MTE test config fragment Muhammad Usama Anjum
4 siblings, 1 reply; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-21 14:15 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Mark Brown, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
Cc: Muhammad Usama Anjum
The MTE KSM test requires write access to KSM sysfs but does not check
that it is running as root. It also unconditionally saves, enables and
restores the merge_across_nodes attribute. The kernel only creates this
attribute when CONFIG_NUMA=y, so a non-NUMA kernel prints the following
message three times even though every KSM subtest passes:
# ERR: missing /sys/kernel/mm/ksm/merge_across_nodes
Skip the test when it is not running as root. Check that the optional
attribute is readable and writable, treating ENOENT as its expected
absence on non-NUMA kernels but reporting other access failures. Only
save, enable and restore the attribute when it is available.
Check MTE availability before the privilege and sysfs checks so systems
without MTE retain the existing feature-unavailable skip result.
This preserves the existing behavior on NUMA kernels without requiring
NUMA or reducing KSM coverage on single-node systems.
Fixes: f981d8fa2646 ("kselftest/arm64: Verify KSM page merge for MTE pages")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@arm.com>
---
Changes since v1:
- Check MTE availability before requiring root and validating
merge_across_nodes access.
- Use the selftests/arm64 subject prefix.
---
.../selftests/arm64/mte/check_ksm_options.c | 29 +++++++++++++++++--
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/arm64/mte/check_ksm_options.c b/tools/testing/selftests/arm64/mte/check_ksm_options.c
index 866f0929b6647..6dc605cf2d1bb 100644
--- a/tools/testing/selftests/arm64/mte/check_ksm_options.c
+++ b/tools/testing/selftests/arm64/mte/check_ksm_options.c
@@ -6,6 +6,7 @@
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -22,6 +23,20 @@
static size_t page_sz;
static unsigned long ksm_sysfs[5];
+static bool has_merge_across_nodes;
+
+static bool merge_across_nodes_available(void)
+{
+ const char *path = PATH_KSM "merge_across_nodes";
+
+ if (!access(path, R_OK | W_OK))
+ return true;
+ if (errno == ENOENT)
+ return false;
+
+ ksft_exit_fail_msg("Unable to read and write %s: %s\n", path,
+ strerror(errno));
+}
static unsigned long read_sysfs(char *str)
{
@@ -56,8 +71,10 @@ static void write_sysfs(char *str, unsigned long val)
static void mte_ksm_setup(void)
{
- ksm_sysfs[0] = read_sysfs(PATH_KSM "merge_across_nodes");
- write_sysfs(PATH_KSM "merge_across_nodes", 1);
+ if (has_merge_across_nodes) {
+ ksm_sysfs[0] = read_sysfs(PATH_KSM "merge_across_nodes");
+ write_sysfs(PATH_KSM "merge_across_nodes", 1);
+ }
ksm_sysfs[1] = read_sysfs(PATH_KSM "sleep_millisecs");
write_sysfs(PATH_KSM "sleep_millisecs", 0);
ksm_sysfs[2] = read_sysfs(PATH_KSM "run");
@@ -70,7 +87,8 @@ static void mte_ksm_setup(void)
static void mte_ksm_restore(void)
{
- write_sysfs(PATH_KSM "merge_across_nodes", ksm_sysfs[0]);
+ if (has_merge_across_nodes)
+ write_sysfs(PATH_KSM "merge_across_nodes", ksm_sysfs[0]);
write_sysfs(PATH_KSM "sleep_millisecs", ksm_sysfs[1]);
write_sysfs(PATH_KSM "run", ksm_sysfs[2]);
write_sysfs(PATH_KSM "max_page_sharing", ksm_sysfs[3]);
@@ -137,6 +155,11 @@ int main(int argc, char *argv[])
err = mte_default_setup();
if (err)
return err;
+
+ if (geteuid() != 0)
+ ksft_exit_skip("Please run the test as root\n");
+
+ has_merge_across_nodes = merge_across_nodes_available();
page_sz = getpagesize();
if (!page_sz) {
ksft_print_msg("ERR: Unable to get page size\n");
--
2.47.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 4/5] selftests/arm64: Fix MTE prctl TAP plan
2026-08-21 14:15 [PATCH v2 0/5] selftest/arm64: Fix MTE test setup and TAP reporting Muhammad Usama Anjum
` (2 preceding siblings ...)
2026-08-21 14:15 ` [PATCH v2 3/5] selftests/arm64: Treat KSM merge_across_nodes as optional Muhammad Usama Anjum
@ 2026-08-21 14:15 ` Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 5/5] selftests/arm64: Add MTE test config fragment Muhammad Usama Anjum
4 siblings, 0 replies; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-21 14:15 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Mark Brown, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
Cc: Muhammad Usama Anjum
The MTE prctl test emits one result from check_basic_read() followed by
one result for each of the seven entries in mte_modes[]. However, the TAP
plan only accounts for the array entries, producing:
# Planned tests != run tests (7 != 8)
Include the basic read check in the plan so that all eight emitted results
are declared.
Reviewed-by: Mark Brown <broonie@kernel.org>
Fixes: 1f488fb91378 ("kselftest/arm64/mte: Add MTE_STORE_ONLY testcases")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@arm.com>
---
Changes since v1:
- Use the selftests/arm64 subject prefix.
---
tools/testing/selftests/arm64/mte/check_prctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/arm64/mte/check_prctl.c b/tools/testing/selftests/arm64/mte/check_prctl.c
index f7f320defa7b9..d16a91117eef9 100644
--- a/tools/testing/selftests/arm64/mte/check_prctl.c
+++ b/tools/testing/selftests/arm64/mte/check_prctl.c
@@ -119,7 +119,7 @@ int main(void)
int i;
ksft_print_header();
- ksft_set_plan(ARRAY_SIZE(mte_modes));
+ ksft_set_plan(ARRAY_SIZE(mte_modes) + 1);
check_basic_read();
for (i = 0; i < ARRAY_SIZE(mte_modes); i++)
--
2.47.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 5/5] selftests/arm64: Add MTE test config fragment
2026-08-21 14:15 [PATCH v2 0/5] selftest/arm64: Fix MTE test setup and TAP reporting Muhammad Usama Anjum
` (3 preceding siblings ...)
2026-08-21 14:15 ` [PATCH v2 4/5] selftests/arm64: Fix MTE prctl TAP plan Muhammad Usama Anjum
@ 2026-08-21 14:15 ` Muhammad Usama Anjum
2026-08-21 16:07 ` Mark Brown
4 siblings, 1 reply; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-21 14:15 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Mark Brown, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
Cc: Muhammad Usama Anjum
The arm64 selftest collection has no Kconfig fragment, so kernels built
with the selftest requirements are not guaranteed to provide the support
used by these tests.
Add a fragment covering all tests in arm64.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@arm.com>
---
Changes since v1:
- Move the config fragment to the arm64 directory.
- Add requirements shared by other arm64 selftests.
- Use the selftests/arm64 subject prefix.
---
tools/testing/selftests/arm64/config | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 tools/testing/selftests/arm64/config
diff --git a/tools/testing/selftests/arm64/config b/tools/testing/selftests/arm64/config
new file mode 100644
index 0000000000000..0fa9755853924
--- /dev/null
+++ b/tools/testing/selftests/arm64/config
@@ -0,0 +1,17 @@
+CONFIG_ARM64_BTI=y
+CONFIG_ARM64_GCS=y
+CONFIG_ARM64_MTE=y
+CONFIG_ARM64_POE=y
+CONFIG_ARM64_PTR_AUTH=y
+CONFIG_ARM64_SME=y
+CONFIG_ARM64_SVE=y
+CONFIG_ARM64_TAGGED_ADDR_ABI=y
+CONFIG_HUGETLBFS=y
+CONFIG_KSM=y
+CONFIG_PROC_FS=y
+CONFIG_SECCOMP=y
+CONFIG_SECCOMP_FILTER=y
+CONFIG_SHMEM=y
+CONFIG_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
--
2.47.3
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/5] selftests/arm64: Treat KSM merge_across_nodes as optional
2026-08-21 14:15 ` [PATCH v2 3/5] selftests/arm64: Treat KSM merge_across_nodes as optional Muhammad Usama Anjum
@ 2026-08-21 15:43 ` Mark Brown
2026-08-21 15:56 ` Muhammad Usama Anjum
0 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2026-08-21 15:43 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
On Fri, Aug 21, 2026 at 03:15:51PM +0100, Muhammad Usama Anjum wrote:
> +static bool merge_across_nodes_available(void)
> +{
> + const char *path = PATH_KSM "merge_across_nodes";
> +
> + if (!access(path, R_OK | W_OK))
> + return true;
> + if (errno == ENOENT)
> + return false;
> +
> + ksft_exit_fail_msg("Unable to read and write %s: %s\n", path,
> + strerror(errno));
> +}
If prerequistites for the test aren't available I'd expect this to be a
skip rather than a fail.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 3/5] selftests/arm64: Treat KSM merge_across_nodes as optional
2026-08-21 15:43 ` Mark Brown
@ 2026-08-21 15:56 ` Muhammad Usama Anjum
0 siblings, 0 replies; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-21 15:56 UTC (permalink / raw)
To: Mark Brown
Cc: usama.anjum, Catalin Marinas, Will Deacon, Mark Rutland,
Shuah Khan, Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
On 21/08/2026 4:43 pm, Mark Brown wrote:
> On Fri, Aug 21, 2026 at 03:15:51PM +0100, Muhammad Usama Anjum wrote:
>
>> +static bool merge_across_nodes_available(void)
>> +{
>> + const char *path = PATH_KSM "merge_across_nodes";
>> +
>> + if (!access(path, R_OK | W_OK))
>> + return true;
>> + if (errno == ENOENT)
>> + return false;
>> +
>> + ksft_exit_fail_msg("Unable to read and write %s: %s\n", path,
>> + strerror(errno));
>> +}
>
> If prerequistites for the test aren't available I'd expect this to be a
> skip rather than a fail.
You're right. Access to the attribute is a prerequisite rather than the
behavior under test, so I'll report access failures as KSFT_SKIP.
--
Thanks,
Usama
--
Thanks,
Usama
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers
2026-08-21 14:15 ` [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers Muhammad Usama Anjum
@ 2026-08-21 16:04 ` Mark Brown
2026-08-21 16:11 ` Muhammad Usama Anjum
0 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2026-08-21 16:04 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
On Fri, Aug 21, 2026 at 03:15:50PM +0100, Muhammad Usama Anjum wrote:
> Most of the remaining MTE tests set a TAP plan and emit results without
> first printing the TAP version header. Direct execution therefore starts
> with a plan such as "1..20" instead of "TAP version 13".
>
> Print the header in every remaining MTE test that is missing it. Do so
> before setup and prerequisite checks so early failures and whole-test
> skips also retain the header.
>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@arm.com>
> ---
> Newly introduced. This is an output-format consistency change and does
> not fix duplicated output or alter test execution behavior.
This should probably just be a single patch with patch 1.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 5/5] selftests/arm64: Add MTE test config fragment
2026-08-21 14:15 ` [PATCH v2 5/5] selftests/arm64: Add MTE test config fragment Muhammad Usama Anjum
@ 2026-08-21 16:07 ` Mark Brown
0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2026-08-21 16:07 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
On Fri, Aug 21, 2026 at 03:15:53PM +0100, Muhammad Usama Anjum wrote:
> The arm64 selftest collection has no Kconfig fragment, so kernels built
> with the selftest requirements are not guaranteed to provide the support
> used by these tests.
>
> Add a fragment covering all tests in arm64.
Reviewed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers
2026-08-21 16:04 ` Mark Brown
@ 2026-08-21 16:11 ` Muhammad Usama Anjum
2026-08-21 16:21 ` Mark Brown
0 siblings, 1 reply; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-21 16:11 UTC (permalink / raw)
To: Mark Brown
Cc: usama.anjum, Catalin Marinas, Will Deacon, Mark Rutland,
Shuah Khan, Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
On 21/08/2026 5:04 pm, Mark Brown wrote:
> On Fri, Aug 21, 2026 at 03:15:50PM +0100, Muhammad Usama Anjum wrote:
>> Most of the remaining MTE tests set a TAP plan and emit results without
>> first printing the TAP version header. Direct execution therefore starts
>> with a plan such as "1..20" instead of "TAP version 13".
>>
>> Print the header in every remaining MTE test that is missing it. Do so
>> before setup and prerequisite checks so early failures and whole-test
>> skips also retain the header.
>>
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@arm.com>
>> ---
>> Newly introduced. This is an output-format consistency change and does
>> not fix duplicated output or alter test execution behavior.
>
> This should probably just be a single patch with patch 1.
My idea here is that the first patch would get backported as that's
true logs cleanup patch. (1024 lines of 1..1 are avoided with that).
This patch wouldn't get backported. Its just formatting fixing of the
output.
--
Thanks,
Usama
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers
2026-08-21 16:11 ` Muhammad Usama Anjum
@ 2026-08-21 16:21 ` Mark Brown
2026-08-25 10:21 ` Muhammad Usama Anjum
0 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2026-08-21 16:21 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Catalin Marinas, Will Deacon, Mark Rutland, Shuah Khan,
Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
On Fri, Aug 21, 2026 at 05:11:28PM +0100, Muhammad Usama Anjum wrote:
> On 21/08/2026 5:04 pm, Mark Brown wrote:
> > This should probably just be a single patch with patch 1.
> My idea here is that the first patch would get backported as that's
> true logs cleanup patch. (1024 lines of 1..1 are avoided with that).
> This patch wouldn't get backported. Its just formatting fixing of the
> output.
I'm not sure there's any problem with the extra backports, and it's a
spec correctness fix for the output which given the existing scope of
stable backports is probably reasonable.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers
2026-08-21 16:21 ` Mark Brown
@ 2026-08-25 10:21 ` Muhammad Usama Anjum
0 siblings, 0 replies; 13+ messages in thread
From: Muhammad Usama Anjum @ 2026-08-25 10:21 UTC (permalink / raw)
To: Mark Brown
Cc: usama.anjum, Catalin Marinas, Will Deacon, Mark Rutland,
Shuah Khan, Andrey Konovalov, Andrew Morton, Vincenzo Frascino,
Amit Daniel Kachhap, Yeoreum Yun, open list,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
open list:KERNEL SELFTEST FRAMEWORK
On 21/08/2026 5:21 pm, Mark Brown wrote:
> On Fri, Aug 21, 2026 at 05:11:28PM +0100, Muhammad Usama Anjum wrote:
>> On 21/08/2026 5:04 pm, Mark Brown wrote:
>
>>> This should probably just be a single patch with patch 1.
>
>> My idea here is that the first patch would get backported as that's
>> true logs cleanup patch. (1024 lines of 1..1 are avoided with that).
>> This patch wouldn't get backported. Its just formatting fixing of the
>> output.
>
> I'm not sure there's any problem with the extra backports, and it's a
> spec correctness fix for the output which given the existing scope of
> stable backports is probably reasonable.
Okay. I'll merge this patch into the first patch; while keeping the first
patch's fixes tag intact.
--
Thanks,
Usama
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-08-25 10:22 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 14:15 [PATCH v2 0/5] selftest/arm64: Fix MTE test setup and TAP reporting Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 1/5] selftests/arm64: Print TAP header Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 2/5] selftests/arm64: Print missing MTE TAP headers Muhammad Usama Anjum
2026-08-21 16:04 ` Mark Brown
2026-08-21 16:11 ` Muhammad Usama Anjum
2026-08-21 16:21 ` Mark Brown
2026-08-25 10:21 ` Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 3/5] selftests/arm64: Treat KSM merge_across_nodes as optional Muhammad Usama Anjum
2026-08-21 15:43 ` Mark Brown
2026-08-21 15:56 ` Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 4/5] selftests/arm64: Fix MTE prctl TAP plan Muhammad Usama Anjum
2026-08-21 14:15 ` [PATCH v2 5/5] selftests/arm64: Add MTE test config fragment Muhammad Usama Anjum
2026-08-21 16:07 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox