Systems and methods for implementing test applications for systems using locks
AssigneeInternational Business Machines Corporation
InventorsAviad Zlotnick, Eitan Farchi, Yarden Nir-Buchbinder
Life of this patent
Estimating the term…
Abstract
A method of testing a system includes providing a shared memory including at least one value and at least one lock associated with the at least one value, the at least one lock including one or more shared read sublocks and an exclusive write sublock, providing a plurality of subsystems in communication with the shared memory and configured to access and update the at least one value, providing a test application on at least one of the plurality of subsystems, and running the test application on the one of the plurality of subsystems. A list of locks and values given to the test application includes a pre-existing list of locks and values in the system under the testing.
Claims1
A method of testing a system, comprising:
- providing a shared memory including at least one value and at least one lock associated with the at least one value, the at least one lock including one or more shared read sublocks and an exclusive write sublock;
- providing a plurality of subsystems in communication with the shared memory and configured to access and update the at least one value;
- providing a test application on at least one of the plurality of subsystems;
- and
- running the test application on the at least one of the plurality of subsystems,
- wherein the test application comprises:
- providing a predetermined list including a plurality of entries, each entry including a lock identification;
- randomly choosing one of the plurality of entries;
- randomly choosing one of one or more shared read sublocks and an exclusive write sublock of a lock associated with the lock identification of the one of the plurality of entries;
- determining whether the one of the one or more shared read sublocks and the exclusive write sublock is available;
- if the one of the one or more shared read sublocks and the exclusive write sublock is available, acquiring the one of the one or more shared read sublocks and the exclusive write sublock;
- if the one of the one or more shared read sublocks and the exclusive write sublock is not available, waiting for the one of the one or more shared read sublocks and the exclusive write sublock to become available;
- holding the one of the one or more shared read sublocks and the exclusive write sublock for a specific time;
- and
- releasing the one of the one or more shared read sublocks and the exclusive write sublock;
- wherein a list of locks and values given to the test application comprises a list of pre-existing locks and values in the system under said testing.
Dependencies are inferred from the claim text.