Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
385f65b
adding ci files
Oct 30, 2025
f7eeeb4
selftests/bpf: test_xsk: Split xskxceiver
bastien-curutchet Oct 31, 2025
5bd32ea
selftests/bpf: test_xsk: Initialize bitmap before use
bastien-curutchet Oct 31, 2025
4d60db4
selftests/bpf: test_xsk: Fix __testapp_validate_traffic()'s return value
bastien-curutchet Oct 31, 2025
336ceb0
selftests/bpf: test_xsk: fix memory leak in testapp_stats_rx_dropped()
bastien-curutchet Oct 31, 2025
5322051
selftests/bpf: test_xsk: fix memory leak in testapp_xdp_shared_umem()
bastien-curutchet Oct 31, 2025
7a4b4e8
selftests/bpf: test_xsk: Wrap test clean-up in functions
bastien-curutchet Oct 31, 2025
14fb9c8
selftests/bpf: test_xsk: Release resources when swap fails
bastien-curutchet Oct 31, 2025
8ae0bf2
selftests/bpf: test_xsk: Add return value to init_iface()
bastien-curutchet Oct 31, 2025
019bffd
selftests/bpf: test_xsk: Don't exit immediately when xsk_attach fails
bastien-curutchet Oct 31, 2025
1a5a10b
selftests/bpf: test_xsk: Don't exit immediately when gettimeofday fails
bastien-curutchet Oct 31, 2025
2f0853a
selftests/bpf: test_xsk: Don't exit immediately when workers fail
bastien-curutchet Oct 31, 2025
aaa70fd
selftests/bpf: test_xsk: Don't exit immediately if validate_traffic f…
bastien-curutchet Oct 31, 2025
73b2152
selftests/bpf: test_xsk: Don't exit immediately on allocation failures
bastien-curutchet Oct 31, 2025
5eb0a3d
selftests/bpf: test_xsk: Isolate non-CI tests
bastien-curutchet Oct 31, 2025
c3dcf24
selftests/bpf: test_xsk: Integrate test_xsk.c to test_progs framework
bastien-curutchet Oct 31, 2025
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
49 changes: 49 additions & 0 deletions .github/actions/veristat_baseline_compare/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'run-veristat'
description: 'Run veristat benchmark'
inputs:
veristat_output:
description: 'Veristat output filepath'
required: true
baseline_name:
description: 'Veristat baseline cache name'
required: true
runs:
using: "composite"
steps:
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.baseline_name }}
if-no-files-found: error
path: ${{ github.workspace }}/${{ inputs.veristat_output }}

# For pull request:
# - get baseline log from cache
# - compare it to current run
- if: ${{ github.event_name == 'pull_request' }}
uses: actions/cache/restore@v4
with:
key: ${{ github.base_ref }}-${{ inputs.baseline_name }}-
restore-keys: |
${{ github.base_ref }}-${{ inputs.baseline_name }}
path: '${{ github.workspace }}/${{ inputs.baseline_name }}'

- if: ${{ github.event_name == 'pull_request' }}
name: Show veristat comparison
shell: bash
run: ./.github/scripts/compare-veristat-results.sh
env:
BASELINE_PATH: ${{ github.workspace }}/${{ inputs.baseline_name }}
VERISTAT_OUTPUT: ${{ inputs.veristat_output }}

# For push: just put baseline log to cache
- if: ${{ github.event_name == 'push' }}
shell: bash
run: |
mv "${{ github.workspace }}/${{ inputs.veristat_output }}" \
"${{ github.workspace }}/${{ inputs.baseline_name }}"
- if: ${{ github.event_name == 'push' }}
uses: actions/cache/save@v4
with:
key: ${{ github.ref_name }}-${{ inputs.baseline_name }}-${{ github.run_id }}
path: '${{ github.workspace }}/${{ inputs.baseline_name }}'
13 changes: 13 additions & 0 deletions .github/scripts/collect-scx-bpf-progs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -euo pipefail

PROGS_DIR=$1

mkdir -p "${PROGS_DIR}"

find "${SCX_BUILD_OUTPUT}" -type f -name "*.bpf.o" -printf '%P\0' | \
while IFS= read -r -d '' prog; do
obj_name=$(echo "${prog}" | tr / _)
cp -v "${SCX_BUILD_OUTPUT}/$prog" "${PROGS_DIR}/${obj_name}"
done
42 changes: 42 additions & 0 deletions .github/scripts/compare-veristat-results.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

if [[ ! -f "${BASELINE_PATH}" ]]; then
echo "# No ${BASELINE_PATH} available" >> "${GITHUB_STEP_SUMMARY}"

echo "No ${BASELINE_PATH} available"
echo "Printing veristat results"
cat "${VERISTAT_OUTPUT}"

exit 0
fi

veristat=$(realpath selftests/bpf/veristat)
cmp_out=$(mktemp veristate_compare_out_XXXXXX.csv)

$veristat \
--output-format csv \
--emit file,prog,verdict,states \
--compare "${BASELINE_PATH}" "${VERISTAT_OUTPUT}" > $cmp_out

python3 ./.github/scripts/veristat_compare.py $cmp_out
exit_code=$?

echo
# if comparison failed, print verifier log for failure mismatches
if [[ -n "$VERISTAT_DUMP_LOG_ON_FAILURE" && $exit_code -ne 0 ]]; then
cat $cmp_out | tail -n +1 | \
while read -r line; do
verdict=$(echo $line | cut -d',' -f4)
verdict_diff=$(echo $line | cut -d',' -f5)
if [[ "$verdict" == "failure" && "$verdict_diff" == "MISMATCH" ]]; then
file=$(echo $line | cut -d',' -f1)
prog=$(echo $line | cut -d',' -f2)
echo "VERIFIER LOG FOR $file/$prog:"
echo "=================================================================="
$veristat -v $VERISTAT_OBJECTS_DIR/$file -f $prog 2>&1
echo "=================================================================="
fi
done
fi

exit $exit_code
30 changes: 30 additions & 0 deletions .github/scripts/download-gcc-bpf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -euo pipefail

GCC_BPF_RELEASE_GH_REPO=$1
INSTALL_DIR=$(realpath $2)

cd /tmp

tag=$(gh release list -L 1 -R ${GCC_BPF_RELEASE_GH_REPO} --json tagName -q .[].tagName)
if [[ -z "$tag" ]]; then
echo "Could not find latest GCC BPF release at ${GCC_BPF_RELEASE_GH_REPO}"
exit 1
fi

url="https://github.com/${GCC_BPF_RELEASE_GH_REPO}/releases/download/${tag}/${tag}.tar.zst"
echo "Downloading $url"
wget -q "$url"

tarball=${tag}.tar.zst
dir=$(tar tf $tarball | head -1 || true)

echo "Extracting $tarball ..."
tar -I zstd -xf $tarball && rm -f $tarball

rm -rf $INSTALL_DIR
mv -v $dir $INSTALL_DIR

cd -

Loading
Loading