selftests/bpf: drop test_bpftool.sh
Subsystems (3)
PATCH 1/1 selftests/bpf: drop test_bpftool.sh
The test_bpftool.sh script runs a python unittest script checking bpftool json output on different commands. As part of the ongoing effort to get rid of any standalone test, this script should either be converted to test_progs or removed.
As validating bpftool json output does not bring much value to the test base (and because it would need test_progs to bring in a json parser), remove the standalone test script.
---
This removal follows the discussion in [1]
[1] https://lore.kernel.org/bpf/[email protected]/
--- tools/testing/selftests/bpf/Makefile | 4 +- tools/testing/selftests/bpf/test_bpftool.py | 174 ---------------------------- tools/testing/selftests/bpf/test_bpftool.sh | 11 -- 3 files changed, 1 insertion(+), 188 deletions(-)
tools/testing/selftests/bpf/Makefile +1 -3
@@ -107,14 +107,12 @@ TEST_PROGS := test_kmod.sh \ test_lirc_mode2.sh \ test_xdping.sh \ test_bpftool_build.sh \ - test_bpftool.sh \ test_doc_build.sh \ test_xsk.sh \ test_xdp_features.sh TEST_PROGS_EXTENDED := \ - ima_setup.sh verify_sig_setup.sh \ - test_bpftool.py + ima_setup.sh verify_sig_setup.sh TEST_KMODS := bpf_testmod.ko bpf_test_no_cfi.ko bpf_test_modorder_x.ko \ bpf_test_modorder_y.ko bpf_test_rqspinlock.ko
tools/testing/selftests/bpf/test_bpftool.py deleted +0 -174
174 lines not on this page · raw message
tools/testing/selftests/bpf/test_bpftool.sh deleted +0 -11
@@ -1,11 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: GPL-2.0 -# Copyright (c) 2020 SUSE LLC. - -# 'make -C tools/testing/selftests/bpf install' will install to SCRIPT_DIR -SCRIPT_DIR=$(dirname $(realpath $0)) - -# 'make -C tools/testing/selftests/bpf' will install to BPFTOOL_INSTALL_PATH -BPFTOOL_INSTALL_PATH="$SCRIPT_DIR"/tools/sbin -export PATH=$SCRIPT_DIR:$BPFTOOL_INSTALL_PATH:$PATH -python3 -m unittest -v test_bpftool.TestBpftool
---
base-commit: 2294d0a45832f16cc20e9c1431165b4e0eb69bcb
change-id: 20260211-bpftool_feature-64114bcc7740
Best regards,
Signature · 1 line
Alexis Lothoré (eBPF Foundation) <[email protected]>
2026-02-27 09:08 UTC+0100 ~ "Alexis Lothoré (eBPF Foundation)" <[email protected]>
Quoted 10 lines
The
test_bpftool.shscript runs a python unittest script checking bpftool json output on different commands. As part of the ongoing effort to get rid of any standalone test, this script should either be converted totest_progsor removed.As validating bpftool json output does not bring much value to the test base (and because it would need
test_progsto bring in a json parser), remove the standalone test script.Signed-off-by Alexis Lothoré (eBPF Foundation) <[email protected]>
Regarding the discussion on JSON: If you need to check bpftool's output in other tests, it's probably OK to simply look at the plain output. We've been discouraging people to parse the plain output because it's not considered stable, but given that the tests and bpftool itself are in the same repo we could always adjust any test that would break if we changed something in the output.
Thanks for your work on this!
Quentin
Hello Quentin,
Quoted 14 lines · Quentin Monnet
2026-02-27 09:08 UTC+0100 ~ "Alexis Lothoré (eBPF Foundation)" <[email protected]>
Quoted 10 lines
The
test_bpftool.shscript runs a python unittest script checking bpftool json output on different commands. As part of the ongoing effort to get rid of any standalone test, this script should either be converted totest_progsor removed.As validating bpftool json output does not bring much value to the test base (and because it would need
test_progsto bring in a json parser), remove the standalone test script.Signed-off-by Alexis Lothoré (eBPF Foundation) <[email protected]>
Quoted 8 lines
Acked-by Quentin Monnet <[email protected]>Regarding the discussion on JSON: If you need to check bpftool's output in other tests, it's probably OK to simply look at the plain output. We've been discouraging people to parse the plain output because it's not considered stable, but given that the tests and bpftool itself are in the same repo we could always adjust any test that would break if we changed something in the output.
ACK, thanks for your input, I'll keep that in mind for the next tests to convert (I still have some test_bpftool_synctypes that I did not check yet).
Alexis
Quoted 3 lines
Thanks for your work on this!
Quentin
Signature · 3 lines
Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:
Quoted 10 lines · On Fri, 27 Feb 2026 09:08:47 +0100 you wrote:
The
test_bpftool.shscript runs a python unittest script checking bpftool json output on different commands. As part of the ongoing effort to get rid of any standalone test, this script should either be converted totest_progsor removed.As validating bpftool json output does not bring much value to the test base (and because it would need
test_progsto bring in a json parser), remove the standalone test script.[...]
Here is the summary with links:
- [bpf-next] selftests/bpf: drop test_bpftool.sh
https://git.kernel.org/bpf/bpf-next/c/7242b0951d2c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html