Skip to content

Commit

Permalink
bpf,test: Disable coverage reports for some tests
Browse files Browse the repository at this point in the history
Disable coverage report for some tests affected by Coverbee's bug.

cilium/coverbee#7

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
  • Loading branch information
YutaroHayakawa authored and youngnick committed Mar 22, 2023
1 parent 7cfd92f commit f7ed911
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/lint-bpf-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,12 @@ jobs:
persist-credentials: false
fetch-depth: 0
- name: Run BPF tests with code coverage reporting
env:
# Disable coverage report for these test cases since they are hitting
# https://github.com/cilium/coverbee/issues/7
NOCOVER_PATTERN: "inter_cluster_snat_clusterip.*|session_affinity_test.o|tc_egressgw_redirect.o|tc_egressgw_snat.o|tc_nodeport_lb4_dsr_backend.o|tc_nodeport_lb4_dsr_lb.o|tc_nodeport_lb4_nat_backend.o|tc_nodeport_lb4_nat_lb.o|xdp_nodeport_lb4_dsr_lb.o|xdp_nodeport_lb4_nat_backend.o|xdp_nodeport_lb4_nat_lb.o|xdp_nodeport_lb4_test.o"
run: |
make -C test run_bpf_tests COVER=1 || (echo "Run 'make -C test run_bpf_tests COVER=1' locally to investigate failures"; exit 1)
make -C test run_bpf_tests COVER=1 NOCOVER="$NOCOVER_PATTERN" || (echo "Run 'make -C test run_bpf_tests COVER=1 NOCOVER=\"$NOCOVER_PATTERN\"' locally to investigate failures"; exit 1)
- name: Archive code coverage results
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
Expand Down
3 changes: 3 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ ifeq ($(COVER),1)
COVERFORMAT:=html
endif
BPF_TEST_FLAGS += -coverage-report $(ROOT_DIR)/bpf-coverage.$(COVERFORMAT) -coverage-format $(COVERFORMAT)
ifdef NOCOVER
BPF_TEST_FLAGS += -no-test-coverage "$(NOCOVER)"
endif
endif
ifeq ($(INSTRLOG),1)
BPF_TEST_FLAGS += -instrumentation-log $(ROOT_DIR)/test/bpf-instrumentation.log
Expand Down

0 comments on commit f7ed911

Please sign in to comment.