paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Assessing the state and improving the art of parallel testing for C

评估 C 语言并行测试的现状并改进其技术
ISSTA Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis2019匹配度 1/10 · 该论文聚焦C语言测试套件的安全并行执行与加速,属于软件测试/并发工程,未涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心方向。虽然与PL/软件工程有弱关联,但不在研究画像的问题域内。引用 9 inbox
Oliver Schwahn, Nicolas Coppik, Stefan Winter, Neeraj Suri
crossref: 2026-09-12

AI 速览

一句话:大规模分析 C 项目测试套件,提出安全并行执行判定与进程/线程并行策略,显著加速测试。

测试套件执行延迟与测试用例的并发程度密切相关,但若测试用例未按并发执行设计,彼此干扰会导致结果偏离顺序执行;为每个测试提供隔离环境虽可避免干扰,却会带来开销并削弱并行测试的价值。作者对 Debian Buster 软件包仓库的大规模分析表明,现有 C 项目测试套件对并行化的利用有限。为此,论文提出一种方法:先分析 C 测试套件能否安全并发执行,即以顺序执行结果为基准判断结果不变性;若安全,则采用进程或线程按不同并行策略执行测试。作者将方法应用于 9 个 C 项目,发现多数项目因测试代码不安全或程序代码中共享变量/文件使用不安全而无法安全并行;并行执行在多数项目上显著快于顺序执行;多线程很少优于多进程;同时缺少统一的 C 测试框架,使 make 成为标准测试驱动,并引入不必要的测试执行性能开销。

问题
C 测试套件并行执行时可能因测试间干扰产生与顺序执行不同的结果,而完全隔离执行又会抵消并行化的收益;现有 C 项目对并行测试的使用也较为有限。
方法
对 Debian Buster 仓库进行大规模分析,并提出分析 C 测试套件是否可安全并发执行(结果与顺序执行一致)的方法;在判定安全后,使用进程或线程按不同并行化策略并发执行测试。
评估
将方法应用于 9 个 C 项目,考察安全并行能力、相对顺序执行的加速效果、进程与线程策略的差异,以及缺少统一 C 测试框架带来的性能开销。
原文摘要(Abstract)

The execution latency of a test suite strongly depends on the degree of concurrency with which test cases are executed. However, if test cases are not designed for concurrent execution, they may interfere, causing result deviations compared to sequential execution. To prevent this, each test case can be provided with an isolated execution environment, but the resulting overheads diminish the merit of parallel testing. Our large-scale analysis of the Debian Buster package repository shows that existing test suites in C projects make limited use of parallelization. We present an approach to (a) analyze the potential of C test suites for safe concurrent execution, i.e., result invariance compared to sequential execution, and (b) execute tests concurrently with different parallelization strategies using processes or threads if it is found to be safe. Applying our approach to 9 C projects, we find that most of them cannot safely execute tests in parallel due to unsafe test code or unsafe usage of shared variables or files within the program code. Parallel test execution shows a significant acceleration over sequential execution for most projects. We find that multi-threading rarely outperforms multi-processing. Finally, we observe that the lack of a common test framework for C leaves make as the standard driver for running tests, which introduces unnecessary performance overheads for test execution.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot5382,
  title = {Assessing the state and improving the art of parallel testing for C},
  author = {Oliver Schwahn and Nicolas Coppik and Stefan Winter and Neeraj Suri},
  booktitle = {ISSTA},
  year = {2019},
  doi = {10.1145/3293882.3330573}
}