From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: "Claude Opus 4.6" <noreply@anthropic.com>,
Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 4/4] test: selftest: mmu: skip mirroring tests when not supported
Date: Mon, 2 Mar 2026 14:47:36 +0100 [thread overview]
Message-ID: <20260302134843.195007-5-a.fatoum@barebox.org> (raw)
In-Reply-To: <20260302134843.195007-1-a.fatoum@barebox.org>
PowerPC e500 uses large CAM-style TLB entries that can't do arbitrary
virtual-to-physical remapping. When arch_remap_range returns -ENOSYS
for the mirroring case, skip the 6 mirroring subtests instead of
counting them as failures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
test/self/mmu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/self/mmu.c b/test/self/mmu.c
index f5a09d76131e..1dd42db7e9c1 100644
--- a/test/self/mmu.c
+++ b/test/self/mmu.c
@@ -107,6 +107,10 @@ static void test_remap(void)
expect_success(ret, "asserting no mirror before remap");
ret = arch_remap_range(mirror, buffer_phys, TEST_BUFFER_SIZE, MAP_UNCACHED);
+ if (ret == -ENOSYS) {
+ skipped_tests += 6;
+ goto skip_mirroring;
+ }
expect_success(ret, "remapping with mirroring");
for (i = 0; i < TEST_BUFFER_SIZE; i += sizeof(u32)) {
@@ -150,6 +154,8 @@ static void test_remap(void)
expect_success(ret, "asserting mirroring after remap (virt += 4K)");
+skip_mirroring:
+
ret = remap_range(buffer, TEST_BUFFER_SIZE, MAP_DEFAULT);
expect_success(ret, "remapping buffer with default attrs");
memtest(buffer, TEST_BUFFER_SIZE, "newly cached buffer");
--
2.47.3
next prev parent reply other threads:[~2026-03-02 13:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 13:47 [PATCH 0/4] ci: fixes for PowerPC and networking test Ahmad Fatoum
2026-03-02 13:47 ` [PATCH 1/4] test: py: network: preserve saved_log_level across _await_prompt Ahmad Fatoum
2026-03-02 13:47 ` [PATCH 2/4] powerpc: fix initjmp storing function pointer at wrong offset Ahmad Fatoum
2026-03-02 13:47 ` [PATCH 3/4] powerpc: qemu-ppce500_defconfig: increase malloc area to default 4 MiB Ahmad Fatoum
2026-03-02 13:47 ` Ahmad Fatoum [this message]
2026-03-04 7:36 ` [PATCH 0/4] ci: fixes for PowerPC and networking test Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260302134843.195007-5-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
--cc=noreply@anthropic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox