Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: breakpoints: allow to cross-compile for aarch64/arm64

To build breakpoint_test_arm64, ARCH value is only tested for "aarch64".
It covers only the native build because it's computed from uname -m output.
For cross-compilation, ARCH is set to arm64 and prevent to cross-compile
the test.
Fix the test to allow both native and cross-compilation of the test.

Note: glibc is missing several of the TRAP_* constants in the userspace
definitions. Specifically TRAP_BRANCH and TRAP_HWBKPT.
See https://sourceware.org/bugzilla/show_bug.cgi?id=21286

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

authored by

Fathi Boudra and committed by
Shuah Khan
b13f7666 584f34f1

+1 -1
+1 -1
tools/testing/selftests/breakpoints/Makefile
··· 5 5 ifeq ($(ARCH),x86) 6 6 TEST_GEN_PROGS := breakpoint_test 7 7 endif 8 - ifeq ($(ARCH),aarch64) 8 + ifneq (,$(filter $(ARCH),aarch64 arm64)) 9 9 TEST_GEN_PROGS := breakpoint_test_arm64 10 10 endif 11 11