From 9015abafb60f950a6b1a800f84cbf569b07828a1 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Sat, 8 Aug 2026 19:12:49 +0300 Subject: ipoe: include net/rtnetlink.h, insert modules in ci even after a failure rtnl_link_register() and struct rtnl_link_ops were reaching the driver through some other header rather than through net/rtnetlink.h, which is the kind of thing that only shows up when building against a different kernel. Include it directly. The workflows insert the kernel modules between two pytest runs, and the runs that follow are marked 'if: always()' while the insmod steps are not. A failure in an earlier, unrelated test therefore skips the insmod but still runs the tests that need the module, which then report a missing driver instead of the original problem. Mark the insmod steps 'if: always()' as well, so that the later runs test what they are supposed to. --- .github/workflows/run-tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.github/workflows/run-tests.yml') diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9cd47a00..10f238cc 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -145,6 +145,7 @@ jobs: sudo dmesg" - name: Insert ipoe kernel module + if: ${{ always() }} run: > ssh -i ssh-key -p2222 user@localhost "cd accel-ppp && sudo insmod build/drivers/ipoe/driver/ipoe.ko && @@ -163,12 +164,14 @@ jobs: sudo dmesg" - name: Insert vlan_mon kernel module + if: ${{ always() }} run: > ssh -i ssh-key -p2222 user@localhost "cd accel-ppp && sudo insmod build/drivers/vlan_mon/driver/vlan_mon.ko && lsmod | grep vlan_mon" - name: Insert ppposeq kernel module + if: ${{ always() }} run: > ssh -i ssh-key -p2222 user@localhost "cd accel-ppp && sudo modprobe pppox && sudo insmod build/drivers/ppposeq/driver/ppposeq.ko && @@ -290,6 +293,7 @@ jobs: doas dmesg" - name: Insert ipoe kernel module + if: ${{ always() }} run: > ssh -i ssh-key -p2222 alpine@localhost "cd accel-ppp && doas insmod build/drivers/ipoe/driver/ipoe.ko && @@ -308,12 +312,14 @@ jobs: doas dmesg" - name: Insert vlan_mon kernel module + if: ${{ always() }} run: > ssh -i ssh-key -p2222 alpine@localhost "cd accel-ppp && doas insmod build/drivers/vlan_mon/driver/vlan_mon.ko && lsmod | grep vlan_mon" - name: Insert ppposeq kernel module + if: ${{ always() }} run: > ssh -i ssh-key -p2222 alpine@localhost "cd accel-ppp && doas modprobe pppox && doas insmod build/drivers/ppposeq/driver/ppposeq.ko && -- cgit v1.2.3 From 60702f40ac55d474ce26bd8e1d904feb9e5f160f Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Sat, 8 Aug 2026 19:19:13 +0300 Subject: ci: survive the negative branch counters gcov reports The coverage job fails while gcovr reads the data for triton.c: Unrecognized GCOV output ... branch 2 taken -1 NegativeHits: Got negative hit value in gcov line 'branch 2 taken -1' gcov emits those now and then, it is gcc bug 68080 and not something the source can avoid. gcovr 6 and later treat it as a fatal parse error unless --gcov-ignore-parse-errors names the case to tolerate. Passing that option unconditionally is not enough, since the job runs on both ubuntu-24.04 and ubuntu-22.04 and the gcovr in the latter predates it and takes no value. Ask gcovr whether it knows the option before adding it, and print what was decided so the log says which one ran. --- .github/workflows/run-tests.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to '.github/workflows/run-tests.yml') diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 10f238cc..7ce55b6e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -484,9 +484,17 @@ jobs: - name: Generate coverage reports (default(txt), csv, html) run: | mkdir -p tests/report - gcovr --config=tests/gcovr.conf --output=tests/report/accel-ppp.txt - gcovr --config=tests/gcovr.conf --csv --output=tests/report/accel-ppp.csv - gcovr --config=tests/gcovr.conf --html --html-details --output=tests/report/accel-ppp.html + # gcov reports negative branch counters now and then (gcc bug 68080). + # gcovr 6 and later stop with a parse error unless told to carry on, + # older ones do not know the option at all, so ask before using it. + IGNORE="" + if gcovr --help 2>&1 | grep -q negative_hits; then + IGNORE="--gcov-ignore-parse-errors=negative_hits.warn_once_per_file" + fi + echo "gcovr `gcovr --version | head -1`, extra options: '$IGNORE'" + gcovr --config=tests/gcovr.conf $IGNORE --output=tests/report/accel-ppp.txt + gcovr --config=tests/gcovr.conf $IGNORE --csv --output=tests/report/accel-ppp.csv + gcovr --config=tests/gcovr.conf $IGNORE --html --html-details --output=tests/report/accel-ppp.html - name: Show default coverage report run: cat tests/report/accel-ppp.txt -- cgit v1.2.3