Skip to content
Commit cc08d1b9 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Shuah Khan
Browse files

selftests/x86: Add <test_name>{,_32,_64} targets



One can only use `make all` or `make <test_name>_<bitness>`
as make targets.
`make <test_name>` doesn't work as Ingo noticed:
  x86> make test_vsyscall
  gcc -O2 -g -std=gnu99 -pthread -Wall -no-pie test_vsyscall.c -o test_vsyscall
  /tmp/aBaoo3nb.o: In function `init_vdso':
  test_vsyscall.c:68: undefined reference to `dlopen'
  test_vsyscall.c:76: undefined reference to `dlsym'
  test_vsyscall.c:80: undefined reference to `dlsym'
  test_vsyscall.c:84: undefined reference to `dlsym'
  test_vsyscall.c:88: undefined reference to `dlsym'
  test_vsyscall.c:70: undefined reference to `dlopen'
  collect2: error: ld returned 1 exit status
  <builtin>: recipe for target 'test_vsyscall' failed
  make: *** [test_vsyscall] Error 1

Makefile target substitution neither works :-/

Generate .PHONY targets per-test and fix target substitution.

Cc: Andy Lutomirski <luto@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kselftest@vger.kernel.org
Cc: x86@kernel.org
Reported-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
Reviewed-by: default avatarAndy Lutomirski <luto@kernel.org>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 14f1889f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment