Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
shellcheck:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
test_run_vmtest:
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/test-prepare-incremental-build-action.yml

This file was deleted.

12 changes: 12 additions & 0 deletions ci/vmtest/configs/SPLAT_ALLOWLIST
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,15 @@ WARNING: Unprivileged eBPF is enabled
# https://lore.kernel.org/all/20260812-hello_world-v1-1-c3c2ddcb362d@meta.com/
# Delete this entry once that fix reaches the CI kernel.
BUG: KASAN: stack-out-of-bounds in (stack_trace_consume_entry|filter_irq_stacks)\+

# Ignore the KASAN splats generated by KASAN-for-JIT selftests: those are
# expected to trigger many splats to validate that the KASAN
# instrumentation is properly inserted in JITed programs.
BUG: KASAN: slab-(out-of-bounds|use-after-free) in bpf_prog_([a-f0-9]){16}_(st|ld)(x)?(_not)?_on_stack\+
BUG: KASAN: slab-(out-of-bounds|use-after-free) in bpf_prog_([a-f0-9]){16}_simple_atomic(_fetch)?(_not)?_on_stack\+
BUG: KASAN: slab-(out-of-bounds|use-after-free) in bpf_prog_([a-f0-9]){16}_ldx_patched(_not)?_on_stack\+
BUG: KASAN: slab-(out-of-bounds|use-after-free) in bpf_prog_([a-f0-9]){16}_(load_acquire|store_release)(_not)?_on_stack\+
BUG: KASAN: slab-(out-of-bounds|use-after-free) in bpf_prog_([a-f0-9]){16}_verifier_paths_stack_and_non_stack\+
BUG: KASAN: slab-(out-of-bounds|use-after-free) in bpf_prog_([a-f0-9]){16}_ldx_oob\+
BUG: KASAN: slab-(out-of-bounds|use-after-free) in bpf_prog_([a-f0-9]){16}_st_blinded\+
BUG: KASAN: slab-(out-of-bounds|use-after-free) in bpf_prog_([a-f0-9]){16}_ldx_self_alias_on_stack\+
3 changes: 0 additions & 3 deletions ci/vmtest/configs/run_veristat.cilium.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions ci/vmtest/configs/run_veristat.kernel.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions ci/vmtest/configs/run_veristat.meta.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions ci/vmtest/configs/run_veristat.scx.cfg

This file was deleted.

2 changes: 0 additions & 2 deletions prepare-incremental-build/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Action test](https://github.com/libbpf/ci/actions/workflows/test-prepare-incremental-build-action.yml/badge.svg)](https://github.com/libbpf/ci/actions/workflows/test-prepare-incremental-build-action.yml)

# Prepare incremental build

This action uses [actions/cache](https://github.com/actions/cache) in combination with custom scripts to save kernel build output from previous workflow runs to faciliate incremental builds.
Expand Down
8 changes: 7 additions & 1 deletion run-vmtest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ In summary the action performs the following:
Note that behavior of the running scripts is tunable mostly by the
environment variables.

`VMTEST_SCRIPT` selects a custom guest entrypoint. Configuration from
`run-vmtest.env` is loaded before selecting the script. BPF selftest preparation,
bpftool checks, and JSON summaries run only for `run-bpf-selftests.sh`. Custom
scripts share VM setup and exitstatus collection, and provide their own workload
setup and results.

## Required inputs

* `arch` - Target architecture
Expand All @@ -35,7 +41,7 @@ environment variables.
* if not specified, `$VMLINUZ` var is checked
* if `$VMLINUZ` is not set, the script will attempt to run `make -s
image_name` to find the image
* `output-dir` - path for test runner summaries and veristat output
* `output-dir` - path for test runner summaries
* `kbuild-output` (default: `./kbuild-output`) - path to Linux Kernel binaries, aka `$KBUILD_OUTPUT`
* `vmtest-release` - release version name of the vmtest tool

Expand Down
40 changes: 0 additions & 40 deletions run-vmtest/run-bpf-selftests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,46 +94,6 @@ test_progs-bpf_gcc() {
test_progs_helper "-bpf_gcc" ""
}

export VERISTAT_TARGET=${VERISTAT_TARGET:-kernel}
export VERISTAT_CONFIGS=${VERISTAT_CONFIGS:-/mnt/vmtest/ci/vmtest/configs}
export WORKING_DIR=$(pwd) # veristat config expects this variable

run_veristat() {
foldable start run_veristat_${VERISTAT_TARGET} "Running veristat ${VERISTAT_TARGET}"
# Make veristat commands visible in the log
if [ -o xtrace ]; then
xtrace_was_on="1"
else
xtrace_was_on=""
set -x
fi

(
# shellcheck source=ci/vmtest/configs/run_veristat.default.cfg
# shellcheck source=ci/vmtest/configs/run_veristat.meta.cfg
source "${VERISTAT_CONFIGS}/run_veristat.${VERISTAT_TARGET}.cfg"
pushd "${VERISTAT_OBJECTS_DIR}"

args=()
args+=(-o csv)
args+=(-q)
args+=(-e file,prog,verdict,states)
args+=(${VERISTAT_CFG_FILE:+-f@$VERISTAT_CFG_FILE})

"${SELFTESTS_BPF}/veristat" "${args[@]}" ${VERISTAT_OBJECTS_GLOB} > \
"${OUTPUT_DIR}/${VERISTAT_OUTPUT}"

echo "run_veristat_${VERISTAT_TARGET}:$?" >> ${STATUS_FILE}
popd
)

# Hide commands again
if [ -z "$xtrace_was_on" ]; then
set +x
fi
foldable end run_veristat_${VERISTAT_TARGET}
}

foldable end vm_init

foldable start kernel_config "Kconfig"
Expand Down
26 changes: 17 additions & 9 deletions run-vmtest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ else
exit 2
fi

# Set this default before the config hook so its overrides take precedence.
RUN_BPFTOOL_CHECKS=${RUN_BPFTOOL_CHECKS:-}
if [[ -z "${RUN_BPFTOOL_CHECKS}" \
&& "${KERNEL}" = 'LATEST' \
Expand All @@ -53,18 +54,23 @@ then
VMTEST_SCRIPT="${GITHUB_ACTION_PATH}/run-scx-selftests.sh"
elif [[ -z "$VMTEST_SCRIPT" ]];
then
${GITHUB_ACTION_PATH}/prepare-bpf-selftests.sh
VMTEST_SCRIPT="${GITHUB_ACTION_PATH}/run-bpf-selftests.sh"
fi

bpf_selftests=false
if [[ "$VMTEST_SCRIPT" == "${GITHUB_ACTION_PATH}/run-bpf-selftests.sh" ]]; then
bpf_selftests=true
${GITHUB_ACTION_PATH}/prepare-bpf-selftests.sh
fi

# clear exitstatus file
echo -n > exitstatus

foldable start bpftool_checks "Running bpftool checks..."

# bpftool checks are aimed at checking type names, documentation, shell
# completion etc. against the current kernel, so only run on LATEST.
if [[ -n "${RUN_BPFTOOL_CHECKS}" ]]; then
# completion etc. against the current kernel, so default to LATEST.
if "$bpf_selftests" && [[ -n "${RUN_BPFTOOL_CHECKS:-}" ]]; then
bpftool_exitstatus=0
# "&& true" does not change the return code (it is not executed if the
# Python script fails), but it prevents the trap on ERR set at the top
Expand Down Expand Up @@ -143,12 +149,14 @@ fi

foldable end collect_status

SUMMARIES=$(find . -maxdepth 1 -name "test_*.json")
for summary in ${SUMMARIES}; do
if [ -f "${summary}" ]; then
"${GITHUB_ACTION_PATH}/print_test_summary.py" -s "${GITHUB_STEP_SUMMARY}" -j "${summary}"
fi
done
if "$bpf_selftests"; then
SUMMARIES=$(find . -maxdepth 1 -name "test_*.json")
for summary in ${SUMMARIES}; do
if [ -f "${summary}" ]; then
"${GITHUB_ACTION_PATH}/print_test_summary.py" -s "${GITHUB_STEP_SUMMARY}" -j "${summary}"
fi
done
fi

# Final summary - Don't use a fold, keep it visible
echo -e "\033[1;33mTest Results:\033[0m"
Expand Down
Loading