@@ -56,10 +56,12 @@ check_socwatch_module_loaded()
5656check_for_PC10_state ()
5757{
5858 pc10_count=$( awk ' /Package C-State Summary: Entry Counts/{f=1; next} f && /PC10/{print $3; exit}' " $socwatch_output " .csv)
59- if [ -z " $pc10_count " ]; then
60- die " PC10 State not achieved"
59+ if [ -z " $pc10_count " ] || [ " $pc10_count " -eq 0 ]; then
60+ dlogw " PC10 State not achieved"
61+ else
62+ dlogi " Entered into PC10 State $pc10_count times"
63+ pc10_achieved=true # PC10 state needs to be entered at least once to pass the test
6164 fi
62- dlogi " Entered into PC10 State $pc10_count times"
6365
6466 pc10_per=$( awk ' /Package C-State Summary: Residency/{f=1; next} f && /PC10/{print $3; exit}' " $socwatch_output " .csv)
6567 pc10_time=$( awk ' /Package C-State Summary: Residency/{f=1; next} f && /PC10/{print $5; exit}' " $socwatch_output " .csv)
@@ -87,8 +89,8 @@ socwatch_test_once()
8789 setup_kernel_check_point
8890
8991 ( set -x
90- sudo " $SOCWATCH_PATH " /socwatch -m -f sys -f cpu -f cpu-hw -f pcie -f hw-cpu-cstate \
91- -f pcd-slps0 -f tcss-state -f tcss -f pcie-lpm -n 200 -t " $duration " -s " $wait_time " \
92+ sudo " $SOCWATCH_PATH " /socwatch -m -f sys -f cpu -f cpu-hw -f hw-cpu-cstate \
93+ -f tcss-state -f pcie-lpm -n 200 -t " $duration " -s " $wait_time " \
9294 -r json -o " $socwatch_output " ) ||
9395 die " socwatch returned $? "
9496
@@ -145,6 +147,7 @@ run_socwatch_tests()
145147 mkdir " $LOG_ROOT /socwatch-results"
146148 pc10_results_file=" $LOG_ROOT /socwatch-results/pc10_results.json"
147149 touch " $pc10_results_file "
150+ pc10_achieved=false
148151
149152 for i in $( seq 1 " $loop_count " )
150153 do
@@ -162,6 +165,12 @@ run_socwatch_tests()
162165
163166 # unload socwatch module
164167 sudo bash " $SOCWATCH_PATH " /drivers/rmmod-socwatch
168+
169+ if " $pc10_achieved " ; then
170+ dlogi " PASS: PC10 state entered at least once"
171+ else
172+ die " FAIL: PC10 state NOT ENTERED"
173+ fi
165174}
166175
167176main ()
0 commit comments