Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable traffic monitoring to debug flaky selftests #168

Merged
merged 3 commits into from
Feb 11, 2025
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
6 changes: 6 additions & 0 deletions .github/workflows/kernel-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,9 @@ jobs:
# Here we must use kbuild-output local to the repo, because
# it was extracted from the artifacts.
kbuild-output: ${{ env.REPO_ROOT }}/kbuild-output
- if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: tmon-logs-${{ inputs.arch }}-${{ inputs.toolchain_full }}-${{ inputs.test }}
if-no-files-found: ignore
path: /tmp/tmon_pcap/*
2 changes: 1 addition & 1 deletion run-vmtest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ runs:
foldable start install_qemu "Installing QEMU tools"
# need gawk to support `--field-separator`
sudo apt-get update && sudo apt-get install -y cpu-checker qemu-kvm qemu-utils qemu-system-x86 qemu-system-s390x qemu-system-arm qemu-guest-agent \
ethtool keyutils iptables \
ethtool keyutils iptables libpcap-dev \
gawk
foldable end install_qemu
- name: Configure KVM group perms
Expand Down
18 changes: 12 additions & 6 deletions run-vmtest/run-bpf-selftests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ OUTPUT_DIR=${OUTPUT_DIR:-/mnt/vmtest}

test_progs_helper() {
local selftest="test_progs${1}"
local args="$2"
local args=("$2")

args+=" ${TEST_PROGS_WATCHDOG_TIMEOUT:+-w$TEST_PROGS_WATCHDOG_TIMEOUT}"
args+=" ${ALLOWLIST_FILE:+-a@$ALLOWLIST_FILE}"
args+=" ${DENYLIST_FILE:+-d@$DENYLIST_FILE}"
if [ "${args[0]}" == "" ]; then
args=("${args[@]:1}")
fi

json_file=${selftest/-/_}
if [ "$2" == "-j" ]
Expand All @@ -38,12 +38,18 @@ test_progs_helper() {
fi
json_file="${OUTPUT_DIR}/${json_file}.json"

args+=(${TEST_PROGS_WATCHDOG_TIMEOUT:+-w$TEST_PROGS_WATCHDOG_TIMEOUT})
args+=(${ALLOWLIST_FILE:+-a@$ALLOWLIST_FILE})
args+=(${DENYLIST_FILE:+-d@$DENYLIST_FILE})
args+=(-J "${json_file}")
args+=(-m '*')

foldable start ${selftest} "Testing ${selftest}"
echo "./${selftest} ${args} --json-summary \"${json_file}\""
echo "./${selftest}" "${args[@]}"
# "&& true" does not change the return code (it is not executed
# if the Python script fails), but it prevents exiting on a
# failure due to the "set -e".
./${selftest} ${args} --json-summary "${json_file}" && true
./${selftest} "${args[@]}" && true
echo "${selftest}:$?" >>"${STATUS_FILE}"
foldable end ${selftest}
}
Expand Down
2 changes: 1 addition & 1 deletion setup-build-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
run: |
echo "::group::Setup"
sudo apt-get update
sudo apt-get install -y cmake flex bison build-essential libssl-dev ncurses-dev xz-utils bc rsync libguestfs-tools qemu-kvm qemu-utils zstd libzstd-dev binutils-dev elfutils libcap-dev libelf-dev libdw-dev python3-docutils texinfo
sudo apt-get install -y cmake flex bison build-essential libssl-dev ncurses-dev xz-utils bc rsync libguestfs-tools qemu-kvm qemu-utils zstd libzstd-dev binutils-dev elfutils libcap-dev libelf-dev libdw-dev python3-docutils texinfo libpcap-dev
echo "::endgroup::"
- name: Install clang
shell: bash
Expand Down
Loading