linux/tools/testing/selftests/powerpc
Sandipan Das a7aaa2f26b selftests/powerpc: Fix pkey syscall redefinitions
On distros using older glibc versions, the pkey tests encounter build
failures due to redefinition of the pkey syscall numbers.

For compatibility, commit 743f3544ff added a wrapper for the
gettid() syscall and included syscall.h if the version of glibc used
is older than 2.30. This leads to different definitions of SYS_pkey_*
as the ones in the pkey test header set numeric constants where as the
ones from syscall.h reuse __NR_pkey_*. The compiler complains about
redefinitions since they are different.

This replaces SYS_pkey_* definitions with __NR_pkey_* such that the
definitions in both syscall.h and pkeys.h are alike. This way, if
syscall.h has to be included for compatibility reasons, builds will
still succeed.

Fixes: 743f3544ff ("selftests/powerpc: Add wrapper for gettid")
Reported-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
Suggested-by: David Laight <david.laight@aculab.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a4956d838bf59b0a71a2553c5ca81131ea8b49b9.1596561758.git.sandipan@linux.ibm.com
2020-08-05 10:14:03 +10:00
..
alignment selftests/powerpc: Add prefixed loads/stores to alignment_handler test 2020-06-22 14:18:45 +10:00
benchmarks selftests/powerpc: Fix CPU affinity for child process 2020-07-29 22:30:34 +10:00
cache_shape .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
copyloops .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
dscr powerpc updates for 5.7 2020-04-05 11:12:59 -07:00
eeh selftests/powerpc: Squash spurious errors due to device removal 2020-07-29 21:02:11 +10:00
include selftests/powerpc: Fix pkey syscall redefinitions 2020-08-05 10:14:03 +10:00
lib treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
math selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs 2020-08-03 22:12:41 +10:00
mm selftests/powerpc: Remove powerpc special cases from stack expansion test 2020-07-29 21:02:12 +10:00
nx-gzip selftests/powerpc: Use proper error code to check fault address 2020-07-15 23:10:17 +10:00
pmu selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs 2020-08-03 22:12:41 +10:00
primitives .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
ptrace selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs 2020-08-03 22:12:41 +10:00
scripts treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
security selftests/powerpc: Return skip code for spectre_v2 2020-07-29 23:47:52 +10:00
signal powerpc: Use trap metadata to prevent double restart rather than zeroing trap 2020-05-15 11:58:54 +10:00
stringloops selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs 2020-08-03 22:12:41 +10:00
switch_endian .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
syscalls .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
tm powerpc updates for 5.7 #2 2020-04-09 11:01:42 -07:00
vphn .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
harness.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 191 2019-05-30 11:29:21 -07:00
Makefile selftests/powerpc: Add NX-GZIP engine compress testcase 2020-04-21 22:51:34 +10:00
utils.c selftests/powerpc: Fix online CPU selection 2020-07-30 22:53:50 +10:00