Skip to content

ci: add a new workflow to test bpftool build - #525

Open
Tropicao wants to merge 1 commit into
kernel-patches:masterfrom
Tropicao:test_bpftool_build_in_ci
Open

Tropicao wants to merge 1 commit into
kernel-patches:masterfrom
Tropicao:test_bpftool_build_in_ci

Conversation

@Tropicao

Copy link
Copy Markdown
Contributor

The tools/testing/selftests/bpf directory in the kernel source tree contains the test_bpftool_build.sh script that ensures that the various supported ways of building bpftool work correctly. This test isn't currently part of the tests automatically executed in CI.

Add a new layer of workflows in test.yml to run tests that will exercise build commands. As a first sub-workflow, add a bpftool build workflow:
test.yml -> test-build-commands.yml -> build->bpftool.yml
This test-build-commands workflow can be extended later to support other artifacts build test, for example to test the different ways of building selftests.

The new build-bpftool workflow aims to validate the different ways of building the bpftool CLI, as exercised by the test_bpftool_build.sh in the kernel source tree (in tools/testing/selftests/bpf). As the test has only a few dependencies (only a build test, no dependency on built artifact), the added workflow remains simple and isolated from the other "build-and-tests" workflows:

  • it only tests host build, so no need to run it as many time as the matrix script generates configurations
  • supports download_sources flag, so can be run from kernel tree or vmtest tree

This new workflow does not make the whole test_bpftool_build.sh execute in CI; as some subtests are gated by the presence of a .config. I suspect this to be hiding a broader kbuild issue as bpftool does not really depend on .config, I'll fix this separately in another series.

The tools/testing/selftests/bpf directory in the kernel source tree
contains the test_bpftool_build.sh script that ensures that the various
supported ways of building bpftool work correctly. This test isn't
currently part of the tests automatically executed in CI.

Add a new layer of workflows in test.yml to run tests that will exercise
build commands. As a first sub-workflow, add a bpftool build workflow:
  test.yml -> test-build-commands.yml -> build->bpftool.yml
This test-build-commands workflow can be extended later to support other
artifacts build test, for example to test the different ways of building
selftests.

The new build-bpftool workflow aims to validate the different ways of
building the bpftool CLI, as exercised by the test_bpftool_build.sh in
the kernel source tree (in tools/testing/selftests/bpf). As the test has
only a few dependencies (only a build test, no dependency on built
artifact), the added workflow remains simple and isolated from the other
"build-and-tests" workflows:
- it only tests host build, so no need to run it as many time as the
  matrix script generates configurations
- supports download_sources flag, so can be run from kernel tree or
  vmtest tree

Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
---
This new workflow does not make the whole test_bpftool_build.sh execute
in CI; as some subtests are gated by the presence of a .config. I
suspect this to be hiding a broader kbuild issue as bpftool does not
really depend on .config, I'll fix this separately in another series.
@theihor

theihor commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

@Tropicao the CI run with this change hasn't even started.

The problem is probably with permissions: read-all: the workflow that is called inherits permissions of the caller, and can not expand them (and in this case read-all does).

@theihor theihor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please respin.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants