DebCovDiff: Differential Testing of Coverage Measurement Tools on Real-World Projects
Wentao Zhang, Jinghao Jia, Erkai Yu, Darko Marinov, Tianyin Xu
Abstract
Measuring code coverage is a critical practice in software testing. Incorrect or misleading coverage information reported by automatic tools can increase the software development cost and lead to negative consequences especially for safety-critical software. Ensuring the correctness of coverage measurement tools is therefore important. Prior studies have applied various techniques to find bugs in Gcov and LLVM-cov, the two most widely used coverage tools for C/C++. However, those studies had two limiting factors. First, they used only small, often synthetic, programs, potentially missing bugs in real-world scenarios. Second, they focused only on basic line coverage, neglecting advanced metrics that are both more complex to implement and commonly required for safety-critical software.This paper presents the first empirical study of coverage measurement tools for real-world projects. We implement DebCovDiff, a testing framework that takes Debian packages as the input programs and performs differential testing of Gcov and LLVM-cov, for line coverage and two advanced coverage metrics. We design robust differential oracles to (1) filter out discrepancies arising from subtle differences in the tool output presentation, (2) overcome the nondeterministic nature of certain packages, and (3) support advanced coverage metrics. From results on 47 Debian packages, we identify 34 new bugs, including 2 crashing bugs and 32 deeper bugs that produce wrong coverage reports.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get d77a2759-71af-4ae5-a5d2-fe33fc47293cRelated papers
- Heterogeneous Testing for Coverage Profilers Empowered with Debugging SupportYibiao Yang, Maolin Sun, Yang Wang, Qingyang Li et al.FSE 2023 · 3 citations
- DTD: Comprehensive and Scalable Testing for DebuggersHongyi Lu, Zhibo Liu, Shuai Wang, Fengwei ZhangFSE 2024 · 2 citations
- GrayC: Greybox Fuzzing of Compilers and Analysers for CKarine Even-Mendoza, Arindam Sharma, Alastair F. Donaldson, Cristian CadarISSTA 2023 · 52 citations
- Metamorphic CoverageJinsheng Ba, Yuancheng Jiang, Manuel RiggerISSTA 2026
- ZendDiff: Differential Testing of PHP InterpreterYuancheng Jiang, Jianing Wang, Qiange Liu, Yeqi Fu et al.ASE 2025 · 1 citation
