mbox series

[0/2] Two cross-compilation kselftest fixes

Message ID 20230629162301.1234157-1-bjorn@kernel.org (mailing list archive)
Headers show
Series Two cross-compilation kselftest fixes | expand

Message

Björn Töpel June 29, 2023, 4:22 p.m. UTC
From: Björn Töpel <bjorn@rivosinc.com>

When you're cross-building kselftest, in this case RISC-V:

  | make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- O=/tmp/kselftest \
  |   HOSTCC=gcc FORMAT= SKIP_TARGETS="arm64 ia64 powerpc sparc64 x86 \
  |   sgx" -C tools/testing/selftests gen_tar

the components (paths) that fail to build are skipped. In this case,
openat2 failed due to missing library support, and proc due to an
x86-64 only test.

This tiny series addresses the problems above.


Björn

Björn Töpel (2):
  selftests/openat2: Run-time check for -fsanitize=undefined
  selftests/proc: Do not build x86-64 tests on non-x86-64 builds

 tools/testing/selftests/openat2/Makefile | 9 ++++++++-
 tools/testing/selftests/proc/Makefile    | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)


base-commit: 3a8a670eeeaa40d87bd38a587438952741980c18

Comments

Björn Töpel July 3, 2023, 6:36 a.m. UTC | #1
Björn Töpel <bjorn@kernel.org> writes:

> From: Björn Töpel <bjorn@rivosinc.com>
>
> When you're cross-building kselftest, in this case RISC-V:
>
>   | make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- O=/tmp/kselftest \
>   |   HOSTCC=gcc FORMAT= SKIP_TARGETS="arm64 ia64 powerpc sparc64 x86 \
>   |   sgx" -C tools/testing/selftests gen_tar
>
> the components (paths) that fail to build are skipped. In this case,
> openat2 failed due to missing library support, and proc due to an
> x86-64 only test.
>
> This tiny series addresses the problems above.

Shuah,

Alexey submitted a series [1] that makes the 2nd patch of this series
unnecessary . It's on Andrew's -mm tree.

Patch 1 is still relevant. I guess it can go via your tree, or the
RISC-V tree.


Björn

[1] https://lore.kernel.org/all/20230630183434.17434-2-adobriyan@gmail.com/