Just for the record, I think the test script needs some more bullet-proofing.
1. The echos to /sys/devices/system/cpu/$cpu_num/online should be followed by checks afterwards to make sure EINVAL errors aren't returned by the kernel. Just a simple bit of sanity checking can't harm.
2. It is worth reading out the state from /sys/devices/system/cpu/$cpu_num/online to ensure it contains what was written for a sanity check.
Just for the record, I think the test script needs some more bullet-proofing.
1. The echos to /sys/devices/ system/ cpu/$cpu_ num/online should be followed by checks afterwards to make sure EINVAL errors aren't returned by the kernel. Just a simple bit of sanity checking can't harm.
2. It is worth reading out the state from /sys/devices/ system/ cpu/$cpu_ num/online to ensure it contains what was written for a sanity check.