Skip to content

Commit fbe422f

Browse files
committed
VP2420 performance and stability test fixes
Signed-off-by: Filip Lewiński <[email protected]>
1 parent f44da35 commit fbe422f

File tree

4 files changed

+27
-21
lines changed

4 files changed

+27
-21
lines changed

dasharo-performance/cpu-frequency.robot

+4-8
Original file line numberDiff line numberDiff line change
@@ -336,18 +336,16 @@ CPU Runs On Expected Frequency (Ubuntu 22.04)
336336
Boot System Or From Connected Disk ubuntu
337337
Login To Linux
338338
Switch To Root User
339-
${freq_max}= Get CPU Frequency MAX
340-
${freq_min}= Get CPU Frequency MIN
341339
${timer}= Convert To Integer 0
342340
FOR ${i} IN RANGE (${FREQUENCY_TEST_DURATION} / ${FREQUENCY_TEST_MEASURE_INTERVAL})
343341
Log To Console \n ----------------------------------------------------------------
344342
Log To Console ${timer} min.
345343
@{frequencies}= Get CPU Frequencies In Ubuntu
346344
FOR ${frequency} IN @{frequencies}
347345
Run Keyword And Continue On Failure
348-
... Should Be True ${freq_max} >= ${frequency}
346+
... Should Be True ${CPU_MAX_FREQUENCY} >= ${frequency}
349347
Run Keyword And Continue On Failure
350-
... Should Be True ${freq_min} <= ${frequency}
348+
... Should Be True ${CPU_MIN_FREQUENCY} <= ${frequency}
351349
END
352350
Sleep ${FREQUENCY_TEST_MEASURE_INTERVAL}m
353351
${timer}= Evaluate ${timer} + ${FREQUENCY_TEST_MEASURE_INTERVAL}
@@ -370,8 +368,6 @@ CPU With Load Runs On Expected Frequency (Ubuntu 22.04)
370368
Boot System Or From Connected Disk ubuntu
371369
Login To Linux
372370
Switch To Root User
373-
${freq_max}= Get CPU Frequency MAX
374-
${freq_min}= Get CPU Frequency MIN
375371
Stress Test ${FREQUENCY_TEST_DURATION}m
376372
${timer}= Convert To Integer 0
377373
FOR ${i} IN RANGE (${FREQUENCY_TEST_DURATION} / ${FREQUENCY_TEST_MEASURE_INTERVAL})
@@ -380,9 +376,9 @@ CPU With Load Runs On Expected Frequency (Ubuntu 22.04)
380376
@{frequencies}= Get CPU Frequencies In Ubuntu
381377
FOR ${frequency} IN @{frequencies}
382378
Run Keyword And Continue On Failure
383-
... Should Be True ${freq_max} >= ${frequency}
379+
... Should Be True ${CPU_MAX_FREQUENCY} >= ${frequency}
384380
Run Keyword And Continue On Failure
385-
... Should Be True ${freq_min} <= ${frequency}
381+
... Should Be True ${CPU_MIN_FREQUENCY} <= ${frequency}
386382
END
387383
Sleep ${FREQUENCY_TEST_MEASURE_INTERVAL}m
388384
${timer}= Evaluate ${timer} + ${FREQUENCY_TEST_MEASURE_INTERVAL}

dasharo-performance/platform-stability.robot

+17-6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ STB001.001 Verify if no reboot occurs in the firmware
3333
... does not reset. The test is performed in multiple iterations - after
3434
... a defined time an attempt to read the same menu is repeated.
3535
Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} STB001.001 not supported
36+
Skip
3637
Power On
3738
${boot_menu}= Enter Boot Menu Tianocore And Return Construction
3839
Enter Submenu From Snapshot ${boot_menu} UEFI Shell
@@ -60,18 +61,20 @@ STB001.002 Verify if no reboot occurs in the OS (Ubuntu 22.04)
6061
... iterations - after a defined time an attempt to read the output of
6162
... specific commands confirming the stability of work is repeated.
6263
Skip If not ${TESTS_IN_UBUNTU_SUPPORT} STB001.002 not supported
64+
6365
Power On
64-
Boot Operating System ubuntu
66+
Boot System Or From Connected Disk ubuntu
6567
Login To Linux
6668
Switch To Root User
6769
${timer}= Convert To Integer 0
6870
Set Local Variable ${device_uptime} 0
6971
FOR ${i} IN RANGE (${STABILITY_TEST_DURATION} / ${STABILITY_TEST_MEASURE_INTERVAL}) + 1
7072
Log To Console \n ----------------------------------------------------------------
7173
Log To Console ${timer} min.
72-
${uptime_output}= Execute Command In Terminal uptime -p
7374
${network_status}= Execute Command In Terminal ip link | grep -E 'enp'
74-
${current_uptime}= Convert To Integer ${uptime_output.split()[1]}
75+
${uptime_output}= Execute Command In Terminal cat /proc/uptime
76+
${uptime_list}= Split String ${uptime_output} ${SPACE}
77+
${current_uptime}= Convert To Number ${uptime_list}[0]
7578
IF ${current_uptime} >= ${device_uptime}
7679
Set Local Variable ${device_uptime} ${current_uptime}
7780
ELSE
@@ -89,6 +92,7 @@ STB001.003 Verify if no reboot occurs in the OS (Windows 11)
8992
... specific commands confirming the stability of work is repeated.
9093
Skip If not ${TESTS_IN_WINDOWS_SUPPORT} STB001.002 not supported
9194
Power On
95+
Skip
9296
Login To Windows
9397
${timer}= Convert To Integer 0
9498
Set Local Variable ${device_uptime} 0
@@ -97,8 +101,14 @@ STB001.003 Verify if no reboot occurs in the OS (Windows 11)
97101
Log To Console ${timer} min.
98102
${uptime_output}= Execute Command In Terminal (get-date) - (gcim Win32_OperatingSystem).LastBootUpTime
99103
${network_status}= Execute Command In Terminal Get-NetAdapter -Name "Ethernet*"
100-
${current_uptime}= Convert To Number ${uptime_output.split()[26]}
101-
${current_uptime}= Convert To Integer ${current_uptime}
104+
105+
${total_seconds_line}= Get Lines Matching Regexp ${uptime_output} .*TotalSeconds.*
106+
@{line_parts}= Split String ${total_seconds_line} :
107+
${total_seconds}= Set Variable ${line_parts[1]}
108+
${total_seconds}= Strip String ${total_seconds}
109+
${total_seconds}= Convert To Number ${total_seconds}
110+
${current_uptime}= Set Variable ${total_seconds}
111+
102112
IF ${current_uptime} >= ${device_uptime}
103113
Set Local Variable ${device_uptime} ${current_uptime}
104114
ELSE
@@ -113,8 +123,9 @@ STB002.001 Verify if no unexpected boot errors appear in Linux logs
113123
[Documentation] This test aims to verify that there are no unexpected
114124
... error ,essages in Linux kernel logs.
115125
Skip If not ${PLATFORM_STABILITY_CHECKING} STB002.001 not supported
126+
116127
Power On
117-
Boot Operating System ubuntu
128+
Boot System Or From Connected Disk ubuntu
118129
Login To Linux
119130
Switch To Root User
120131
Check Unexpected Boot Errors

lib/CPU-performance-lib.robot

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Get CPU Frequency MAX
77
${freq}= Split String ${freq} separator=,
88
${freq}= Get From List ${freq} 0
99
${freq}= Convert To Number ${freq}
10+
${freq}= Evaluate ${freq}+100
1011
RETURN ${freq}
1112

1213
Get CPU Frequency MIN
@@ -17,6 +18,7 @@ Get CPU Frequency MIN
1718
${freq}= Split String ${freq} separator=,
1819
${freq}= Get From List ${freq} 0
1920
${freq}= Convert To Number ${freq}
21+
${freq}= Evaluate ${freq}-100
2022
RETURN ${freq}
2123

2224
Get CPU Temperature CURRENT
@@ -74,15 +76,13 @@ Check If CPU Not Stuck On Initial Frequency In Windows
7476
Check CPU Frequency In Windows
7577
[Documentation] Check that CPU is running on expected frequency.
7678
${freq_max_info}= Execute Command In Terminal (Get-CimInstance CIM_Processor).MaxClockSpeed
77-
${freq_max}= Get Line ${freq_max_info} -1
78-
${freq_max}= Convert To Number ${freq_max}
7979
FOR ${number} IN RANGE 0 10
8080
${freq_current_info}= Execute Command In Terminal
8181
... (Get-CimInstance CIM_Processor).MaxClockSpeed*((Get-Counter -Counter "\\Processor Information(_Total)\\% Processor Performance").CounterSamples.CookedValue)/100
8282
${freq_current}= Get Line ${freq_current_info} -1
8383
${freq_current}= Convert To Number ${freq_current}
8484
Run Keyword And Continue On Failure
85-
... Should Be True ${freq_max} >= ${freq_current}
85+
... Should Be True ${CPU_MAX_FREQUENCY} >= ${freq_current}
8686
END
8787

8888
Stress Test

platform-configs/protectli-vp2420.robot

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ ${DMIDECODE_VENDOR}= 3mdeb
2525
${DMIDECODE_FAMILY}= N/A
2626
${DMIDECODE_TYPE}= N/A
2727

28-
${PLATFORM_CPU_SPEED}= 2.00
29-
${PLATFORM_RAM_SPEED}= 2933
30-
${PLATFORM_RAM_SIZE}= 8192
28+
${CPU_MAX_FREQUENCY}= 2700
29+
${CPU_MIN_FREQUENCY}= 300
3130

3231
${WATCHDOG_SUPPORT}= ${TRUE}
3332

@@ -54,7 +53,7 @@ Flash Protectli VP2420 Internal
5453
Switch To Root User
5554
Get Flashrom From Cloud
5655
Send File To DUT ${FW_FILE} /tmp/dasharo.rom
57-
Flash Via Internal Programmer /tmp/dasharo.rom
56+
Flash Via Internal Programmer /tmp/dasharo.rom "bios"
5857

5958
Flash Protectli VP2420 External
6059
[Documentation] Flash Device Under Test firmware, check flashing result

0 commit comments

Comments
 (0)