build: Fix coverage target failing with stale .gcda files
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/2 build: Fix coverage target failing with stale .gcda files
From: Luiz Augusto von Dentz <[email protected]>
Coverage data from a previous build is not overwritten by 'make check' for binaries that are not run by it, causing geninfo to fail with a stamp mismatch once the objects are rebuilt. Zero the counters before running the tests and mark the targets as phony since coverage/ is also the output directory.
--- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Makefile.am +5 -1
@@ -999,7 +999,11 @@ if COVERAGE @lcov --directory $(top_builddir) --zerocounters $(RM) -r coverage $(top_builddir)/coverage.info -coverage: check +.PHONY: coverage clean-coverage + +coverage: + @lcov --directory $(top_builddir) --zerocounters + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check @lcov --compat-libtool --directory $(top_builddir) --capture \ --output-file $(top_builddir)/coverage.info $(AM_V_at)$(MKDIR_P) coverage
Signature · 1 line
2.55.0
Luiz Augusto von Dentz
maintainerPATCH 2/2 test-runner: Share build directory writable on coverage builds
From: Luiz Augusto von Dentz <[email protected]>
The root filesystem is shared read-only with the guest so gcov is not able to write the .gcda files of binaries run by test-runner, e.g. by the functional tests. Share the build directory writable over 9p and mount it over the read-only one when coverage is enabled.
--- Makefile.tools | 3 +++ tools/test-runner.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+)
Makefile.tools +3 -0
@@ -325,6 +325,9 @@ tools_btgatt_server_LDADD = src/libshared-mainloop.la \ lib/libbluetooth-internal.la tools_test_runner_CFLAGS = $(WARNING_CFLAGS) +if COVERAGE +tools_test_runner_CFLAGS += -DHAVE_COVERAGE +endif tools_test_runner_LDFLAGS = tools_rctest_LDADD = lib/libbluetooth-internal.la
tools/test-runner.c +45 -0
63 lines not on this page · raw message
Signature · 1 line
2.55.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1175582/
---Test result---
Test Summary:
CheckPatch PASS 1.00 seconds GitLint PASS 0.71 seconds BuildEll PASS 19.89 seconds BluezMake PASS 392.34 seconds MakeCheck PASS 14.72 seconds MakeDistcheck PASS 146.61 seconds CheckValgrind PASS 239.11 seconds CheckSmatch PASS 295.94 seconds bluezmakeextell PASS 95.19 seconds TestFunctional PASS 1125.76 seconds IncrementalBuild PASS 396.82 seconds ScanBuild PASS 1146.71 seconds
https://github.com/bluez/bluez/pull/2601
---
Regards,
Linux Bluetooth
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 9 lines · On Mon, 28 Sep 2026 16:47:30 -0400 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
Coverage data from a previous build is not overwritten by 'make check' for binaries that are not run by it, causing geninfo to fail with a stamp mismatch once the objects are rebuilt. Zero the counters before running the tests and mark the targets as phony since coverage/ is also the output directory.
[...]
Here is the summary with links:
- [BlueZ,v1,1/2] build: Fix coverage target failing with stale .gcda files
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=8814ac26fe65 - [BlueZ,v1,2/2] test-runner: Share build directory writable on coverage builds https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=86713777f91a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html