TS 68 CNDThreadAnalyzer
C/C++ Pack Test Specification for Thread Analyzer
Author: Valeriy Soldatov
Version: 0.1
Lastupdate: 09.09.2009
Introduction: Test specification for Thread Analyzer in NetBeans 6.8 C/C++ Pack
Contents |
Test suite: Thread Analyzer
Purpose: Verify Thread Analyzer in NetBeans C/C++ Pack 6.8
Comment:
Sun Studio tools should be installed on your machine ([Sun Studio
C, C++ & Fortran Compilers and Tools|http://developers.sun.com/sunstudio/])
Supported Solaris Operating System Versions:
- SPARC systems: Solaris 10 1/06 or later
- x86 systems: Solaris 10 1/06 or later, OpenSolaris 2008.11, OpenSolaris 2009.06
Supported Linux Operating System Versions:
- SuSE Linux Enterprise Server 10, RedHat Enterprise Linux 5, CentOS 5
Thread Analyzer doesn't work on Windows and Mac OS.
- Find potential deadlocks
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'potential_deadlock' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 5 seconds
'1 deadlock detected details' text appears in this tab - http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/threads_and_deadlocks_tab_TS_68_CNDThreadAnalyzer.png
- Click on 'detail'
{{result|'Thread Analysis Tool' tab appears. - http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/test1_TS_68_CNDThreadAnalyzer.png
- EXPECTED RESULT: 'Thread Analysis Tool' tab contains 'Potential deadlock' node in left column and 4 nodes (2 'Lock held' and 2 'Lock requested') in right column. 'Go To Source' context menu item move cursor on valid line.
- Find actual deadlocks
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'actual_deadlock' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 5 seconds
'1 deadlock detected details' text appears in this tab - Click on 'detail'
{{result|'Thread Analysis Tool' tab appears. - http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/test2_TS_68_CNDThreadAnalyzer.png
- EXPECTED RESULT: 'Thread Analysis Tool' tab contains 'Potential deadlock' node in left column and 4 nodes (2 'Lock held' and 2 'Lock requested') in right column. 'Go To Source' context menu item move cursor on valid line.
- Find data races
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'race' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Dataraces and Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 5 seconds
'2 dataraces detected details' text appears in this tab - Click on 'detail'
{{result|'Thread Analysis Tool' tab appears. - http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/test3_TS_68_CNDThreadAnalyzer.png
- EXPECTED RESULT: 'Thread Analysis Tool' tab contains 2 nodes in left column. 'Go To Source' context menu item move cursor on valid line.
- Find data races in Fortran project
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'race_fortran' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Dataraces and Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 5 seconds
'2 dataraces detected details' text appears in this tab - Click on 'detail'
{{result|'Thread Analysis Tool' tab appears.
- EXPECTED RESULT: 'Thread Analysis Tool' tab contains 1 node in left column. 'Go To Source' context menu item move cursor on valid line.
- Find data races in Source Based project
- Unpack the attached project (ThreadAnalyzerDemo2)
- Open project in NetBeans
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Dataraces and Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 5 seconds
'2 dataraces detected details' text appears in this tab - Click on 'detail'
{{result|'Thread Analysis Tool' tab appears.
- EXPECTED RESULT: 'Thread Analysis Tool' tab contains 2 nodes in left column. 'Go To Source' context menu item move cursor on valid line.
- Find potential deadlocks in Release mode
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'release' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears. - Wait about 5 seconds
'1 deadlock detected details' text appears in this tab - Click on 'detail'
{{result|'Thread Analysis Tool' tab appears.
- EXPECTED RESULT: 'Thread Analysis Tool' tab contains 'Potential deadlock' node in left column and 4 nodes (2 'Lock held' and 2 'Lock requested') in right column. 'Go To Source' context menu item move cursor on valid line.
- Find potential deadlocks on Solaris or Linux remote host
- Repeat 1st scenario from Windows, MacOS, Linux or Solaris on Solaris or Linux remote host
- Find data races on Solaris or Linux remote host
- Repeat 3rd scenario from Windows, MacOS, Linux or Solaris on Solaris or Linux remote host
- Check 'Resume Data Collection' button in 'Manually' mode
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'two_problems' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Dataraces and Deadlocks' in 'Collect Data For' field, 'Manually' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait 'Press ENTER to continue...' message in external terminal
- Press 'Resume Data Collection' button in 'Races and Deadlocks Detection' tab
- Press ENTER in external terminal
- Wait about 5 seconds
'1 deadlock detected details' text appears in this tab - Click on 'detail'
{{result|'Thread Analysis Tool' tab appears.
- EXPECTED RESULT: 'Thread Analysis Tool' tab contains 'Potential deadlock' node in left column and 4 nodes (2 'Lock held' and 2 'Lock requested') in right column.
- Check 'Pause Data Collection' button
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'two_problems' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Dataraces and Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 5 seconds
'6 dataraces detected details' text appears in this tab - Press 'Pause Data Collection' button in 'Races and Deadlocks Detection' tab
- Press ENTER in external terminal
- Wait about 5 seconds
No changes in 'Races and Deadlocks Detection' tab
- EXPECTED RESULT: "6 dataraces detected" and "No deadlocks" in 'Races and Deadlocks Detection'.
- Check 'Stop Data Collection' button
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'two_problems' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Dataraces and Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 5 seconds
'6 dataraces detected details' text appears in this tab - Press 'Stop Data Collection' button in 'Races and Deadlocks Detection' tab
Program is terminated - Click on 'detail'
{{result|'Thread Analysis Tool' tab appears.
- EXPECTED RESULT: 6 dataraces are displayed in 'Thread Analysis Tool'.
- Check 'Deadlocks' mode (IDE ignores dataraces in this mode)
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'two_problems' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 10 seconds and press ENTER in external terminal
- Wait about 5 seconds
'1 deadlock detected details' text appears in this tab - Click on 'detail'
{{result|'Thread Analysis Tool' tab appears.
- EXPECTED RESULT: 'Thread Analysis Tool' tab contains 'Potential deadlock' node in left column and 4 nodes (2 'Lock held' and 2 'Lock requested') in right column.
- Check 'Thread usage' indicator
- Unpack the attached project (ThreadAnalyzerDemo)
- Open project in NetBeans
- Select 'potential_deadlock' project configuration on toolbar
- Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
'Configure Profile' window appears - Select 'Deadlocks' in 'Collect Data For' field, 'At the startup' in 'Start Collecting' field and press 'Start' button.
'Enable Thread Analysis of ThreadAnalyzerDemo' window appears - Click on 'OK' button
'Races and Deadlocks Detection' tab appears - Wait about 5 seconds
'1 deadlock detected details' text appears in this tab - http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/threads_and_deadlocks_tab_TS_68_CNDThreadAnalyzer.png
- EXPECTED RESULT: 1 thread is displayed on start and finish, 2 threads are displayed after ENTER

