Race condition testing via a scheduling test program
Abstract
Disclosed herein are methods, systems, and software to enhance the testing of race conditions in programs. In one example, a method of testing race conditions in a target program with one or more concurrent processes includes generating a scheduling program based on race conditions identified in the target program, wherein the scheduling program includes order of operation rules for the one or more concurrent processes. The method further provides initiating execution of the scheduling program, and executing the target program based on the order of operation rules for the one or more concurrent processes.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method of operating a computing system to test one or more race conditions in a target program, wherein the target program comprises a first concurrent process and a second concurrent process, the method comprising:
executing a scheduler program, the scheduler program comprising identifying a state of interest in the target program, wherein the state of interest in the target program comprises a first state of interest in the first concurrent process and a second state of interest in the second concurrent process;
initiating independent execution of the first and second concurrent processes, which execute as independent operations on the computing system;
pausing the first concurrent process when the first concurrent process reaches the state of interest, and until the second concurrent process reaches the second state of interest; and
creating the race condition by continuing both the first and second concurrent processes at the state of interest in the target program.
2. The method of claim 1 further comprising receiving user input to generate the scheduler program.
3. The method of claim 1 wherein executing the scheduler program comprises initiating a thread for the scheduler program.
4. The method of claim 1 wherein executing the scheduler program comprises executing the scheduler program in response to initiating the execution of the target program.
5. The method of claim 4 wherein executing the scheduler program in response to initiating the execution of the target program comprises:
identifying a call from the target program to execute the scheduler program; and
in response to the call, executing the scheduler program.
6. The method of claim 5 further comprising:
in response to identifying the call, holding execution of the target program; and
in response to executing the scheduler program, continuing execution of the target program.
7. An apparatus to perform testing of one or more race conditions in a target program, wherein the target program comprises a first concurrent process and a second concurrent process, the apparatus comprising:
one or more computer readable media; and
processing instructions stored on the one or more computer readable media that, when executed by a processing system, direct the processing system to:
execute a scheduler program, the scheduler program comprising identifying a state of interest in the target program, wherein the state of interest in the target program comprises a first state of interest in the first concurrent process and a second state of interest in the second concurrent process;
initiate independent execution of the first and second concurrent processes, which execute as independent operations on the computing system;
pause the first concurrent process when the first concurrent process reaches the state of interest, and until the second concurrent process reaches the second state of interest; and
create the race condition by continuing both the first and second concurrent processes at the state of interest in the target program.
8. The apparatus of claim 7 , wherein the processing instructions further direct the computing system to receive user input to generate the scheduler program.
9. The apparatus of claim 7 , wherein the processing instructions to execute the scheduler program direct the processing system to initiate a thread for the scheduler program.
10. The apparatus of claim 7 , wherein the processing instructions to execute the scheduler program direct the processing system to execute the scheduler program in response to initiating the execution of the target program.
11. The apparatus of claim 10 , wherein the processing instructions to execute the scheduler program in response to initiating the execution of the target program direct the processing system to:
identify a call from the target program to execute the scheduler program;
in response to the call, execute the scheduler program.
12. The apparatus of claim 7 , wherein the scheduler program and the target program comprise programs written in different programming languages.
13. A computing apparatus comprising:
one or more computer readable storage media;
one or more processors operatively coupled with the one or more computer readable storage media; and
program instructions stored on the one or more computer readable storage media for load balancing requests across origin servers that, when executed by the one or more processors, direct the computing apparatus to at least:
execute a scheduler program, the scheduler program comprising identifying a state of interest in a target program, wherein the state of interest in the target program comprises a first state of interest in a first concurrent process and a second state of interest in a second concurrent process;
initiate independent execution of the first and second concurrent processes, which execute as independent operations on the computing apparatus;
pause the first concurrent process when the first concurrent process reaches the state of interest, and until the second concurrent process reaches the second state of interest; and
create a race condition by continuing both the first and second concurrent processes at the state of interest in the target program.
14. The computing apparatus of claim 13 , wherein the scheduler program comprises state rules corresponding to states for each of the first and second concurrent process.Join the waitlist — get patent alerts
Track US11119903B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.