[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Code coverage is broken
From: |
Nala Ginrut |
Subject: |
Code coverage is broken |
Date: |
Sat, 9 Feb 2019 03:27:58 +0800 |
Hi folks!
I'm trying to add code coverage for certain program.
However, the function callings are always unrecorded.
--------------------------------------------------------------------------------------
(use-modules (system vm coverage)
(system vm vm))
(call-with-values
(lambda ()
(with-code-coverage
(lambda () (display "hello\n"))))
(lambda (data result)
(let ((port (open-output-file "1.info")))
(coverage-data->lcov data port)
(close port))))
---------------------------------------------------------------------------------------
(To someone who uses old 2.0, with-code-coverage interface has been
changed to accept only one thunk)
When I use lcov to generate coverage graph, it always complains that
--------------------------------------------
lines......: 0.0% (0 of 36447 lines)
functions..: no data found
branches...: no data found
--------------------------------------------
I found the FN tag in info file is always missing.
Then I found in 581a4eb82b1534970060e3cbd79b9a96d351edf9
-------------------------------------------------
+ #;
(for-each dump-function procs)
-------------------------------------------------
It seems that FN printing was skipped intended.
Is it a bug?
Anyone who has tried code coverage?
Thanks!
- Code coverage is broken,
Nala Ginrut <=