IP Library Granted Patent US 10,725,889
Granted Patent B2
US 10,725,889 · App. 14/909,526 · Granted Jul 28, 2020

Testing multi-threaded applications

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,725,889
App. No.
14/909,526
Granted
Jul 28, 2020
Kind
B2
Abstract

In one example, a method for testing a multi-threaded application includes running an initial test of the multi-threaded application and collecting thread generation data and determining the thread hierarchy. The thread execution is then modified to produce a modified configuration and a second test is run with the modified configuration. A device for testing of multi-threaded applications is also provided.

Claims (52)

1. A method for testing a multi-threaded application comprising:

running, with a computational processor, an initial test of the multi-threaded application and collecting thread generation data comprising identification of a parent thread for each of a plurality of child threads of the multi-threaded application;

generating, by the computational processor, a hierarchal tree comprising parent-child relationships determined from the identification of the parent thread for each child thread;

collecting thread information relating to each thread in the multi-threaded application, including a number of threads created in the multi-threaded application and function call information relating to each thread;

determining, with the computational processor, a thread hierarchy based on the hierarchal tree, wherein determining the thread hierarchy includes associating each thread with a unique identifier comprising an identifier of a parent thread and an identifier of a child thread's order of creation by its parent thread for a child thread of the parent thread;

utilizing the thread information relating to each thread and the thread hierarchy to determine an error in execution of the multi-threaded application;

modifying, using the determined error and a predefined thread profile, a thread execution priority of at least one thread of the multi-threaded application to produce a modified configuration of the multi-threaded application based on the thread hierarchy; and

running, with the computational processor, a second test with the modified configuration of the multi-threaded application.

2. The method of claim 1 , further comprising compiling the multi-threaded application in a debug mode with less optimization than a release mode, in which running the initial test comprises executing the compiled multi-threaded application.

3. The method of claim 1 , in which running the initial test comprises executing the multi-threaded application in a release mode.

4. The method of claim 1 , in which determining the thread hierarchy comprises:

receiving notifications of thread generation from an operating system; and

organizing the thread information relating to each thread into the thread hierarchy.

5. The method of claim 4 , in which notifications of thread generation from the operating system comprises notifications of new thread generation from a dynamic link library within the operating system.

6. The method of claim 4 , in which collecting thread information relating to each thread further comprises identifying, for a parent thread and a corresponding child thread of the multi-threaded application, a numeric order in which the parent thread generated the child thread among sibling threads.

7. The method of claim 4 , further comprising displaying the thread hierarchy in a dynamic graphical format to a user.

8. The method of claim 1 , in which modifying a thread execution to produce a modified configuration comprises:

identifying threads with a potential for variable execution times; and

modifying the execution time of the identified threads.

9. The method of claim 8 , in which modifying the execution time of the identified threads comprises delaying execution of the identified threads.

10. The method of claim 1 , further comprising:

running the second test with the modified configuration;

detecting an error associated with the second test; and

compiling an error report.

11. The method of claim 10 , further comprising presenting the error report to a user by replaying at least a portion of the test with the modified configuration that produced the error associated with the second test.

12. The method of claim 11 , in which the error report is presented graphically by:

displaying the thread hierarchy in the modified configuration as a hierarchical tree;

graphically indicating which threads are active during a portion of the test that produced the error associated with the second test; and

indicating which active threads are conflicted to produce the error associated with the second test.

13. The method of claim 12 , in which:

graphically indicating the active threads comprises highlighting the active threads on the hierarchical tree; and

graphically indicating interactions between the active threads on the hierarchical tree.

14. A computing device comprising:

a memory storing module instructions and a multi-threaded application; and

a processor to execute the module instructions to form modules, wherein the modules comprise:

a thread detecting module to run an initial test comprising running the multi-threaded application and collecting thread generation data comprising identification of a parent thread for each of a plurality of child threads of the multithreaded application and thread information relating to each thread in the multi-threaded application, including a number of threads created in the multi-threaded application and function call information relating to each thread;

a thread hierarchy module to create a thread hierarchal tree comprising parent child relationships determined from the identification of the parent thread for each child thread, wherein to create the thread hierarchal tree, the thread hierarchy module associates each thread with a unique identifier comprising an identifier of a parent thread and an identifier of a child thread's order of creation by its parent thread for a child thread of the parent thread;

a thread execution modify module to determine, utilizing the thread information relating to each thread and a thread hierarchy based on the thread hierarchal tree, an error in execution of the multi-threaded application and to modify, using the determined error and a predefined thread profile, priority of at least one thread of the multi-threaded application to produce a modified configuration of the multi-threaded application based on the thread hierarchal tree; and

a test application module to run a second test with the modified configuration.

15. The device of claim 14 , further comprising an operating system module, in which the thread detecting module is to collect the thread generation data from the operating system module.

16. The device of claim 14 , in which the thread execution modify module is to:

identify threads with a potential for variable execution times; and

delay the execution of threads with variable execution times to produce a modified thread execution.

17. The device of claim 16 , in which the test application module is to run the modified thread execution.

18. A computer program product for testing multi-threaded applications the computer program product comprising:

a non-transitory computer readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising:

computer readable program code to run an initial test of a multi-threaded application and collect thread generation data including identification of a parent thread for each child thread;

computer readable program code to determine a thread hierarchy by creating a hierarchal tree showing parent-child relationships between threads and associating each thread with a unique identifier comprising an identifier of a parent thread and an identifier of a child thread's order of creation by its parent thread for a child thread of the parent thread;

computer readable program code to collect thread information relating to each thread in the multi-threaded application, including a number of threads created in the multi-threaded application and function call information relating to each thread;

computer readable code to utilize the thread information relating to each thread and the thread hierarchy to determine an error in execution of the multi-threaded application;

computer readable program code to modify, using the determined error and a predefined thread profile, a thread execution priority of at least one thread with a variable execution time to produce a modified configuration of the multi-threaded application; and

computer readable program code to run a second test with the modified configuration of the multi-threaded application and monitor the second test for errors.

Assignments (8)
RELEASE OF SECURITY INTEREST REEL/FRAME 044183/0577 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC (F/K/A ENTIT SOFTWARE LLC)
Reel/Frame 063560/0001 →
RELEASE OF SECURITY INTEREST REEL/FRAME 044183/0718 Recorded Feb 2, 2023
From: JPMORGAN CHASE BANK, N.A.
To: MICRO FOCUS LLC (F/K/A ENTIT SOFTWARE LLC); BORLAND SOFTWARE CORPORATION; MICRO FOCUS (US), INC.; SERENA SOFTWARE, INC; ATTACHMATE CORPORATION; MICRO FOCUS SOFTWARE INC. (F/K/A NOVELL, INC.); NETIQ CORPORATION
Reel/Frame 062746/0399 →
CHANGE OF NAME Recorded Aug 8, 2019
From: ENTIT SOFTWARE LLC
To: MICRO FOCUS LLC
Reel/Frame 050004/0001 →
SECURITY INTEREST Recorded Oct 11, 2017
From: ATTACHMATE CORPORATION; BORLAND SOFTWARE CORPORATION; NETIQ CORPORATION; MICRO FOCUS (US), INC.; MICRO FOCUS SOFTWARE, INC.; ENTIT SOFTWARE LLC; ARCSIGHT, LLC; SERENA SOFTWARE, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 044183/0718 →
SECURITY INTEREST Recorded Oct 11, 2017
From: ENTIT SOFTWARE LLC; ARCSIGHT, LLC
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 044183/0577 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 9, 2017
From: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
To: ENTIT SOFTWARE LLC
Reel/Frame 042746/0130 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 16, 2016
From: CHEN, BO; LUAN, JIN-FENG; NIR, DOR
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 040344/0918 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2016
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 038536/0001 →