mirror_ubuntu-kernels/tools/testing/selftests
Jason A. Donenfeld 67a121ac8f selftests: vDSO: fix cross build for getrandom and chacha tests
Unlike the check for the standalone x86 test, the check for building the
vDSO getrandom and chacaha tests looks at the architecture for the host
rather than the architecture for the target when deciding if they should
be built. Since the chacha test includes some assembler code this means
that cross building with x86 as either the target or host is broken.

There's also some additional complications, where ARCH can legitimately
be either x86_64 or x86, but the source code we need to compile lives in
a directory path containing arch/x86. The standard SRCARCH variable
handles that. And actually, all these variables and proper substitutions
are already described in tools/scripts/Makefile.arch, so just include
that to handle it.

Similarly, ARCH=x86 can actually describe ARCH=x86_64,
just with CONFIG_64BIT, so we can't rely on ARCH for selecting
non-32-bit tests. For that, check against $(ARCH)$(CONFIG_X86_32). This
won't help for people manually running this inside the vDSO selftest
directory (which isn't really supported anyway and has problems on
various archs), but it should work for builds of the kselftests, where
the CONFIG_* variables are defined. On x86_64 machines,
$(ARCH)$(CONFIG_X86_32) will evaluate to x86. On arm64 machines, it will
evaluate to arm64. On 32-bit x86 machines, it will evaluate to x86y,
which won't match the filter list.

Reported-by: Mark Brown <broonie@kernel.org>
Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2024-09-13 17:28:35 +02:00
..
alsa kselftest/alsa: Log the PCM ID in pcm-test 2024-07-18 16:48:44 +02:00
amd-pstate
arm64 kselftest: missing arg in ptrace.c 2024-07-23 15:27:16 +01:00
bpf selftests/bpf: Add a test to verify previous stacksafe() fix 2024-08-12 18:15:33 -07:00
breakpoints selftests/breakpoints:Remove unused variable 2024-07-11 11:23:55 -06:00
cachestat selftests: cachestat: Fix build warnings on ppc64 2024-05-29 12:24:44 -06:00
capabilities selftests/capabilities: fix warn_unused_result build warnings 2024-05-08 16:48:25 -06:00
cgroup - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
clone3 selftests/clone3: ksft_exit functions do not return 2024-05-06 13:57:20 -06:00
connector
core fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE 2024-08-05 19:23:11 -04:00
cpu-hotplug
cpufreq selftests: cpufreq: conform test to TAP 2024-05-06 13:57:20 -06:00
damon selftests/damon/damon_nr_regions: test online-tuned max_nr_regions 2024-07-03 19:30:29 -07:00
devices kselftest: devices: Add test to detect device error logs 2024-07-12 10:59:06 +02:00
dma selftests/dma:remove unused variable 2024-07-11 11:23:55 -06:00
dmabuf-heaps kselftests: dmabuf-heaps: Ensure the driver name is null-terminated 2024-07-29 09:02:54 +02:00
drivers selftests: mlxsw: ethtool_lanes: Source ethtool lib from correct path 2024-08-21 17:20:09 -07:00
dt linux_kselftest-next-6.9-rc1 2024-03-11 09:25:33 -07:00
efivarfs
exec - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
fchmodat2 selftests/fchmodat2: fix clang build failure due to -static-libasan 2024-06-11 15:05:05 -06:00
filelock
filesystems - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
firmware
fpu
ftrace ftrace: Rewrite of function graph tracer 2024-07-18 13:36:33 -07:00
futex selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
gpio selftest: gpio: remove obsolete gpio-mockup test 2024-03-05 20:01:08 +01:00
hid selftests/hid: add test for attaching multiple time the same struct_ops 2024-07-24 18:27:22 +02:00
ia64
intel_pstate selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
iommu - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
ipc selftests/ipc: ksft_exit functions do not return 2024-05-06 13:57:20 -06:00
ir
kcmp selftests/kcmp: remove unused open mode 2024-05-11 15:51:43 -07:00
kexec
kmod
kselftest selftests: ksft: Fix finished() helper exit code on skipped tests 2024-07-31 11:38:56 -06:00
kvm KVM: selftests: Add a testcase to verify x2APIC is fully readonly 2024-08-13 12:01:46 -04:00
landlock selftests/landlock: Add cred_transfer test 2024-07-24 17:34:56 +02:00
lib
livepatch selftests/livepatch: wait for atomic replace to occur 2024-08-26 14:52:25 +02:00
lkdtm lkdtm/bugs: add test for hung smp_call_function_single() 2024-06-17 11:17:31 -07:00
locking
lsm lsm: use 32-bit compatible data types in LSM syscalls 2024-03-14 11:31:26 -04:00
media_tests
membarrier selftests: membarrier: ksft_exit_pass() does not return 2024-05-06 13:57:20 -06:00
memfd selftests/memfd: fix spelling mistakes 2024-05-07 10:36:59 -07:00
memory-hotplug
mincore
mm selftests: memfd_secret: don't build memfd_secret test on unsupported arches 2024-08-15 22:16:15 -07:00
mount
mount_setattr
move_mount_set_group
mqueue selftests/mqueue: fix 5 warnings about signed/unsigned mismatches 2024-06-24 22:25:03 -07:00
nci
net selftests: mptcp: join: validate fullmesh endp on 1st sf 2024-08-20 17:40:13 -07:00
nolibc tools/nolibc: implement strerror() 2024-06-29 09:44:57 +02:00
nsfs
ntb
openat2 selftests/openat2: fix clang build failures: -static-libasan, LOCAL_HDRS 2024-06-11 15:00:11 -06:00
perf_events selftests/perf_events: Test FASYNC with watermark wakeups 2024-04-14 22:26:33 +02:00
pid_namespace
pidfd pidfs: add selftests for new namespace ioctls 2024-07-24 10:53:13 +02:00
power_supply selftests: power_supply: Make it POSIX-compliant 2024-05-06 13:57:20 -06:00
powerpc selftests/powerpc: Fix build with USERCFLAGS set 2024-07-06 22:10:14 +10:00
prctl
proc - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
pstore
ptp
ptrace
rcutorture torture: Scale --do-kvfree test time 2024-04-16 11:16:36 +02:00
resctrl - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
ring-buffer selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
riscv - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
rlimits
rseq
rtc
rust kselftest: Add basic test for probing the rust sample modules 2024-03-04 13:13:04 -07:00
safesetid
sched selftests/sched: fix code format issues 2024-07-11 11:23:53 -06:00
seccomp minmax: make generic MIN() and MAX() macros available everywhere 2024-07-28 15:49:18 -07:00
sgx selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
sigaltstack selftests/sigaltstack: Fix ppc64 GCC build 2024-07-01 21:35:38 +10:00
size
sparc64
splice
static_keys
sync selftests: sync: ksft_exit_pass() does not return 2024-05-06 13:57:21 -06:00
syscall_user_dispatch selftests: sud_test: return correct emulated syscall value on RISC-V 2024-04-25 09:46:41 -07:00
sysctl
tc-testing tc-testing: don't access non-existent variable on exception 2024-08-16 18:02:51 -07:00
tdx
thermal/intel selftests: thermal: intel: workload_hint: add missing gitignore 2024-02-20 16:30:55 -07:00
timens selftest/timerns: fix clang build failures for abs() calls 2024-07-05 13:21:48 -06:00
timers selftests/timers: remove unused irqcount variable 2024-07-11 11:23:54 -06:00
tmpfs selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk 2024-07-10 12:14:51 -07:00
tpm2
tty kselftest/tty: Report a consistent test name for the one test we run 2024-05-06 13:57:19 -06:00
turbostat tools/power turbostat: Add selftests for added perf counters 2024-07-26 13:51:25 -04:00
uevent selftests: uevent: add missing gitignore 2024-02-20 16:30:40 -07:00
user
user_events selftests/user_events: Add non-spacing separator check 2024-05-13 12:15:46 -04:00
vDSO selftests: vDSO: fix cross build for getrandom and chacha tests 2024-09-13 17:28:35 +02:00
watchdog
wireguard wireguard: selftests: use acpi=off instead of -no-acpi for recent QEMU 2024-07-05 17:21:10 -07:00
x86 Probes updates for v6.11: 2024-07-18 12:19:20 -07:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_deps.sh selftests: kselftest_deps: fix l5_test() empty variable 2024-05-08 16:46:41 -06:00
kselftest_harness.h selftests/harness: Fix tests timeout and race condition 2024-06-28 16:06:03 +02:00
kselftest_install.sh
kselftest_module.h
kselftest.h selftests: kselftest: also use strerror() on nolibc 2024-06-29 09:44:58 +02:00
lib.mk - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
Makefile USB/Thunderbolt updates for 6.11-rc1 2024-07-19 15:37:48 -07:00
run_kselftest.sh