The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] kunit: qemu_configs: Disable faulting tests on 32-bit SPARC
@ 2025-04-16  9:38 David Gow
  2025-04-16 10:06 ` Thomas Weißschuh
  0 siblings, 1 reply; 2+ messages in thread
From: David Gow @ 2025-04-16  9:38 UTC (permalink / raw)
  To: Thomas Weißschuh, Rae Moar, Shuah Khan, Brendan Higgins
  Cc: David Gow, linux-kselftest, kunit-dev, linux-kernel

The 32-bit sparc configuration (--arch sparc) crashes on
the kunit_fault_test. It's known that some architectures don't handle
deliberate segfaults in kernel mode well, so there's a config switch to
disable tests which rely upon it by default.

Use this for the sparc config, making sure the default config for it
passes.

Fixes: 87c9c1631788 ("kunit: tool: add support for QEMU")
Signed-off-by: David Gow <davidgow@google.com>
---

Another quick fix to the sparc qemu_config I noticed while testing [1].

---
 tools/testing/kunit/qemu_configs/sparc.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/kunit/qemu_configs/sparc.py b/tools/testing/kunit/qemu_configs/sparc.py
index 3131dd299a6e..2019550a1b69 100644
--- a/tools/testing/kunit/qemu_configs/sparc.py
+++ b/tools/testing/kunit/qemu_configs/sparc.py
@@ -2,6 +2,7 @@ from ..qemu_config import QemuArchParams
 
 QEMU_ARCH = QemuArchParams(linux_arch='sparc',
 			   kconfig='''
+CONFIG_KUNIT_FAULT_TEST=n
 CONFIG_SPARC32=y
 CONFIG_SERIAL_SUNZILOG=y
 CONFIG_SERIAL_SUNZILOG_CONSOLE=y
-- 
2.49.0.604.gff1f9ca942-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kunit: qemu_configs: Disable faulting tests on 32-bit SPARC
  2025-04-16  9:38 [PATCH] kunit: qemu_configs: Disable faulting tests on 32-bit SPARC David Gow
@ 2025-04-16 10:06 ` Thomas Weißschuh
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Weißschuh @ 2025-04-16 10:06 UTC (permalink / raw)
  To: David Gow
  Cc: Rae Moar, Shuah Khan, Brendan Higgins, linux-kselftest, kunit-dev,
	linux-kernel

On Wed, Apr 16, 2025 at 05:38:25PM +0800, David Gow wrote:
> The 32-bit sparc configuration (--arch sparc) crashes on
> the kunit_fault_test. It's known that some architectures don't handle
> deliberate segfaults in kernel mode well, so there's a config switch to
> disable tests which rely upon it by default.
> 
> Use this for the sparc config, making sure the default config for it
> passes.
> 
> Fixes: 87c9c1631788 ("kunit: tool: add support for QEMU")
> Signed-off-by: David Gow <davidgow@google.com>

Thanks!

I am wondering if this should instead be done in lib/kunit/Kconfig.
Not all users of kunit are guaranteed to use kunit.py.

In any case:

Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Tested-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

FYI the usercopy test is also broken:

[12:05:43]     # usercopy_test_valid: EXPECTATION FAILED at lib/tests/usercopy_kunit.c:209
[12:05:43]     Expected val_u64 == 0x5a5b5c5d6a6b6c6d, but
[12:05:43]         val_u64 == 1515936861 (0x5a5b5c5d)
[12:05:43]         0x5a5b5c5d6a6b6c6d == 6510899242581322861 (0x5a5b5c5d6a6b6c6d)
[12:05:43] legitimate get_user (u64) failed to do copy
[12:05:43] [FAILED] usercopy_test_valid

I can send a patch for that later,
but if you are on it anyways that would work for me, too.


> ---
> 
> Another quick fix to the sparc qemu_config I noticed while testing [1].
> 
> ---
>  tools/testing/kunit/qemu_configs/sparc.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/testing/kunit/qemu_configs/sparc.py b/tools/testing/kunit/qemu_configs/sparc.py
> index 3131dd299a6e..2019550a1b69 100644
> --- a/tools/testing/kunit/qemu_configs/sparc.py
> +++ b/tools/testing/kunit/qemu_configs/sparc.py
> @@ -2,6 +2,7 @@ from ..qemu_config import QemuArchParams
>  
>  QEMU_ARCH = QemuArchParams(linux_arch='sparc',
>  			   kconfig='''
> +CONFIG_KUNIT_FAULT_TEST=n
>  CONFIG_SPARC32=y
>  CONFIG_SERIAL_SUNZILOG=y
>  CONFIG_SERIAL_SUNZILOG_CONSOLE=y
> -- 
> 2.49.0.604.gff1f9ca942-goog
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-16 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16  9:38 [PATCH] kunit: qemu_configs: Disable faulting tests on 32-bit SPARC David Gow
2025-04-16 10:06 ` Thomas Weißschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox