From 049f60389bb21ccbb47678ed2b400cce475209cb Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Thu, 20 Oct 2022 04:52:16 -0600 Subject: [PATCH] Run bpf_conformance using bpf_conformance/tests (#168) Signed-off-by: Alan Jowett --- .github/workflows/posix.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index ac955f78c..383fd6c9e 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -178,7 +178,7 @@ jobs: path: ${{github.workspace}}/scan_build_report retention-days: 5 - - name: Run the bpf_conformance tests + - name: Run the local bpf_conformance tests run: | export BPF_CONFORMANCE_RUNNER="build_bpf_conformance/src/bpf_conformance_runner" export BPF_CONFORMANCE_TEST_DIR="--test_file_directory tests" @@ -195,6 +195,23 @@ jobs: ${BPF_CONFORMANCE_RUNNER} ${BPF_CONFORMANCE_TEST_DIR} ${BPF_CONFORMANCE_PLUGIN_JIT} ${BPF_CONFORMANCE_RUNNER} ${BPF_CONFORMANCE_TEST_DIR} ${BPF_CONFORMANCE_PLUGIN_INTERPRET} + - name: Run the upstream bpf_conformance tests + run: | + export BPF_CONFORMANCE_RUNNER="build_bpf_conformance/src/bpf_conformance_runner" + export BPF_CONFORMANCE_TEST_DIR="--test_file_directory external/bpf_conformance/tests" + + # For arm64, we need to run the tests in qemu, so use the scripts + if [[ "${{ inputs.arch }}" == "arm64" ]] ; then + export BPF_CONFORMANCE_PLUGIN_JIT="--plugin_path aarch64_test/run-jit.sh" + export BPF_CONFORMANCE_PLUGIN_INTERPRET="--plugin_path aarch64_test/run-interpret.sh" + else + export BPF_CONFORMANCE_PLUGIN_JIT="--plugin_path build/bin/ubpf_plugin --plugin_options --jit" + export BPF_CONFORMANCE_PLUGIN_INTERPRET="--plugin_path build/bin/ubpf_plugin --plugin_options --interpret" + fi + + ${BPF_CONFORMANCE_RUNNER} ${BPF_CONFORMANCE_TEST_DIR} ${BPF_CONFORMANCE_PLUGIN_JIT} + ${BPF_CONFORMANCE_RUNNER} ${BPF_CONFORMANCE_TEST_DIR} ${BPF_CONFORMANCE_PLUGIN_INTERPRET} + - name: Generate code coverage report if: inputs.enable_coverage == true run: |