diff --git a/dasharo-stability/coreboot-redundant-boot.robot b/dasharo-stability/coreboot-redundant-boot.robot new file mode 100644 index 0000000000..1d1bd1de04 --- /dev/null +++ b/dasharo-stability/coreboot-redundant-boot.robot @@ -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} diff --git a/platform-configs/include/novacustom-adl.robot b/platform-configs/include/novacustom-adl.robot index e43b88fce1..ea0bb7b6ef 100644 --- a/platform-configs/include/novacustom-adl.robot +++ b/platform-configs/include/novacustom-adl.robot @@ -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} diff --git a/test_cases.json b/test_cases.json index 44d2215ffa..1c63285ae9 100644 --- a/test_cases.json +++ b/test_cases.json @@ -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",