Skip to content

selftests/bpf: Remove hexdump dependency#11098

Closed
kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf_basefrom
series/1055195=>bpf
Closed

selftests/bpf: Remove hexdump dependency#11098
kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf_basefrom
series/1055195=>bpf

Conversation

@kernel-patches-daemon-bpf
Copy link

Pull request for series with
subject: selftests/bpf: Remove hexdump dependency
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1055195

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 3b39d73
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1055195
version: 2

The verification signature header generation requires converting a
binary certificate to a C array. Previously this only worked with xxd,
and a switch to hexdump has been done in commit b640d55
("selftests/bpf: Remove xxd util dependency").

hexdump is a more common utility program, yet it might not be installed
by default. When it is not installed, BPF selftests build without
errors, but tests_progs is unusable: it exits with the 255 code and
without any error messages. When manually reproducing the issue, it is
not too hard to find out that the generated verification_cert.h file is
incorrect, but that's time consuming. When digging the BPF selftests
build logs, this line can be seen amongst thousands others, but ignored:

  /bin/sh: 2: hexdump: not found

Here, od is used instead of hexdump. od is coming from the coreutils
package, and this new od command produces the same output when using od
from GNU coreutils, uutils, and even busybox. This is more portable, and
it produces a similar results to what was done before with hexdump:
there is an extra comma at the end instead of trailing whitespaces,
but the C code is not impacted.

Fixes: b640d55 ("selftests/bpf: Remove xxd util dependency")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 3b39d73
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1055195
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1055195 irrelevant now. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/1055195=>bpf branch February 18, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments