Home // International Journal On Advances in Software, volume 13, numbers 3 and 4, 2020 // View article
Semaphore Implementations for Testing Concurrent Systems using TTCN-3
Authors:
Bernard Stepien
Liam Peyton
Dirk Borowski
Jacob Wieland
Dirk Tepelmann
Keywords: software testing-concurrent systems; TTCN-3; test oracles; race conditions; semaphores
Abstract:
Testing concurrent systems is a complex task. In traditional software unit testing, a test sequence is always composed of a stimulus and its corresponding fully predictable response. With concurrent systems, this simple model no longer holds as the state of the system under test (SUT) changes while several users place their requests. Race conditions are a particularly challenging problem for testing, since they will occur and must be identified, but are very disruptive to the test environment. An easy solution to this problem is to use semaphores that avoid race conditions. Since semaphores do not exist in TTCN-3, we have explored solutions using the TTCN-3 concept of external functions. This allows us to define behavior in the run-time language used by the TTCN-3 compiler, in our case Java, without having to modify the TTCN-3 standard. However, Java semaphores can block other parallel processes which may actually defeat parallelism. Thus, we have explored other solutions based on resource blocking rather than process blocking. This allows two or more concurrent processes to perform operations on different resources and thus achieve more sophisticated concurrency testing.
Pages: 194 to 206
Copyright: Copyright (c) to authors, 2020. Used with permission.
Publication date: December 30, 2020
Published in: journal
ISSN: 1942-2628