[PATCH] selftests/powerpc: Fix load_unaligned_zeropad build failure

Michael Ellerman mpe at ellerman.id.au
Tue Mar 5 23:56:44 AEDT 2024


This test is userspace code, but uses some kernel headers via symlinks,
and mocks other headers, in order to test load_unaligned_zeropad().

Currently the test fails to build with:

  In file included from load_unaligned_zeropad.c:26:
  word-at-a-time.h:7:10: fatal error: linux/bitops.h: No such file or directory
      7 | #include <linux/bitops.h>

This is due to the recent changes to the kernel headers.

Fix it by symlinking the new wordpart.h, and creating an empty stub for
bitops.h which is all that's needed.

Reported-by: Sachin Sant <sachinp at linux.ibm.com>
Tested-by: Sachin Sant <sachinp at linux.ibm.com>
Fixes: 66a5c40f60f5 ("kernel.h: removed REPEAT_BYTE from kernel.h")
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 tools/testing/selftests/powerpc/primitives/linux/bitops.h   | 0
 tools/testing/selftests/powerpc/primitives/linux/wordpart.h | 1 +
 2 files changed, 1 insertion(+)
 create mode 100644 tools/testing/selftests/powerpc/primitives/linux/bitops.h
 create mode 120000 tools/testing/selftests/powerpc/primitives/linux/wordpart.h

Kees, do you mind taking this one via your tree because that's where the commit
that changes the headers is?

diff --git a/tools/testing/selftests/powerpc/primitives/linux/bitops.h b/tools/testing/selftests/powerpc/primitives/linux/bitops.h
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tools/testing/selftests/powerpc/primitives/linux/wordpart.h b/tools/testing/selftests/powerpc/primitives/linux/wordpart.h
new file mode 120000
index 000000000000..4a74d2cbbc9b
--- /dev/null
+++ b/tools/testing/selftests/powerpc/primitives/linux/wordpart.h
@@ -0,0 +1 @@
+../../../../../../include/linux/wordpart.h
\ No newline at end of file
-- 
2.43.2



More information about the Linuxppc-dev mailing list