selftests: Fix seccomp to support relocatable build (O=objdir)
authorShuah Khan <skhan@linuxfoundation.org>
Wed, 25 Mar 2020 23:16:02 +0000 (17:16 -0600)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 26 Mar 2020 21:28:19 +0000 (15:28 -0600)
commit860f0a7792a5abcaae047a114a8b24807ce0880f
tree08ab40575ea1c51ae616062ebb8e4050a9b30dba
parentc31801da6e3d7ef6115a0b5af1816a8f7ab120c2
selftests: Fix seccomp to support relocatable build (O=objdir)

Fix seccomp relocatable builds. This is a simple fix to use the
right lib.mk variable TEST_GEN_PROGS. Local header dependency
is addressed in a change to lib.mk as a framework change that
enforces the dependency without requiring changes to individual
tests.

The following use-cases work with this change:

In seccomp directory:
make all and make clean

From top level from main Makefile:
make kselftest-install O=objdir ARCH=arm64 HOSTCC=gcc \
 CROSS_COMPILE=aarch64-linux-gnu- TARGETS=seccomp

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/seccomp/Makefile