|
| 1 | +*** Settings *** |
| 2 | +Resource ./common.resource |
| 3 | + |
| 4 | +Suite Setup Run Keywords |
| 5 | +... Prepare Test Suite |
| 6 | +... AND Check Power Supply |
| 7 | +... AND Prepare Sensors |
| 8 | +... AND Init Concurrent Testing |
| 9 | +... AND Prepare CPT |
| 10 | +... AND Prepare CPF |
| 11 | +... AND Prepare STB |
| 12 | +... AND Print Concurrent Tests Summary |
| 13 | + |
| 14 | +*** Test Cases *** |
| 15 | +############################################ |
| 16 | +# Tests that can be done immediately # |
| 17 | +############################################ |
| 18 | +_CONCURRENT_Background Measurements Immediate (no load) (Fedora) |
| 19 | + # immediately skip if no tests want these measurements |
| 20 | + ${will_any_be_run}= Check Concurrent Test Supported Regex |
| 21 | + ... (CPF001)|(STB002).202 |
| 22 | + Skip If not ${will_any_be_run} No test depends on this step |
| 23 | + |
| 24 | + Power On |
| 25 | + Boot System Or From Connected Disk ${ENV_ID_FEDORA} |
| 26 | + Login To Linux |
| 27 | + Switch To Root User |
| 28 | + |
| 29 | + # CPF001.202 steps |
| 30 | + VAR ${concurrent_test_id}= CPF001.202 |
| 31 | + ${check_frequency}= Check Concurrent Test Supported ${concurrent_test_id} |
| 32 | + IF ${check_frequency} |
| 33 | + Sleep 10s |
| 34 | + @{frequencies}= Get CPU Frequencies In Linux |
| 35 | + Set Concurrent Test Outputs ${concurrent_test_id} ${frequencies} |
| 36 | + END |
| 37 | + |
| 38 | + # STB002.202 steps |
| 39 | + VAR ${concurrent_test_id}= STB002.202 |
| 40 | + ${check_logs}= Check Concurrent Test Supported ${concurrent_test_id} |
| 41 | + IF ${check_logs} |
| 42 | + ${dmesg_err_txt}= Execute Linux Command dmesg -t -l err,crit,alert,emerg |
| 43 | + Set Concurrent Test Outputs ${concurrent_test_id} ${dmesg_err_txt} |
| 44 | + END |
| 45 | + |
| 46 | +CPF001.202 CPU not stuck on initial frequency (Fedora) |
| 47 | + [Documentation] This test aims to verify whether the mounted CPU does not |
| 48 | + ... stuck on the initial frequency after booting into the OS. |
| 49 | + ... Previous IDs: CPF001.001 |
| 50 | + VAR ${concurrent_test_id}= CPF001.202 |
| 51 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 52 | + ${outs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 53 | + Check CPU Frequencies Not Stuck ${outs} |
| 54 | + |
| 55 | +CPF002.202 CPU not stuck on initial frequency (Battery) (Fedora) |
| 56 | + [Documentation] This test aims to verify whether the mounted CPU does not |
| 57 | + ... stuck on the initial frequency after booting into the OS. |
| 58 | + ... Previous IDs: CPF001.001 |
| 59 | + VAR ${concurrent_test_id}= CPF002.202 |
| 60 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 61 | + ${outs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 62 | + Check CPU Frequencies Not Stuck ${outs} |
| 63 | + |
| 64 | +CPF003.202 CPU not stuck on initial frequency (AC) (Fedora) |
| 65 | + [Documentation] This test aims to verify whether the mounted CPU does not |
| 66 | + ... stuck on the initial frequency after booting into the OS. |
| 67 | + ... Previous IDs: CPF001.001 |
| 68 | + VAR ${concurrent_test_id}= CPF003.202 |
| 69 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 70 | + ${outs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 71 | + Check CPU Frequencies Not Stuck ${outs} |
| 72 | + |
| 73 | +CPF004.202 CPU not stuck on initial frequency (USB-PD) (Fedora) |
| 74 | + [Documentation] This test aims to verify whether the mounted CPU does not |
| 75 | + ... stuck on the initial frequency after booting into the OS. |
| 76 | + ... Previous IDs: CPF001.001 |
| 77 | + VAR ${concurrent_test_id}= CPF004.202 |
| 78 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 79 | + ${outs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 80 | + Check CPU Frequencies Not Stuck ${outs} |
| 81 | + |
| 82 | +STB002.202 Verify if no unexpected boot errors appear in Linux logs |
| 83 | + [Documentation] This test aims to verify that there are no unexpected |
| 84 | + ... error ,essages in Linux kernel logs. |
| 85 | + ... Previous IDs: STB002.001 |
| 86 | + VAR ${concurrent_test_id}= STB001.202 |
| 87 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 88 | + ${outs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 89 | + Check Unexpected Boot Errors ${outs} |
| 90 | + |
| 91 | +############################################################################# |
| 92 | +# Tests that gather measurements on Fedora, no load, n/a power source # |
| 93 | +############################################################################# |
| 94 | + |
| 95 | +_CONCURRENT_Background Measurements (no load) (Fedora) |
| 96 | + ${gather_temps}= Will Concurrent Test Be Run CPT001.202 |
| 97 | + ${gather_freqs}= Will Concurrent Test Be Run CPF005.202 |
| 98 | + ${gather_stab}= Will Concurrent Test Be Run STB001.202 |
| 99 | + Skip If not (${gather_temps} or ${gather_freqs} or ${gather_stab}) No test depends on this step |
| 100 | + |
| 101 | + Power On |
| 102 | + Boot System Or From Connected Disk ${ENV_ID_FEDORA} |
| 103 | + Login To Linux |
| 104 | + Switch To Root User |
| 105 | + |
| 106 | + ${gather_temps}= Evaluate "CPT001.202" if ${gather_temps} else ${None} |
| 107 | + ${gather_freqs}= Evaluate "CPF005.202" if ${gather_freqs} else ${None} |
| 108 | + ${gather_stab}= Evaluate "STB001.202" if ${gather_stab} else ${None} |
| 109 | + |
| 110 | + Background Measurements |
| 111 | + ... id_temp=${gather_temps} id_freq=${gather_freqs} id_stab=${gather_stab} |
| 112 | + |
| 113 | +CPT001.202 CPU temperature without load (Fedora) |
| 114 | + [Documentation] This test aims to verify whether the temperature of CPU |
| 115 | + ... cores after system booting is not higher than the maximum |
| 116 | + ... allowed temperature. |
| 117 | + ... Previous IDs: CPT001.001 |
| 118 | + VAR ${concurrent_test_id}= CPT001.202 |
| 119 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 120 | + ${temps}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 121 | + Check CPU Temps ${temps} |
| 122 | + |
| 123 | +CPT002.202 CPU temperature without load (Battery) (Fedora) |
| 124 | + [Documentation] This test aims to verify whether the temperature of CPU |
| 125 | + ... cores after system booting is not higher than the maximum |
| 126 | + ... allowed temperature. |
| 127 | + ... Previous IDs: CPT001.001 |
| 128 | + VAR ${concurrent_test_id}= CPT002.202 |
| 129 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 130 | + ${temps}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 131 | + Check CPU Temps ${temps} |
| 132 | + |
| 133 | +CPT003.202 CPU temperature without load (AC) (Fedora) |
| 134 | + [Documentation] This test aims to verify whether the temperature of CPU |
| 135 | + ... cores after system booting is not higher than the maximum |
| 136 | + ... allowed temperature. |
| 137 | + ... Previous IDs: CPT001.001 |
| 138 | + VAR ${concurrent_test_id}= CPT003.202 |
| 139 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 140 | + ${temps}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 141 | + Check CPU Temps ${temps} |
| 142 | + |
| 143 | +CPT004.202 CPU temperature without load (USB-PD) (Fedora) |
| 144 | + [Documentation] This test aims to verify whether the temperature of CPU |
| 145 | + ... cores after system booting is not higher than the maximum |
| 146 | + ... allowed temperature. |
| 147 | + ... Previous IDs: CPT001.001 |
| 148 | + VAR ${concurrent_test_id}= CPT004.202 |
| 149 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 150 | + ${temps}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 151 | + Check CPU Temps ${temps} |
| 152 | + |
| 153 | +CPF005.202 CPU runs on expected frequency (Fedora) |
| 154 | + [Documentation] This test aims to verify whether the mounted CPU is |
| 155 | + ... running on expected frequency. |
| 156 | + ... Previous IDs: CPF002.001 |
| 157 | + VAR ${concurrent_test_id}= CPF005.202 |
| 158 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 159 | + ${freqs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 160 | + Check CPU Freqs Linux ${freqs} |
| 161 | + |
| 162 | +CPF006.202 CPU runs on expected frequency (Battery) (Fedora) |
| 163 | + [Documentation] This test aims to verify whether the mounted CPU is |
| 164 | + ... running on expected frequency. |
| 165 | + ... Previous IDs: CPF002.001 |
| 166 | + VAR ${concurrent_test_id}= CPF006.202 |
| 167 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 168 | + ${freqs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 169 | + Check CPU Freqs Linux ${freqs} |
| 170 | + |
| 171 | +CPF007.202 CPU runs on expected frequency (AC) (Fedora) |
| 172 | + [Documentation] This test aims to verify whether the mounted CPU is |
| 173 | + ... running on expected frequency. |
| 174 | + ... Previous IDs: CPF002.001 |
| 175 | + VAR ${concurrent_test_id}= CPF007.202 |
| 176 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 177 | + ${freqs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 178 | + Check CPU Freqs Linux ${freqs} |
| 179 | + |
| 180 | +CPF008.202 CPU runs on expected frequency (USB-PD) (Fedora) |
| 181 | + [Documentation] This test aims to verify whether the mounted CPU is |
| 182 | + ... running on expected frequency. |
| 183 | + ... Previous IDs: CPF002.001 |
| 184 | + VAR ${concurrent_test_id}= CPF008.202 |
| 185 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 186 | + ${freqs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 187 | + Check CPU Freqs Linux ${freqs} |
| 188 | + |
| 189 | +STB001.202 Verify if no reboot occurs in the OS (Fedora) |
| 190 | + [Documentation] This test aims to verify that the DUT booted to the |
| 191 | + ... Operating System does not reset. The test is performed in multiple |
| 192 | + ... iterations - after a defined time an attempt to read the output of |
| 193 | + ... specific commands confirming the stability of work is repeated. |
| 194 | + ... Previous IDs: STB001.002 |
| 195 | + VAR ${concurrent_test_id}= STB001.202 |
| 196 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 197 | + ${measurements}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 198 | + Check Platform Stability ${measurements} |
| 199 | + |
| 200 | +############################################################################# |
| 201 | +# Tests that gather measurements on Fedora, load, n/a power source # |
| 202 | +############################################################################# |
| 203 | + |
| 204 | +_CONCURRENT_Background Measurements (load) (Fedora) |
| 205 | + ${gather_temps}= Will Concurrent Test Be Run CPT005.202 |
| 206 | + ${gather_freqs}= Will Concurrent Test Be Run CPF009.202 |
| 207 | + ${gather_stab}= Will Concurrent Test Be Run STB001.202 |
| 208 | + Skip If not (${gather_temps} or ${gather_freqs} or ${gather_stab}) No test depends on this step |
| 209 | + |
| 210 | + Power On |
| 211 | + Boot System Or From Connected Disk ${ENV_ID_FEDORA} |
| 212 | + Login To Linux |
| 213 | + Switch To Root User |
| 214 | + |
| 215 | + ${gather_temps}= Evaluate "CPT005.202" if ${gather_temps} else ${None} |
| 216 | + ${gather_freqs}= Evaluate "CPF009.202" if ${gather_freqs} else ${None} |
| 217 | + ${gather_stab}= Evaluate "STB001.202" if ${gather_stab} else ${None} |
| 218 | + |
| 219 | + # Start CPU Stress |
| 220 | + ${stress_duration}= Evaluate |
| 221 | + ... max(${TEMPERATURE_TEST_DURATION}, ${FREQUENCY_TEST_DURATION}, ${STABILITY_TEST_DURATION}) |
| 222 | + Stress Test ${stress_duration}s |
| 223 | + Background Measurements |
| 224 | + ... id_temp=${gather_temps} id_freq=${gather_freqs} id_stab=${gather_stab} |
| 225 | + # Make sure to stop any CPU stress after we end |
| 226 | + Execute Command In Terminal pkill stress-ng |
| 227 | + |
| 228 | +CPT005.202 CPU temperature after stress test (Fedora) |
| 229 | + [Documentation] This test aims to verify whether the temperature of the |
| 230 | + ... CPU cores is not higher than the maximum allowed |
| 231 | + ... temperature during stress test. |
| 232 | + ... Previous IDs: CPT002.001 |
| 233 | + VAR ${concurrent_test_id}= CPT001.202 |
| 234 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 235 | + ${temps}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 236 | + Check CPU Temps ${temps} |
| 237 | + |
| 238 | +CPF009.202 CPU with load runs on expected frequency (Fedora) |
| 239 | + [Documentation] This test aims to verify whether the mounted CPU is |
| 240 | + ... running on expected frequency after stress test. |
| 241 | + ... Previous IDs: CPF004.001 |
| 242 | + VAR ${concurrent_test_id}= CPF005.202 |
| 243 | + Skip If Concurrent Test Not Supported ${concurrent_test_id} |
| 244 | + ${freqs}= Get Concurrent Test Outputs ${concurrent_test_id} |
| 245 | + Check CPU Freqs Linux ${freqs} |
| 246 | + |
| 247 | +*** Keywords *** |
| 248 | +Prepare STB |
| 249 | + [Documentation] Setup STB concurrent test contexts |
| 250 | + # Stability check |
| 251 | + Add Concurrent Test Skip Condition |
| 252 | + ... STB001.202 |
| 253 | + ... not ${PLATFORM_STABILITY_CHECKING} |
| 254 | + ... Stability checking not supported |
| 255 | + Add Concurrent Test Skip Condition |
| 256 | + ... STB001.202 |
| 257 | + ... '${ENV_ID_FEDORA}' not in ${TESTED_LINUX_DISTROS} |
| 258 | + ... Fedora not in tested distros |
| 259 | + # Linux dmesg check |
| 260 | + Add Concurrent Test Skip Condition |
| 261 | + ... STB002.202 |
| 262 | + ... not ${PLATFORM_STABILITY_CHECKING} |
| 263 | + ... Stability checking not supported |
| 264 | + Add Concurrent Test Skip Condition |
| 265 | + ... STB002.202 |
| 266 | + ... '${ENV_ID_FEDORA}' not in ${TESTED_LINUX_DISTROS} |
| 267 | + ... Fedora not in tested distros |
| 268 | + |
| 269 | +Prepare CPF |
| 270 | + [Documentation] Setup CPF concurrent test contexts |
| 271 | + IF not ${LAPTOP_PLATFORM} |
| 272 | + VAR ${CPF_STUCK_ID}= CPF001 scope=SUITE |
| 273 | + VAR ${CPF_NO_LOAD_ID}= CPF005 scope=SUITE |
| 274 | + VAR ${CPF_LOAD_ID}= CPF009 scope=SUITE |
| 275 | + ELSE IF ${BATTERY_PRESENT} |
| 276 | + VAR ${CPF_STUCK_ID}= CPF002 scope=SUITE |
| 277 | + VAR ${CPF_NO_LOAD_ID}= CPF006 scope=SUITE |
| 278 | + VAR ${CPF_LOAD_ID}= CPF010 scope=SUITE |
| 279 | + ELSE IF ${AC_CONNECTED} |
| 280 | + VAR ${CPF_STUCK_ID}= CPF003 scope=SUITE |
| 281 | + VAR ${CPF_NO_LOAD_ID}= CPF007 scope=SUITE |
| 282 | + VAR ${CPF_LOAD_ID}= CPF011 scope=SUITE |
| 283 | + ELSE IF ${USB_PD_CONNECTED} |
| 284 | + VAR ${CPF_STUCK_ID}= CPF004 scope=SUITE |
| 285 | + VAR ${CPF_NO_LOAD_ID}= CPF008 scope=SUITE |
| 286 | + VAR ${CPF_LOAD_ID}= CPF012 scope=SUITE |
| 287 | + END |
| 288 | + # Not Stuck Fedora |
| 289 | + Add Concurrent Test Skip Condition |
| 290 | + ... ${CPF_STUCK_ID}.202 |
| 291 | + ... not ${CPU_FREQUENCY_MEASURE} |
| 292 | + ... frequency measure not supported |
| 293 | + Add Concurrent Test Skip Condition |
| 294 | + ... ${CPF_STUCK_ID}.202 |
| 295 | + ... '201' not in ${TESTED_LINUX_DISTROS} |
| 296 | + ... Fedora not in tested distros |
| 297 | + # No load Fedora |
| 298 | + Add Concurrent Test Skip Condition |
| 299 | + ... ${CPF_NO_LOAD_ID}.202 |
| 300 | + ... not ${CPU_FREQUENCY_MEASURE} |
| 301 | + ... frequency measure not supported |
| 302 | + Add Concurrent Test Skip Condition |
| 303 | + ... ${CPF_NO_LOAD_ID}.202 |
| 304 | + ... '201' not in ${TESTED_LINUX_DISTROS} |
| 305 | + ... Fedora not in tested distros |
| 306 | + # Load Fedora |
| 307 | + Add Concurrent Test Skip Condition |
| 308 | + ... ${CPF_LOAD_ID}.202 |
| 309 | + ... not ${CPU_FREQUENCY_MEASURE} |
| 310 | + ... frequency measure not supported |
| 311 | + Add Concurrent Test Skip Condition |
| 312 | + ... ${CPF_LOAD_ID}.202 |
| 313 | + ... '201' not in ${TESTED_LINUX_DISTROS} |
| 314 | + ... Fedora not in tested distros |
| 315 | + |
| 316 | +Prepare CPT |
| 317 | + [Documentation] Setup CPT concurrent test contexts |
| 318 | + IF not ${LAPTOP_PLATFORM} |
| 319 | + VAR ${CPT_NO_LOAD_ID}= CPT001 scope=SUITE |
| 320 | + VAR ${CPF_LOAD_ID}= CPT005 scope=SUITE |
| 321 | + ELSE IF ${BATTERY_PRESENT} |
| 322 | + VAR ${CPT_NO_LOAD_ID}= CPT002 scope=SUITE |
| 323 | + VAR ${CPF_LOAD_ID}= CPT006 scope=SUITE |
| 324 | + ELSE IF ${AC_CONNECTED} |
| 325 | + VAR ${CPT_NO_LOAD_ID}= CPT003 scope=SUITE |
| 326 | + VAR ${CPF_LOAD_ID}= CPT007 scope=SUITE |
| 327 | + ELSE IF ${USB_PD_CONNECTED} |
| 328 | + VAR ${CPT_NO_LOAD_ID}= CPT004 scope=SUITE |
| 329 | + VAR ${CPF_LOAD_ID}= CPT008 scope=SUITE |
| 330 | + END |
| 331 | + |
| 332 | + # No load Fedora |
| 333 | + Add Concurrent Test Skip Condition |
| 334 | + ... ${CPT_NO_LOAD_ID}.202 |
| 335 | + ... '${ENV_ID_FEDORA}' not in ${TESTED_LINUX_DISTROS} |
| 336 | + ... Fedora not in tested distros |
| 337 | + # Load Fedora |
| 338 | + Add Concurrent Test Skip Condition ${CPF_LOAD_ID}.202 |
| 339 | + ... '${ENV_ID_FEDORA}' not in ${TESTED_LINUX_DISTROS} |
| 340 | + ... Fedora not in tested distros |
0 commit comments