1Testcase 03 2----------- 3 4This test verifies that when you online a new CPU, that the scheduler 5takes advantage of it by shifting some of its workloads onto it. We do 6this by offlining a CPU, creating a bunch of processor intensive 7processes, and then onlining the CPU, and checking to make sure at least 8one of the processes moved to that CPU. 9 10 11Algorithm 12========= 13Given a CPU to test that exists 14 15Take a snapshot of what CPUs are on and off initially 16 17Loop until done: 18 Online all of the CPUs and note their state 19 20 Offline the specified CPU 21 22 Start up a number of processes equal to twice the number of CPUs we 23 have, so we can be pretty sure that we've got enough processes that at 24 least one will migrate to the new CPU. 25 26 Now online the specified CPU 27 28 Wait a few seconds, to allow the process scheduler to move processes 29 around a bit. 30 31 Verify that at least one process has migrated to the new CPU by 32 looking at the output from 'ps -o psr -o com' and searching for our 33 CPU running the process. 34 35 36When exiting: 37 Kill all of the load processes 38 39 Restore all CPUs to their initial state 40