• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Testcase 06
2-----------
3
4It's been found that sometimes onlining and offlining CPUs confuse some
5of the various system tools.  In particular, we found it caused top to
6crash, and found that sar wouldn't register newly available cpus that
7weren't there when it started.  This test case seeks to exercise these
8known error cases and verify that they behave correctly now.
9
10
11Algorithm - Top
12===============
13Given a CPU to test that exists
14
15Make sure the specified cpu is online
16
17Loop 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
27When exiting:
28  Kill the top process
29  Restore all CPUs to their initial state
30
31
32Algorithm - Sar
33===============
34Given a CPU to test that exists
35
36Make sure the specified cpu is offline
37
38Loop 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
53When exiting:
54  Kill the sar process
55
56
57