linux-stable/tools/testing/selftests
Michael Ellerman 8010e0748c selftests/sigaltstack: Fix ppc64 GCC build
commit 17c743b9da upstream.

Building the sigaltstack test with GCC on 64-bit powerpc errors with:

  gcc -Wall     sas.c  -o /home/michael/linux/.build/kselftest/sigaltstack/sas
  In file included from sas.c:23:
  current_stack_pointer.h:22:2: error: #error "implement current_stack_pointer equivalent"
     22 | #error "implement current_stack_pointer equivalent"
        |  ^~~~~
  sas.c: In function ‘my_usr1’:
  sas.c:50:13: error: ‘sp’ undeclared (first use in this function); did you mean ‘p’?
     50 |         if (sp < (unsigned long)sstack ||
        |             ^~

This happens because GCC doesn't define __ppc__ for 64-bit builds, only
32-bit builds. Instead use __powerpc__ to detect powerpc builds, which
is defined by clang and GCC for 64-bit and 32-bit builds.

Fixes: 05107edc91 ("selftests: sigaltstack: fix -Wuninitialized")
Cc: stable@vger.kernel.org # v6.3+
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240520062647.688667-1-mpe@ellerman.id.au
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-19 05:32:06 +02:00
..
android
bpf selftests/bpf: Check length of recv in test_sockmap 2024-08-19 05:31:57 +02:00
breakpoints
capabilities
cgroup selftests: cgroup: Test open-time cgroup namespace usage for migration checks 2022-04-15 14:15:07 +02:00
cpu-hotplug
cpufreq
drivers
efivarfs selftests/efivarfs: create-read: fix a resource leak 2023-11-28 16:46:31 +00:00
exec
filesystems
firmware
ftrace selftests/ftrace: Fix checkbashisms errors 2024-07-05 09:00:29 +02:00
futex selftests/futex: fix build for clang 2022-11-25 17:40:21 +01:00
gpio
ia64
intel_pstate selftests/intel_pstate: fix build for ARCH=x86_64 2022-11-25 17:40:21 +01:00
ipc
kcmp selftests/kcmp: remove unused open mode 2024-06-16 13:23:31 +02:00
kmod
kvm x86/cpu: Restore AMD's DE_CFG MSR after resume 2022-11-25 17:40:21 +01:00
lib
locking
media_tests
membarrier
memfd selftests/memfd: Fix unknown type name build failure 2023-05-30 12:42:14 +01:00
memory-hotplug
mount
mqueue testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set 2022-04-20 09:12:48 +02:00
net selftests: forwarding: devlink_lib: Wait for udev events after reloading 2024-08-19 05:31:58 +02:00
netfilter
networking/timestamping
nsfs
ntb
powerpc selftests/powerpc: Fix error handling in FPU/VMX preemption tests 2024-01-25 14:33:31 -08:00
prctl
proc proc: fixup uptime selftest 2023-01-18 11:30:05 +01:00
pstore
ptp selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET 2023-06-21 15:39:59 +02:00
ptrace
rcutorture rcutorture: Automatically create initrd directory 2022-12-14 11:28:27 +01:00
rseq
rtc
seccomp
sigaltstack selftests/sigaltstack: Fix ppc64 GCC build 2024-08-19 05:32:06 +02:00
size
sparc64
splice
static_keys
sync
sysctl
tc-testing tweewide: Fix most Shebang lines 2021-05-22 10:59:50 +02:00
timers selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior 2024-05-17 11:42:40 +02:00
uevent
user
vDSO selftests/vDSO: fix clang build errors and warnings 2024-07-27 10:33:43 +02:00
vm selftests/mm: compaction_test: fix bogus test success on Aarch64 2024-07-05 09:00:22 +02:00
watchdog
x86 selftests/x86: Add validity check and allow field splitting 2022-04-15 14:14:43 +02:00
zram selftests/zram: Adapt the situation that /dev/zram0 is being used 2022-02-23 11:58:38 +01:00
.gitignore
gen_kselftest_tar.sh
kselftest.h
kselftest_harness.h
kselftest_install.sh
lib.mk selftests: Use optional USERCFLAGS and USERLDFLAGS 2023-01-18 11:30:42 +01:00
Makefile