Unit testing concurrent software

  • Authors:
  • William Pugh;Nathaniel Ayewah

  • Affiliations:
  • Univ. of Maryland, College Park, MD;Univ. of Maryland, College Park, MD

  • Venue:
  • Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

There are many difficulties associated with developing correct multithreaded software, and many of the activities that are simple for single threaded software are exceptionally hard for multithreaded software. One such example is constructing unit tests involving multiple threads. Given, for example, a blocking queue implementation, writing a test case to show that it blocks and unblocks appropriately using existing testing frameworks is exceptionally hard. In this paper, we describe the MultithreadedTC framework which allows the construction of deterministic and repeatable unit tests for concurrent abstractions. This framework is not designed to test for synchronization errors that lead to rare probabilistic faults under concurrent stress. Rather, this framework allows us to demonstrate that code does provide specific concurrent functionality (e.g., a thread attempting to acquire a lock is blocked if another thread has the lock). We describe the framework and provide empirical comparisons against hand-coded tests designed for Sun's Java concurrency utilities library and against previous frameworks that addressed this same issue. The source code for this framework is available under an open source license.