From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: Alan Maguire <alan.maguire@oracle.com>,
bpf@vger.kernel.org, kpsingh@kernel.org
Subject: Re: [bug-report] Build error in tools/testing/selftests/bpf/
Date: Tue, 28 Oct 2025 15:54:54 +0530 [thread overview]
Message-ID: <a25db80c-864f-4d29-9c46-d9d226dffc12@oracle.com> (raw)
In-Reply-To: <708fcb30-42bf-4525-aefe-cf9791bf70e0@oracle.com>
Hi Alan,
On 28/10/25 15:45, Alan Maguire wrote:
> On 28/10/2025 09:31, Harshit Mogalapalli wrote:
>> Hi all,
>>
>> I am seeing a build failure with latest bpf-next:
>>
>>
>> [root@hamogala-Kbuild bpf-next]# git describe
>> bpf-next-6.16-44604-gf9db3a38224e
>> [root@hamogala-Kbuild bpf-next]# make -j$(nproc) -C tools/testing/
>> selftests/bpf/
>> make: Entering directory '/home/opc/bpf-next/tools/testing/selftests/bpf'
>>
>> Usage:
>> xxd [options] [infile [outfile]]
>> or
>> xxd -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]
>> Options:
>> -a toggle autoskip: A single '*' replaces nul-lines.
>> Default off.
>> -b binary digit dump (incompatible with -ps,-i,-r). Default
>> hex.
>> -C capitalize variable names in C include file style (-i).
>> -c cols format <cols> octets per line. Default 16 (-i: 12, -ps:
>> 30).
>> -E show characters in EBCDIC. Default ASCII.
>> -e little-endian dump (incompatible with -ps,-i,-r).
>> -g number of octets per group in normal output. Default 2
>> (-e: 4).
>> -h print this summary.
>> -i output in C include file style.
>> -l len stop after <len> octets.
>> -o off add <off> to the displayed file position.
>> -ps output in postscript plain hexdump style.
>> -r reverse operation: convert (or patch) hexdump into binary.
>> -r -s off revert with <off> added to file positions found in hexdump.
>> -d show offset in decimal instead of hex.
>> -s [+][-]seek start at <seek> bytes abs. (or +: rel.) infile offset.
>> -u use upper case hex letters.
>> -v show version: "xxd V1.10 27oct98 by Juergen Weigert".
>> make: *** [Makefile:726: verification_cert.h] Error 1
>> make: *** Deleting file 'verification_cert.h'
>> make: Leaving directory '/home/opc/bpf-next/tools/testing/selftests/bpf'
>>
>> This looks related to: commit: b720903e2b14 ("selftests/bpf: Enable
>> signature verification for some lskel tests")
>>
>>
>
> hi Harshit, I ran into this too; it turns out the version of
> /usr/bin/xxd needs to support the -n (name) option and only the
> vim-common v9 or later version supports that. The name option allows the
> user to provide a name not derived implicitly from the file path
> apparently. It _might_ make sense to do something like the below since
> it would loosen the requirement for a very new vim-common package to be
> installed. Many distros may not have a new enough xxd packaged, and as a
> result run into this issue.
>
Ah, thanks for explaining.
> The patch simply creates a symlink to the cert with the right name,
> allowing xxd to generate the header without the -n option.
>
> diff --git a/tools/testing/selftests/bpf/Makefile
> b/tools/testing/selftests/bpf/Makefile
> index 7437c325179e..a276f83d7c52 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -722,7 +722,8 @@ $(VERIFICATION_CERT) $(PRIVATE_KEY): $(VERIFY_SIG_SETUP)
> $(Q)$(VERIFY_SIG_SETUP) genkey $(BUILD_DIR)
>
> $(VERIFY_SIG_HDR): $(VERIFICATION_CERT)
> - $(Q)xxd -i -n test_progs_verification_cert $< > $@
> + $(Q)ln -fs $< test_progs_verification_cert && \
> + xxd -i test_progs_verification_cert > $@
>
> # Define test_progs test runner.
> TRUNNER_TESTS_DIR := prog_tests
>
Agree, this works for me.
Thanks for providing a fix.
Regards,
Harshit
prev parent reply other threads:[~2025-10-28 10:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 9:31 [bug-report] Build error in tools/testing/selftests/bpf/ Harshit Mogalapalli
2025-10-28 10:15 ` Alan Maguire
2025-10-28 10:24 ` Harshit Mogalapalli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a25db80c-864f-4d29-9c46-d9d226dffc12@oracle.com \
--to=harshit.m.mogalapalli@oracle.com \
--cc=alan.maguire@oracle.com \
--cc=bpf@vger.kernel.org \
--cc=kpsingh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).