Home | History | Annotate | Download | only in doc
      1 Testcase 06
      2 -----------
      3 
      4 It's been found that sometimes onlining and offlining CPUs confuse some
      5 of the various system tools.  In particular, we found it caused top to
      6 crash, and found that sar wouldn't register newly available cpus that
      7 weren't there when it started.  This test case seeks to exercise these
      8 known error cases and verify that they behave correctly now.
      9 
     10 
     11 Algorithm - Top
     12 ===============
     13 Given a CPU to test that exists
     14 
     15 Make sure the specified cpu is online
     16 
     17 Loop until done:
     18   Start up top and give it a little time to run
     19 
     20   Offline the specified CPU
     21 
     22   Wait a little time for top to notice the CPU is gone
     23 
     24   Now check that top hasn't crashed by verifying its PID is still
     25   being reported by ps.
     26 
     27 When exiting:
     28   Kill the top process
     29   Restore all CPUs to their initial state
     30 
     31 
     32 Algorithm - Sar
     33 ===============
     34 Given a CPU to test that exists
     35 
     36 Make sure the specified cpu is offline
     37 
     38 Loop until done:
     39   Start up sar writing to a temp log and give it a little time to run
     40 
     41   Verify that SAR has correctly listed the missing CPU as 'nan' in its
     42   tmp log
     43 
     44   Take a timestamp and count how many CPUs sar is reporting to be
     45   offline
     46 
     47   Online the specified cpu
     48 
     49   Take another timestamp and another count of offlined CPUs.
     50 
     51   Verify that the number of CPUs offline has changed
     52 
     53 When exiting:
     54   Kill the sar process
     55 
     56 
     57