Skip to content
Merged
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
100 changes: 100 additions & 0 deletions dasharo-stability/coreboot-redundant-boot.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
*** Settings ***
Library Collections
Library Dialogs
Library String
Resource ../variables.robot
Resource ../keywords.robot

Suite Setup Run Keyword
... Prepare Test Suite
Suite Teardown Run Keyword
... Log Out And Close Connection

Default Tags automated


*** Variables ***
${NVRAM_ATTEMPT_B_FLAG}= attempt_slot_b # TBD
${NVRAM_ATTEMPT_B_FLAG_SET}= Enable # TBD
${NVRAM_ATTEMPT_B_FLAG_CLR}= Disable # TBD


*** Test Cases ***
CRB001.201 Boot Slot A After Clearing CMOS (Ubuntu)
[Documentation] Check if clearing the CMOS makes the DUT boot from slot A
... which should contain a recovery firmware
[Tags] automated

IF ${DUT_HAS_CMOS_RESET}
Rte Psu Off
Rte Clear Cmos
ELSE
Log RTE CMOS clear not supported. Test becomes semiauto. level=WARN
Skip If 'semiauto' not in ${TEST_TAGS} `semiauto` tag not selected

Execute Manual Step Disconnect the CMOS battery
Sleep 5s
Execute Manual Step Connect the CMOS battery and assemble back the device completely
IF ${POWER_CTRL} == 'none'
Execute Manual Step Make sure the device is ON
END
END

Power On
Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User
Should Have Booted From Slot COREBOOT

CRB002.201 Boot Slot B After Setting Attempt Slot B Flag (Ubuntu)
[Documentation] Check if setting the Attempt Slot B flag the device boots
... from the slot B
Power On
Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User
Set Attempt Slot B Flag ${TRUE}
Execute Reboot Command

Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User
Should Have Booted From Slot COREBOOT_TS

CRB003.201 Boot Slot A After Clearing Attempt Slot B Flag (Ubuntu)
[Documentation] Check if clearing the Attempt Slot B flag the device boots
... from the slot A
Power On
Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User
Set Attempt Slot B Flag ${FALSE}
Execute Reboot Command

Boot System Or From Connected Disk ${ENV_ID_UBUNTU}
Login To Linux
Switch To Root User
Should Have Booted From Slot COREBOOT


*** Keywords ***
Set Attempt Slot B Flag
[Arguments] ${state}=${TRUE}
IF ${state}
VAR ${flag_state}= ${NVRAM_ATTEMPT_B_FLAG_SET}
ELSE
VAR ${flag_state}= ${NVRAM_ATTEMPT_B_FLAG_CLR}
END

${out}= Execute Command In Terminal nvramtool -w ${NVRAM_ATTEMPT_B_FLAG}=${flag_state}
${out}= Execute Command In Terminal nvramtool -r ${NVRAM_ATTEMPT_B_FLAG}
Should Contain ${out} ${flag_state}

Should Have Booted From Slot
[Arguments] ${slot}
${slot}= Convert To Lower Case ${slot}
# TBD - will this show slot B?
${out}= Execute Command In Terminal cbmem -c | grep "Booting from"
${out}= Convert To Lower Case ${out}
${out}= Strip String ${out}
Should Contain ${out} ${slot}
4 changes: 2 additions & 2 deletions platform-configs/include/novacustom-adl.robot
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ ${BLUETOOTH_CARD_UBUNTU}= Intel Corp. AX201 Bluetooth
${WEBCAM_UBUNTU}= Chicony Electronics Co., Ltd Chicony USB2.0 Camera

# DMI
${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v1.7.2
${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v1.8.0-rc4
# TODO verify
${DMIDECODE_RELEASE_DATE}= 03/17/2022
${DMIDECODE_RELEASE_DATE}= 11/05/2025

${L3_CACHE_SUPPORT}= ${TRUE}

Expand Down
21 changes: 21 additions & 0 deletions test_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -2167,6 +2167,27 @@
"module": "Dasharo Compatibility"
}
},
{
"doc": {
"_id": "CRB001.201",
"name": "Boot Slot A After Clearing CMOS (Ubuntu)",
"module": "Dasharo Stability"
}
},
{
"doc": {
"_id": "CRB002.201",
"name": "Boot Slot B After Setting Attempt Slot B Flag (Ubuntu)",
"module": "Dasharo Stability"
}
},
{
"doc": {
"_id": "CRB003.201",
"name": "Boot Slot A After Clearing Attempt Slot B Flag (Ubuntu)",
"module": "Dasharo Stability"
}
},
{
"doc": {
"_id": "CUP001.001",
Expand Down
Loading