linux-next/arch/m68k
Tamir Duberstein 1c11b09ea0 xarray: port tests to kunit
Minimally rewrite the XArray unit tests to use kunit.  This integrates
nicely with existing kunit tools which produce nicer human-readable output
compared to the existing machinery.

Running the xarray tests before this change requires an obscure
invocation

```
tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 \
  --kconfig_add CONFIG_TEST_XARRAY=y --raw_output=all nothing
```

which on failure produces

```
BUG at check_reserve:513
...
XArray: 6782340 of 6782364 tests passed
```

and exits 0.

Running the xarray tests after this change requires a simpler invocation

```
tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 \
  xarray
```

which on failure produces (colors omitted)

```
[09:50:53] ====================== check_reserve  ======================
[09:50:53] [FAILED] param-0
[09:50:53]     # check_reserve: EXPECTATION FAILED at lib/test_xarray.c:536
[09:50:53] xa_erase(xa, 12345678) != NULL
...
[09:50:53]     # module: test_xarray
[09:50:53] # xarray: pass:26 fail:3 skip:0 total:29
[09:50:53] # Totals: pass:28 fail:3 skip:0 total:31
[09:50:53] ===================== [FAILED] xarray ======================
```

and exits 1.

Use of richer kunit assertions is intentionally omitted to reduce the
scope of the change.

Link: https://lkml.kernel.org/r/20241205-xarray-kunit-port-v1-1-ee44bc7aa201@gmail.com
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Naveen N Rao <naveen@kernel.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-12-18 19:51:32 -08:00
..
68000 m68knommu: updates and fixes for v6.7 2023-11-02 15:31:01 -10:00
amiga m68k: amiga: Turn off Warp1260 interrupts during boot 2024-06-04 08:59:58 +02:00
apollo m68k: apollo: Add and use "apollo.h" 2023-10-06 10:03:02 +02:00
atari m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages 2024-07-01 14:23:05 +02:00
bvme6000 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
coldfire m68k: coldfire/device.c: only build FEC when HW macros are defined 2024-11-11 08:57:01 +10:00
configs xarray: port tests to kunit 2024-12-18 19:51:32 -08:00
emu m68k updates for v6.11 2024-07-16 11:30:32 -07:00
fpsp040 m68k: fpsp040: Fix indentation by 5 spaces 2023-10-16 14:30:40 +02:00
hp300 serial: 8250: Move hp300_setup_serial_console() to <linux/serial_8250.h> 2024-01-27 19:01:39 -08:00
ifpsp060 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
include RTC for 6.13 2024-11-30 11:18:16 -08:00
kernel m68k updates for v6.13 2024-11-18 18:00:18 -08:00
lib m68k: lib: Include <linux/libgcc.h> for __muldi3() 2023-10-16 14:30:40 +02:00
mac m68k: mac: Fix reboot hang on Mac IIci 2024-05-08 17:43:22 +02:00
math-emu m68k: math-emu: Add missing prototypes 2023-10-06 10:03:01 +02:00
mm m68knommu: updates and fixes for v6.7 2023-11-02 15:31:01 -10:00
mvme16x m68k: mvme147, mvme16x: Adopt rtc-m48t59 platform driver 2024-11-22 20:59:40 +01:00
mvme147 RTC for 6.13 2024-11-30 11:18:16 -08:00
q40 treewide: Fix wrong singular form of jiffies in comments 2024-09-08 20:47:40 +02:00
sun3 m68k: sun3: Fix indentation by 5 or 7 spaces 2023-10-16 14:30:39 +02:00
sun3x m68k: sun3/3x: Add and use "sun3.h" 2023-10-06 10:03:04 +02:00
tools/amiga m68k: tools: Replace zero-length array with flexible-array member 2020-05-25 10:55:56 +02:00
virt m68k: Rework BI_VIRT_RNG_SEED as BI_RNG_SEED 2022-09-28 22:16:44 +02:00
install.sh kbuild: Abort make on install failures 2024-07-20 13:34:54 +09:00
Kbuild m68k: Introduce a virtual m68k machine 2022-04-11 11:48:01 +02:00
Kconfig m68k: Move Sun 3 into a top-level platform option 2024-11-06 15:10:14 +01:00
Kconfig.bus m68k: coldfire: drop ISA_DMA_API support 2022-05-16 13:18:30 +10:00
Kconfig.cpu m68k: Select M68020 as fallback for classic 2024-11-06 15:10:14 +01:00
Kconfig.debug m68k: Remove obsolete config NO_KERNEL_MSG 2023-03-20 15:39:14 +01:00
Kconfig.devices m68k: /proc/hardware should depend on PROC_FS 2023-02-13 11:34:49 +01:00
Kconfig.machine m68k: Move Sun 3 into a top-level platform option 2024-11-06 15:10:14 +01:00
Makefile kbuild: use 4-space indentation when followed by conditionals 2024-02-15 06:05:44 +09:00