File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -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)
@@ -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 ()
You can’t perform that action at this time.
0 commit comments