Assessing the State and Improving the Art of Parallel Testing for C
The execution latency of a test suite strongly depends on the degree of concurrency with which test cases are being executed. However, if test cases have not been designed for concurrent execution, they may interfere, which can lead to result deviations compared to sequential execution. To prevent such interferences, each test case can be provided with an isolated execution environment, but this entails performance overheads that diminish the merit of parallel testing. In this paper, we present a large-scale analysis of the Debian Buster package repository, showing that existing test suites in C projects make limited use of parallelization. We then 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 in step (a). Using this approach on nine 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. The parallel execution of tests 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 testers with make as the standard driver for running tests, which introduces unnecessary performance overheads for test execution.
Thu 18 Jul
|11:00 - 11:22|
|11:22 - 11:45|
August ShiUniversity of Illinois at Urbana-Champaign, Jonathan BellGeorge Mason University, Darko MarinovUniversity of Illinois at Urbana-ChampaignPre-print Media Attached
|11:45 - 12:07|
|12:07 - 12:30|