hotplug/cpu_hotplug05.sh: Fix obsolete output of offline CPU
PATCH 1/1 hotplug/cpu_hotplug05.sh: Fix obsolete output of offline CPU
With sysstat-11.7.1, running cpu_hotplug05.sh got the following error:
---------------------------------------------------------------------
cpuhotplug05 1 TBROK: Field 3 is '%user', '0.00' expected
---------------------------------------------------------------------
According to commit 970cae1 and 1f71a6f, sar/sadf didn't display offline CPU since sysstat-11.7.1. It is reasonable for offline CPU to getting nothing.
--- .../hotplug/cpu_hotplug/functional/cpuhotplug05.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh +12 -6
@@ -108,12 +108,18 @@ until [ $LOOP_COUNT -gt $HOTPLUG05_LOOPS ]; do tst_brkm TBROK "SAR output file is empty" fi - for i in $(seq 3 8); do - field=$(get_field "$offline_status" "$i") - if [ "$field" != "0.00" ]; then - tst_brkm TBROK "Field $i is '$field', '0.00' expected" - fi - done + cpu_field=$(get_field "$offline_status" "2") + if [ "${cpu_field}" = "CPU" ]; then + # Since sysstat-11.7.1, sar/sadf didn't display offline CPU + tst_resm TINFO "SAR didn't display offline CPU" + else + for i in $(seq 3 8); do + field=$(get_field "$offline_status" "$i") + if [ "$field" != "0.00" ]; then + tst_brkm TBROK "Field $i is '$field', '0.00' expected" + fi + done + fi # Online the CPU if ! online_cpu ${CPU_TO_TEST}; then
Signature · 1 line
1.8.3.1
PATCH 1/1 hotplug/cpu_hotplug05.sh: Fix obsolete output of offline CPU
Hi,
Sorry, some typos in this patch, and i will resend it. :-(
Thanks,
Xiao Yang
Quoted 43 lines · Xiao Yang
With sysstat-11.7.1, running
cpu_hotplug05.shgot the following error:
---------------------------------------------------------------------
cpuhotplug05 1 TBROK: Field 3 is '%user', '0.00' expected
---------------------------------------------------------------------According to commit 970cae1 and 1f71a6f, sar/sadf didn't display offline CPU since sysstat-11.7.1. It is reasonable for offline CPU to getting nothing.
Signed-off-by Xiao Yang <[email protected]>--- .../hotplug/cpu_hotplug/functional/cpuhotplug05.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh +12
-6@@ -108,12 +108,18 @@ until [ $LOOP_COUNT -gt $HOTPLUG05_LOOPS ]; do tst_brkm TBROK "SAR output file is empty" fi - for i in $(seq 3 8); do - field=$(get_field "$offline_status" "$i") - if [ "$field" != "0.00" ]; then - tst_brkm TBROK "Field $i is '$field', '0.00' expected" - fi - done + cpu_field=$(get_field "$offline_status" "2") + if [ "${cpu_field}" = "CPU" ]; then + # Since sysstat-11.7.1, sar/sadf didn't display offline CPU + tst_resm TINFO "SAR didn't display offline CPU" + else + for i in $(seq 3 8); do + field=$(get_field "$offline_status" "$i") + if [ "$field" != "0.00" ]; then + tst_brkm TBROK "Field $i is '$field', '0.00' expected" + fi + done + fi # Online the CPU if ! online_cpu ${CPU_TO_TEST}; then