TS 68 CNDThreadAnalyzer

(Difference between revisions)
(Created page with ' ==C/C++ Pack Test Specification for Thread Analyzer== '''Author:''' [mailto:Valeriy.Soldatov@sun.com Valeriy Soldatov] <br> '''Version:''' 0.1 <br> '''Lastupdate:''' 09.09.2009 …')
 
Line 1: Line 1:
-
 
==C/C++ Pack Test Specification for Thread Analyzer==
==C/C++ Pack Test Specification for Thread Analyzer==
'''Author:''' [mailto:Valeriy.Soldatov@sun.com Valeriy Soldatov] <br>
'''Author:''' [mailto:Valeriy.Soldatov@sun.com Valeriy Soldatov] <br>
Line 29: Line 28:
##Wait about 5 seconds<br> {{result|'1 deadlock detected  details' text appears in this tab}}
##Wait about 5 seconds<br> {{result|'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
##http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/threads_and_deadlocks_tab_TS_68_CNDThreadAnalyzer.png
-
##Click on 'detail'<br> {{result|'Thread Analysis Tool' tab appears.
+
##Click on 'detail'<br> {{result|'Thread Analysis Tool' tab appears.}}
##http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/test1_TS_68_CNDThreadAnalyzer.png
##http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/test1_TS_68_CNDThreadAnalyzer.png
#* {{result|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.}}
#* {{result|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.}}

Current revision as of 09:02, 21 May 2010

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.

  1. Find potential deadlocks
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'potential_deadlock' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait about 5 seconds
      '1 deadlock detected details' text appears in this tab
    8. http://wiki.netbeans.org/attach/TS_68_CNDThreadAnalyzer/threads_and_deadlocks_tab_TS_68_CNDThreadAnalyzer.png
    9. Click on 'detail'
      'Thread Analysis Tool' tab appears.
    10. 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.
  2. Find actual deadlocks
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'actual_deadlock' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait about 5 seconds
      '1 deadlock detected details' text appears in this tab
    8. Click on 'detail'
      {{result|'Thread Analysis Tool' tab appears.
    9. 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.
  3. Find data races
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'race' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait about 5 seconds
      '2 dataraces detected details' text appears in this tab
    8. Click on 'detail'
      {{result|'Thread Analysis Tool' tab appears.
    9. 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.
  4. Find data races in Fortran project
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'race_fortran' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait about 5 seconds
      '2 dataraces detected details' text appears in this tab
    8. 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.
  5. Find data races in Source Based project
    1. Unpack the attached project (ThreadAnalyzerDemo2)
    2. Open project in NetBeans
    3. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    4. 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
    5. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    6. Wait about 5 seconds
      '2 dataraces detected details' text appears in this tab
    7. 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.
  6. Find potential deadlocks in Release mode
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'release' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears.
    7. Wait about 5 seconds
      '1 deadlock detected details' text appears in this tab
    8. 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.
  7. Find potential deadlocks on Solaris or Linux remote host
    1. Repeat 1st scenario from Windows, MacOS, Linux or Solaris on Solaris or Linux remote host
  8. Find data races on Solaris or Linux remote host
    1. Repeat 3rd scenario from Windows, MacOS, Linux or Solaris on Solaris or Linux remote host
  9. Check 'Resume Data Collection' button in 'Manually' mode
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'two_problems' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait 'Press ENTER to continue...' message in external terminal
    8. Press 'Resume Data Collection' button in 'Races and Deadlocks Detection' tab
    9. Press ENTER in external terminal
    10. Wait about 5 seconds
      '1 deadlock detected details' text appears in this tab
    11. 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.
  10. Check 'Pause Data Collection' button
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'two_problems' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait about 5 seconds
      '6 dataraces detected details' text appears in this tab
    8. Press 'Pause Data Collection' button in 'Races and Deadlocks Detection' tab
    9. Press ENTER in external terminal
    10. 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'.
  11. Check 'Stop Data Collection' button
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'two_problems' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait about 5 seconds
      '6 dataraces detected details' text appears in this tab
    8. Press 'Stop Data Collection' button in 'Races and Deadlocks Detection' tab
      Program is terminated
    9. Click on 'detail'
      {{result|'Thread Analysis Tool' tab appears.
    • EXPECTED RESULT: 6 dataraces are displayed in 'Thread Analysis Tool'.
  12. Check 'Deadlocks' mode (IDE ignores dataraces in this mode)
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'two_problems' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait about 10 seconds and press ENTER in external terminal
    8. Wait about 5 seconds
      '1 deadlock detected details' text appears in this tab
    9. 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.
  13. Check 'Thread usage' indicator
    1. Unpack the attached project (ThreadAnalyzerDemo)
    2. Open project in NetBeans
    3. Select 'potential_deadlock' project configuration on toolbar
    4. Click on 'Profile Project to find Races and/or Deadlocks' button on toolbar
      'Configure Profile' window appears
    5. 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
    6. Click on 'OK' button
      'Races and Deadlocks Detection' tab appears
    7. Wait about 5 seconds
      '1 deadlock detected details' text appears in this tab
    8. 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
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo