Skip to content

Commit 62ddb64

Browse files
alan-maguireKernel Patches Daemon
authored andcommitted
selftests/bpf: Allow selftests to build with older xxd
Currently selftests require xxd with the "-n <name>" option which allows the user to specify a name not derived from the input object path. Instead of relying on this newer feature, older xxd can be used if we link our desired name ("test_progs_verification_cert") to the input object. Many distros ship xxd in vim-common package and do not have the latest xxd with -n support. Fixes: b720903 ("selftests/bpf: Enable signature verification for some lskel tests") Signed-off-by: Alan Maguire <[email protected]>
1 parent 4ac2a22 commit 62ddb64

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,8 @@ $(VERIFICATION_CERT) $(PRIVATE_KEY): $(VERIFY_SIG_SETUP)
731731
$(Q)$(VERIFY_SIG_SETUP) genkey $(BUILD_DIR)
732732

733733
$(VERIFY_SIG_HDR): $(VERIFICATION_CERT)
734-
$(Q)xxd -i -n test_progs_verification_cert $< > $@
734+
$(Q)ln -fs $< test_progs_verification_cert && \
735+
xxd -i test_progs_verification_cert > $@
735736

736737
# Define test_progs test runner.
737738
TRUNNER_TESTS_DIR := prog_tests

0 commit comments

Comments
 (0)