CONCURRENCY AND COMPUTATION: PRACTICE AND EXPERIENCE
Concurrency Computat.: Pract. Exper. 2014; 26:21–50
Published online 10 October 2012 in Wiley Online Library (wileyonlinelibrary.com). DOI: 10.1002/cpe.2937
Structural testing for message-passing concurrent programs:
an extended test model
Paulo S. L. Souza
1,
*
,†
, Simone R. S. Souza
1
and Ed Zaluska
2
1
Computer Systems Department, University of São Paulo, São Carlos, 13566-590, Brazil
2
Electronic and Computer Science, University of Southampton, Southampton, SO17 1BJ, UK
SUMMARY
Developing high-quality, error-free message-passing concurrent programs is not trivial. Although a number
of different primitives with associated semantics are available to assist such development, they often increase
the complexity of the testing process. In this paper, we extend our previous test model for message-
passing programs and present new structural testing criteria, taking into account additional features used in
this paradigm, such as collective communication, non-blocking sends, distinct semantics for non-blocking
receives, and persistent operations. Our new model also recognizes that sender primitives cannot always
be matched with every receive primitive. This improvement allows us to remove statically a significant
number of infeasible synchronization edges that would otherwise have to be analyzed later by the tester.
In this paper, the test model is presented using the Message-Passing Interface standard; however, our new
model has been designed to be flexible, and it can be configured to support a range of different message-
passing environments or languages. We have carried out case studies showing the applicability of the new
test model to represent message-passing programs and also to reveal errors, mainly those errors related to
inter-process communication. In addition to increasing the number of features supported by the test model,
we have also reduced the overall cost of testing significantly. Our case studies suggest that the number
of synchronization edges can be reduced by up to 93%, mainly by eliminating infeasible edges between
unmatchable communication primitives. The main contribution of the paper is to present a more flexible test
model that provides improved coverage for message-passing programs and at the same time reduces the cost
of testing significantly. Copyright © 2012 John Wiley & Sons, Ltd.
Received 1 August 2011; Revised 10 September 2012; Accepted 16 September 2012
KEY WORDS: concurrent software testing; message-passing programs; structural testing criteria
1. INTRODUCTION
Developing high-quality, error-free concurrent programs is not trivial. In addition to the usual
sequential control and data flows found in sequential programs [1], concurrent algorithms have
another added dimension because of the communication and synchronization requirements. The
validation and testing of concurrent programs are a valuable mechanism to ensure quality
by revealing unknown errors. However, features such as non-determinism, deadlocks, different
programming paradigms, communication, and synchronization all make the testing activity for
concurrent programs significantly more complex. For sequential programs, many testing problems
were significantly reduced with the introduction of testing criteria and the implementation of
supporting tools. A testing criterion is a predicate to be satisfied by a set of test cases that can
be used as a guideline for the generation of test data. In other words, structural criteria allow the
*Correspondence to: Paulo S. L. Souza, USP/ICMC/SSC Avenida Trabalhador São-Carlense, 400, Centro, P.O. Box: 668,
São Carlos, São Paolo, 13566-590, Brazil.
†
E-mail: pssouza@icmc.usp.br
Copyright © 2012 John Wiley & Sons, Ltd.