diff options
| author | Muhammad Usama Anjum <usama.anjum@arm.com> | 2026-08-25 12:18:35 +0100 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-08-27 14:18:39 +0000 |
| commit | 1a0dba077f34a2f8faa98308d30d4b546d073145 (patch) | |
| tree | 1388c79eb7c04f76b6de598b7b907161173a1e85 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 8d2237e9d6902e234bb89aabb9cd6a9e91357223 (diff) | |
selftests/arm64: Treat KSM merge_across_nodes as optional
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 and skipping the test for 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>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
