Skip to content

Odroid h4 ultra tests #881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions dasharo-compatibility/memory-ibecc.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
*** Settings ***
Library Collections
Library OperatingSystem
Library Process
Library String
Library Telnet timeout=20 seconds connection_timeout=120 seconds
Library SSHLibrary timeout=90 seconds
Library RequestsLibrary
# TODO: maybe have a single file to include if we need to include the same
# stuff in all test cases
Resource ../lib/bios/menus.robot
Resource ../variables.robot
Resource ../keywords.robot
Resource ../keys.robot

# TODO:
# - document which setup/teardown keywords to use and what are they doing
# - go through them and make sure they are doing what the name suggests (not
# exactly the case right now)
Suite Setup Run Keywords
... Prepare Test Suite
... AND
... Skip If not ${MEMORY_IBECC_SUPPORT} Memory IBECC tests not supported
# As a result of this suite, we might get stuck with bricked platform. Make sure
# to flash working firmware.
Suite Teardown Run Keywords
... Log Out And Close Connection


*** Test Cases ***
IBECC001.201 Verify IBECC does not work when disabled (Ubuntu)
[Documentation] EDAC driver in Linux will attempt to use IBECC.
... If IBECC is disabled an error will occur in dmesg.
Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} MPS001.001 not supported
Set IBECC State ${FALSE}
# Verify that IBECC causes error in dmesg
Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User
${out}= Execute Command In Terminal dmesg | grep -i 'edac'
Should Contain ${out} HANDLING IBECC MEMORY ERROR

IBECC002.201 Verify IBECC works when enabled (Ubuntu)
[Documentation] EDAC driver in Linux will attempt to use IBECC.
... If IBECC is enabled no error should occur in dmesg.
Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} MPS002.001 not supported
Set IBECC State ${TRUE}
# Verify that IBECC does not cause error in dmesg
Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User
${out}= Execute Command In Terminal dmesg | grep -i 'edac'
Should Not Contain ${out} HANDLING IBECC MEMORY ERROR
# Restore default IBECC state and let the memory be trained again
Set IBECC State ${FALSE}
Enter Setup Menu Tianocore


*** Keywords ***
Set IBECC State
[Arguments] ${target_state}
Power On
Enter Setup Menu Tianocore
${out}= Read From Terminal Until <Enter>=Select Entry
# Get IBECC state and change it if necessary
${setup_menu}= Parse Menu Snapshot Into Construction ${out} 3 1
${dasharo_menu}= Enter Dasharo System Features ${setup_menu}
${memory_menu}= Enter Dasharo Submenu ${dasharo_menu} Memory Configuration
${status}= Set Option State ${memory_menu} Memory In-Band ECC ${target_state}
Save Changes And Reset
# Changing IBECC state cause memory re-training
Telnet.Set Timeout 5 min
44 changes: 1 addition & 43 deletions dasharo-compatibility/network-speed.robot
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Library RequestsLibrary
Resource ../variables.robot
Resource ../keywords.robot
Resource ../keys.robot
Resource ../lib/performance/network.robot

# TODO:
# - document which setup/teardown keywords to use and what are they doing
Expand Down Expand Up @@ -90,46 +91,3 @@ ETHPERF002.201 Check Performance of 10G Wired Network Interface (Ubuntu)
${eth_2}= Get From List ${ETH_PERF_PAIR_10_G} 1
Configure Network Interfaces For Testing ${eth_1} ${eth_2}
Test Network Performance 9.35


*** Keywords ***
Test Network Performance
[Documentation] Tests network performance between two previously configured interfaces and compare with the given target bitrate
[Arguments] ${target_bitrate}
Execute Command In Terminal killall iperf3
Execute Command In Terminal ip netns exec ns_server iperf3 -s &
${out}= Execute Command In Terminal ip netns exec ns_client iperf3 -c 10.1.1.1
${bitrate}= Extract Bitrate From Iperf Log ${out}
Should Be True ${bitrate} >= ${target_bitrate}

Execute Command In Terminal killall iperf3
Execute Command In Terminal ip netns exec ns_client iperf3 -s &
${out}= Execute Command In Terminal ip netns exec ns_server iperf3 -c 10.1.1.2
${bitrate}= Extract Bitrate From Iperf Log ${out}
Should Be True ${bitrate} >= ${target_bitrate}

Execute Command In Terminal killall iperf3
Execute Command In Terminal ip netns del ns_server
Execute Command In Terminal ip netns del ns_client

Configure Network Interfaces For Testing
[Documentation] Configures network interfaces for iperf test
[Arguments] ${eth_1} ${eth_2}
Execute Command In Terminal ip link set ${eth_1} mtu 9000
Execute Command In Terminal ip link set ${eth_2} mtu 9000
Execute Command In Terminal ip netns add ns_server
Execute Command In Terminal ip netns add ns_client
Execute Command In Terminal ip link set ${eth_1} netns ns_server
Execute Command In Terminal ip link set ${eth_2} netns ns_client
Execute Command In Terminal ip netns exec ns_server ip addr add dev ${eth_1} 10.1.1.1/24
Execute Command In Terminal ip netns exec ns_client ip addr add dev ${eth_2} 10.1.1.2/24
Execute Command In Terminal ip netns exec ns_server ip link set dev ${eth_1} up
Execute Command In Terminal ip netns exec ns_client ip link set dev ${eth_2} up

Extract Bitrate From Iperf Log
[Documentation] Extracts average bitrate from iperf3 network performance test log
[Arguments] ${iperf_log}
${bitrate}= Get Regexp Matches ${iperf_log} .*GBytes\\s+(\\d+\\.\\d+)\\s+Gbits\\/sec.*sender 1
Should Not Be Empty ${bitrate}
Log The bitrate is: ${bitrate}[0]
RETURN ${bitrate}[0]
43 changes: 43 additions & 0 deletions dasharo-compatibility/odroid-netcard.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
*** Settings ***
Library Collections
Library Dialogs
Library OperatingSystem
Library Process
Library String
Library Telnet timeout=20 seconds connection_timeout=120 seconds
Library SSHLibrary timeout=90 seconds
Library RequestsLibrary
# TODO: maybe have a single file to include if we need to include the same
# stuff in all test cases
Resource ../variables.robot
Resource ../keywords.robot
Resource ../keys.robot
Resource ../lib/performance/network.robot

# TODO:
# - document which setup/teardown keywords to use and what are they doing
# - go threough them and make sure they are doing what the name suggest (not
# exactly the case right now)
Suite Setup Run Keyword
... Prepare Test Suite
Suite Teardown Run Keyword
... Log Out And Close Connection


*** Test Cases ***
NETCARD001.201 Check Performance of 2.5G Wired Network Interface On Netcard (Ubuntu)
[Documentation] This test aims to verify the performance of Ethernet connection
... on ODROID netcard
Skip If not ${ODROID_NETCARD_SUPPORT} ODROID Netcard tests not supported

Power On
Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User

Configure Network Interfaces For Testing enp4s0 enp5s0
Test Network Performance 2.35

# Test second pair of network ports on netcard
Configure Network Interfaces For Testing enp6s0 enp7s0
Test Network Performance 2.35
6 changes: 4 additions & 2 deletions dasharo-performance/fast-boot.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ FBT001.201 Fast Boot Reduces Boot Time
... fast boot enabled.
Skip If not ${TESTS_IN_UBUNTU_SUPPORT} PLB001.201 not supported
Log To Console \nMeasuring boot time with Fast Boot\n
Power On
Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User
Set Fast Boot State on
${fast_min} ${fast_max} ${fast_avg} ${fast_stddev}=
... Measure FW Boot Time On Linux ${ITERATIONS}

Log To Console \nMeasuring boot time without Fast Boot\n
Login To Linux
Switch To Root User
# We should still be in the OS as root after Measure FW Boot Time On Linux
Set Fast Boot State off
${slow_min} ${slow_max} ${slow_avg} ${slow_stddev}=
... Measure FW Boot Time On Linux ${ITERATIONS}
Expand Down Expand Up @@ -124,4 +125,5 @@ Initialize Fast Boot Suite
Prepare Test Suite
Skip If not ${FAST_AND_QUIET_BOOT_SUPPORT} Boot performance measurement tests not supported
Skip If not ${TESTS_IN_UBUNTU_SUPPORT} Boot performance measurement tests not supported
Power On
Set Selected OS As First In Boot Order Via Efibootmgr ${ENV_ID_UBUNTU}
57 changes: 57 additions & 0 deletions lib/performance/network.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
*** Settings ***
Library Collections
Library Dialogs
Library OperatingSystem
Library Process
Library String
Library Telnet timeout=20 seconds connection_timeout=120 seconds
Library SSHLibrary timeout=90 seconds
Library RequestsLibrary
# TODO: maybe have a single file to include if we need to include the same
# stuff in all test cases
Resource ../../variables.robot
Resource ../../keywords.robot
Resource ../../keys.robot


*** Keywords ***
Test Network Performance
[Documentation] Tests network performance between two previously configured interfaces and compare with the given target bitrate
[Arguments] ${target_bitrate}
Execute Command In Terminal killall iperf3
Execute Command In Terminal ip netns exec ns_server iperf3 -s &
${out}= Execute Command In Terminal ip netns exec ns_client iperf3 -c 10.1.1.1
${bitrate}= Extract Bitrate From Iperf Log ${out}
Should Be True ${bitrate} >= ${target_bitrate}

Execute Command In Terminal killall iperf3
Execute Command In Terminal ip netns exec ns_client iperf3 -s &
${out}= Execute Command In Terminal ip netns exec ns_server iperf3 -c 10.1.1.2
${bitrate}= Extract Bitrate From Iperf Log ${out}
Should Be True ${bitrate} >= ${target_bitrate}

Execute Command In Terminal killall iperf3
Execute Command In Terminal ip netns del ns_server
Execute Command In Terminal ip netns del ns_client

Configure Network Interfaces For Testing
[Documentation] Configures network interfaces for iperf test
[Arguments] ${eth_1} ${eth_2}
Execute Command In Terminal ip link set ${eth_1} mtu 9000
Execute Command In Terminal ip link set ${eth_2} mtu 9000
Execute Command In Terminal ip netns add ns_server
Execute Command In Terminal ip netns add ns_client
Execute Command In Terminal ip link set ${eth_1} netns ns_server
Execute Command In Terminal ip link set ${eth_2} netns ns_client
Execute Command In Terminal ip netns exec ns_server ip addr add dev ${eth_1} 10.1.1.1/24
Execute Command In Terminal ip netns exec ns_client ip addr add dev ${eth_2} 10.1.1.2/24
Execute Command In Terminal ip netns exec ns_server ip link set dev ${eth_1} up
Execute Command In Terminal ip netns exec ns_client ip link set dev ${eth_2} up

Extract Bitrate From Iperf Log
[Documentation] Extracts average bitrate from iperf3 network performance test log
[Arguments] ${iperf_log}
${bitrate}= Get Regexp Matches ${iperf_log} .*GBytes\\s+(\\d+\\.\\d+)\\s+Gbits\\/sec.*sender 1
Should Not Be Empty ${bitrate}
Log The bitrate is: ${bitrate}[0]
RETURN ${bitrate}[0]
17 changes: 10 additions & 7 deletions lib/sleep-lib.robot
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,19 @@ Perform Suspend Test Using FWTS
... test by using Firmware Test Suite tool
[Arguments] ${test_duration}=40
${is_suspend_performed_correctly}= Set Variable ${FALSE}
${test_time_out}= Set Variable ${${test_duration}-5}
IF '${DUT_CONNECTION_METHOD}' == 'Telnet'
Execute Command In Terminal fwts s3 -f -r /tmp/suspend_test_log.log ${test_time_out}s
ELSE
Write Into Terminal fwts s3 -f -r /tmp/suspend_test_log.log
Sleep ${test_duration}s
Read From Terminal
Write Into Terminal fwts s3 -f -r /tmp/suspend_test_log.log
Sleep ${test_duration}s
# Reconnect to OS if we use SSH
IF '${DUT_CONNECTION_METHOD}' == 'SSH'
Login To Linux
Switch To Root User
END
${test_result}= Execute Command In Terminal cat /tmp/suspend_test_log.log
# Clean up console before reading file
Read From Terminal
Write Bare Into Terminal ${ENTER}
Read From Terminal Until Prompt
${test_result}= Execute Linux Command cat /tmp/suspend_test_log.log
TRY
Should Contain ${test_result} 0 failed
Should Contain ${test_result} 0 warning
Expand Down
4 changes: 3 additions & 1 deletion platform-configs/include/default.robot
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ ${L2_CACHE_SUPPORT}= ${TRUE}
${L3_CACHE_SUPPORT}= ${FALSE}
${L4_CACHE_SUPPORT}= ${FALSE}
${MEMORY_PROFILE_SUPPORT}= ${FALSE}
${MEMORY_IBECC_SUPPORT}= ${FALSE}
${DEFAULT_POWER_STATE_AFTER_FAIL}= Powered Off
${ESP_SCANNING_SUPPORT}= ${FALSE}
${DTS_FIRMWARE_FLASHING_SUPPORT}= ${FALSE}
Expand All @@ -178,7 +179,8 @@ ${DCU_UUID_SUPPORT}= ${FALSE}
${DCU_SERIAL_SUPPORT}= ${FALSE}
${ROMHOLE_SUPPORT}= ${FALSE}
${IR_CAMERA_SUPPORT}= ${FALSE}
${ACPI_CAMERA_SWITCH_SUPPORT}= ${TRUE}
${ACPI_CAMERA_SWITCH_SUPPORT}= ${FALSE}
${ODROID_NETCARD_SUPPORT}= ${FALSE}
# Test module: dasharo-security
${TPM_SUPPORTED_VERSION}= ${NONE}
${TPM_EXPECTED_CHIP}= FILL_WITH_CORRECT_VALUE_BEFORE_TESTING
Expand Down
Loading
Loading