> Am 16.09.2019 um 18:18 schrieb shuah <shuah@xxxxxxxxxx>: > > On 9/10/19 6:18 AM, Ilya Leoshkevich wrote: >> The current logic prepends $(OUTPUT) only to the first member of >> $(TEST_PROGS). Use $(addprefix) to prepend it to each member. > > Can you please send me the error messages you are seeing so I can see > what is being fixed. linux# make kselftest TARGETS=bpf O=/mnt/linux-build Without the patch: # selftests: bpf: test_libbpf.sh # ./test_libbpf.sh: line 23: ./test_libbpf_open: No such file or directory # test_libbpf: failed at file test_l4lb.o # selftests: test_libbpf [FAILED] With the patch: # selftests: bpf: test_libbpf.sh # selftests: test_libbpf [PASS] What happens is that run_one() does cd `dirname $TEST` dirname is . without the patch, so the test cannot access the files generated in $(OUTPUT). > >> Also, $(OUTPUT) is assumed to end with a / almost everywhere else in >> the kernel, make this the case for kselftest as well. > > Why are these two changes in one patch? Does this fix 1a940687e424? > If so how? I will split the patch in two and resend. Adding / does not fix anything, it just makes the code more uniform w.r.t. the rest of the tree.