aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/exec/Makefile
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <usama.anjum@collabora.com>2022-01-19 15:15:31 +0500
committerShuah Khan <skhan@linuxfoundation.org>2022-02-23 17:21:10 -0700
commit681696862bc1823595c05960a83766d1aa965c17 (patch)
tree39d553d15796fdd4372b736ddc8925436cdcf2e1 /tools/testing/selftests/exec/Makefile
parentselftests: vm: Add the uapi headers include variable (diff)
downloadwireguard-linux-681696862bc1823595c05960a83766d1aa965c17.tar.xz
wireguard-linux-681696862bc1823595c05960a83766d1aa965c17.zip
selftests: vm: remove dependecy from internal kernel macros
The defination of swap() is used from kernel's internal header when this test is built in source tree. The build fails when this test is built out of source tree as defination of swap() isn't found. Selftests shouldn't depend on kernel's internal header files. They can only depend on uapi header files. Add the defination of swap() to fix the build error: gcc -Wall -I/linux_mainline2/build/usr/include -no-pie userfaultfd.c -lrt -lpthread -o /linux_mainline2/build/kselftest/vm/userfaultfd userfaultfd.c: In function ‘userfaultfd_stress’: userfaultfd.c:1530:3: warning: implicit declaration of function ‘swap’; did you mean ‘swab’? [-Wimplicit-function-declaration] 1530 | swap(area_src, area_dst); | ^~~~ | swab /usr/bin/ld: /tmp/cclUUH7V.o: in function `userfaultfd_stress': userfaultfd.c:(.text+0x4d64): undefined reference to `swap' /usr/bin/ld: userfaultfd.c:(.text+0x4d82): undefined reference to `swap' collect2: error: ld returned 1 exit status Fixes: 2c769ed7137a ("tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner") Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Reviewed-by: Alistair Popple <apopple@nvidia.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/exec/Makefile')
0 files changed, 0 insertions, 0 deletions