├── .codespellrc ├── .codespellx ├── .conform.yaml ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ ├── feature_request.yml │ ├── question-or-support-request.md │ └── task.md └── workflows │ ├── auto-docs.yml │ ├── qemu-self-test.yml │ └── smoke.yml ├── .gitignore ├── .gitmodules ├── .markdownlint.yaml ├── .pre-commit-config.yaml ├── .robocop ├── .robotidy ├── .yamllint ├── CHANGELOG.md ├── FUNDING.yml ├── LICENSE ├── LICENSES └── Apache-2.0.txt ├── NOTICE ├── README.md ├── REUSE.toml ├── assessment └── txe-secure-boot.robot ├── cliff.toml ├── dasharo-compatibility ├── __init__.robot ├── acpi-driver.robot ├── apu-configuration-menu.robot ├── audio-subsystem.robot ├── auto-boot-time-out.robot ├── boot-blocking.robot ├── check-ethernet-ports-order.robot ├── coreboot-base-port.robot ├── coreboot-fan-control.robot ├── cpu-cores-count.robot ├── cpu-fan-speed-measure.robot ├── cpu-status.robot ├── cpu-throttling.robot ├── custom-boot-menu-key.robot ├── custom-boot-order.robot ├── custom-network-boot-entries.robot ├── dasharo-tools-suite.robot ├── dcu.robot ├── device-detection.robot ├── display-ports-and-lcd-support.robot ├── dmidecode.robot ├── eMMC-support.robot ├── ec-and-super-IO.robot ├── efi.robot ├── efibootmgr.robot ├── esp-scanning.robot ├── ethernet-port-names.robot ├── firmware-bulding-locally.robot ├── flash-test-stub.robot ├── flash-write-protection.robot ├── heads-bootloader-support.robot ├── heads-device-tree.robot ├── memory-profile.robot ├── miniPCIe-slot-verification.robot ├── network-boot-utilities.robot ├── network-boot.robot ├── network-speed.robot ├── nvidia.robot ├── nvme-support.robot ├── petitboot-payload-support.robot ├── platform-hibernation-and-resume.robot ├── platform-suspend-and-resume.robot ├── power-after-fail.robot ├── reset-to-defaults.robot ├── sata-detect.robot ├── sd-card-reader.robot ├── setup-menu-information.robot ├── uefi-shell.robot ├── usb-always-on.robot ├── usb-boot.robot ├── usb-camera.robot ├── usb-detect.robot ├── usb-hid-and-msc-support.robot ├── usb-type-c.robot ├── watchdog.robot └── wifi-bluetooth-support.robot ├── dasharo-performance ├── __init__.robot ├── boot-time-measure.robot ├── cpu-frequency.robot ├── cpu-performance.robot ├── cpu-temperature.robot ├── custom-fan-curve.robot ├── disk-io.robot ├── fast-boot.robot ├── gpu-performance.robot ├── graphics-configuration.robot ├── manual_cpu_performance.robot └── platform-stability.robot ├── dasharo-security ├── __init__.robot ├── bios-lock.robot ├── camera-switch.robot ├── early-boot-dma-protection.robot ├── me-neuter-static.robot ├── me-neuter.robot ├── measured-boot.robot ├── network-stack.robot ├── option-rom.robot ├── rebar.robot ├── secure-boot.robot ├── smm-bios-write-protection.robot ├── tcg-opal-disk-password.robot ├── tpm-support.robot ├── tpm2-commands.robot ├── uefi-password.robot ├── usb-stack.robot ├── verified-boot.robot └── wifi-bluetooth-switch.robot ├── dasharo-stability ├── __init__.robot ├── capsule-update-files │ ├── CapsuleApp.efi │ ├── CapsuleApp.efi.license │ ├── romhole │ └── romhole.license ├── capsule-update.robot ├── m2-wifi.robot ├── network-interface-after-suspend.robot ├── nvme-detection.robot ├── power-on-keyword-stress.robot ├── tpm-detect-heads.robot ├── tpm-detect.robot └── usb-type-a-devices-detection.robot ├── dl-cache └── .gitkeep ├── docs ├── README.md ├── adding-new-platforms.md ├── config-parser.md ├── contributing.md ├── dts-tests.md ├── img │ ├── osfv_cli_after.png │ ├── osfv_dcu_integration.png │ ├── platform-configs-protectli.png │ ├── power-state-v0.1.0.svg │ ├── power-supply-v0.1.0.svg │ └── serial-v0.1.0.svg ├── novacustom.md ├── qemu.md ├── raptor-talos-2.md ├── results.md ├── tests-naming-convention.md ├── troubleshooting.md ├── uml │ ├── power-state-v0.1.0.puml │ ├── power-supply-v0.1.0.puml │ └── serial-v0.1.0.puml └── windows_hlk_setup.md ├── drive_letters.ps1 ├── dts └── dts-e2e.robot ├── get_results_from_logs.py ├── keys-and-keywords ├── heads-keywords.robot ├── totp.py └── ubuntu-keywords.robot ├── keys.robot ├── keywords.robot ├── lib ├── QemuMonitor.py ├── bios │ ├── menus.py │ └── menus.robot ├── cbmem.robot ├── dcu.robot ├── dmidecode-lib.robot ├── docks.robot ├── dts-lib.robot ├── esp-scanning-lib.robot ├── fan_curve_tests │ └── fan_curve_tests.py ├── flash.robot ├── framework.robot ├── linux.robot ├── me.robot ├── network.robot ├── novacustom-lib.robot ├── options │ ├── options-lib_dcu.robot │ ├── options-lib_uefi-setup-menu.robot │ └── options.robot ├── performance │ ├── common.robot │ ├── cpu.robot │ └── gpu.robot ├── platform │ ├── boot.robot │ └── power.robot ├── power-after-fail-lib.robot ├── sd-wire.robot ├── secure-boot-lib.robot ├── self-tests.robot ├── sensors │ └── sensors.robot ├── sleep-lib.robot ├── terminal.robot ├── tpm.robot ├── tpm2.robot ├── trenchboot.robot ├── usb-hid-msc-lib.robot └── utc.robot ├── os-config ├── 201-credentials.py ├── 202-credentials.py ├── 301-credentials.py ├── ansible │ ├── linux-packages-playbook.yaml │ ├── os-specific-tasks │ │ ├── 201.yaml │ │ └── 202.yaml │ └── vars │ │ ├── 201-packages.yaml │ │ └── 202-packages.yaml └── environment-test-ids.py ├── platform-configs ├── include │ ├── default.robot │ ├── msi-z690-common.robot │ ├── novacustom-adl.robot │ ├── novacustom-common.robot │ ├── novacustom-mtl.robot │ ├── novacustom-tgl.robot │ ├── optiplex-common.robot │ ├── pcengines.robot │ ├── protectli-common.robot │ ├── protectli-pro.robot │ ├── protectli-v1x10.robot │ ├── protectli-vp24xx.robot │ ├── protectli-vp32xx.robot │ ├── protectli-vp46xx.robot │ ├── protectli-vp66xx.robot │ └── sensors │ │ ├── default-sensors-config.yaml │ │ ├── protectli-vp66xx-fan-curve-config.yaml │ │ └── protectli-vp66xx-sensors-config.yaml ├── minnowboard-turbot.robot ├── msi-pro-z690-a-ddr5.robot ├── msi-pro-z690-a-wifi-ddr4.robot ├── msi-pro-z790-p-ddr5.robot ├── no-rte.robot ├── novacustom-ns50mu.robot ├── novacustom-ns50pu.robot ├── novacustom-ns70mu.robot ├── novacustom-ns70pu.robot ├── novacustom-nv41mb.robot ├── novacustom-nv41mz.robot ├── novacustom-nv41pz.robot ├── novacustom-ts1.robot ├── novacustom-v540tnd.robot ├── novacustom-v540tu.robot ├── novacustom-v560tnd.robot ├── novacustom-v560tne.robot ├── novacustom-v560tu.robot ├── odroid-h4-plus.robot ├── optiplex-7010.robot ├── optiplex-9010.robot ├── pcengines-apu2.robot ├── pcengines-apu3.robot ├── pcengines-apu4.robot ├── pcengines-apu6.robot ├── protectli-v1210.robot ├── protectli-v1211.robot ├── protectli-v1410.robot ├── protectli-v1610.robot ├── protectli-vp2410.robot ├── protectli-vp2420.robot ├── protectli-vp2430.robot ├── protectli-vp2440.robot ├── protectli-vp3210.robot ├── protectli-vp3230.robot ├── protectli-vp4630.robot ├── protectli-vp4650.robot ├── protectli-vp4670.robot ├── protectli-vp6650.robot ├── protectli-vp6670.robot ├── qemu-selftests.robot ├── qemu.robot ├── raptor-cs_talos2.robot └── rpi-3b.robot ├── requirements-openbmc.txt ├── requirements.txt ├── robocop.toml ├── scripts ├── capsules │ ├── capsule_update_tests.sh │ ├── root.pub.pem │ ├── sign.p12 │ ├── sign.p12.license │ └── sub.pub.pem ├── check-unused-variables.sh ├── ci │ ├── ipxe-run.sh │ ├── qemu-run.sh │ ├── qemu-self-test.sh │ └── smoke.sh ├── config_parser.py ├── create-docs.py ├── create-docs.sh ├── create_platform_config.py ├── get-robot-variables.sh ├── lib │ ├── mappings.json │ └── robot.sh ├── osfv_results.py ├── refactoring-state.sh ├── regression-qemu.sh ├── regression.sh ├── rename-keyword.sh ├── run.sh ├── stats.py ├── synchronize-db.py └── utc_generator.py ├── self-tests ├── boolean-options.robot ├── count-needed-arrow_down-presses.robot ├── dasharo-system-features-menus.robot ├── dcu.robot ├── list-options.robot ├── make-sure-that-flash-locks-are-disabled.robot ├── numerical-options.robot ├── os-boot.robot ├── scrolling-boot-manager.robot ├── secure-boot.robot ├── setup-and-boot-menus.robot └── terminal.robot ├── stress-test-windows.ps1 ├── test_cases.json ├── trenchboot ├── 01-without-drtm.robot ├── 02-with-drtm.robot └── README.md ├── util └── basic-platform-setup.robot ├── variables.robot └── zarhus-base ├── 00_flash_and_verify.robot ├── 01_base_os.robot └── 02_cog_memory_leaks.robot /.codespellrc: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | [codespell] 6 | exclude-file = .codespellx 7 | ignore-words-list = "FPT,FTP,fpt,ftp,checkin,Checkin" 8 | -------------------------------------------------------------------------------- /.codespellx: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | -device hda-duplex,audiodev=hda \ 6 | -audiodev pa,id=hda,server=${PULSE_SERVER},out.frequency=44100 \ 7 | ${DEVICE_AUDIO1}= HDA Intel PCH 8 | -------------------------------------------------------------------------------- /.conform.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --- 6 | policies: 7 | - type: commit 8 | spec: 9 | header: 10 | length: 80 11 | imperative: false 12 | invalidLastCharacters: . 13 | body: 14 | required: false 15 | dco: true 16 | gpg: 17 | required: true 18 | spellcheck: 19 | locale: US 20 | maximumOfOneCommit: false 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | blank_issues_enabled: false 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: Feature request 6 | description: Suggest a new feature or an improvement of existing functionality. 7 | labels: ["enhancement"] 8 | 9 | body: 10 | - type: markdown 11 | attributes: 12 | value: Thanks for taking the time to fill out this feature request! 13 | 14 | - type: textarea 15 | id: description 16 | attributes: 17 | label: The problem you're addressing (if any) 18 | description: A clear and concise description of the problem, if any, that this feature is intended to address. 19 | validations: 20 | required: false 21 | 22 | - type: textarea 23 | id: solution 24 | attributes: 25 | label: Describe the solution you'd like 26 | description: If you have something in mind, a clear and concise description of what you want to happen. If you don't have something in mind, indicate as much. 27 | validations: 28 | required: false 29 | 30 | - type: textarea 31 | id: value 32 | attributes: 33 | label: Where is the value to a user, and who might that user be? 34 | description: Which users is this most likely to benefit? What user needs does this address? How might a user summarize this change or new thing? 35 | validations: 36 | required: false 37 | 38 | - type: textarea 39 | id: alternatives 40 | attributes: 41 | label: Describe alternatives you've considered 42 | description: A clear and concise description of any alternative solutions or features you've considered. 43 | validations: 44 | required: false 45 | 46 | - type: textarea 47 | id: context 48 | attributes: 49 | label: Additional context 50 | description: Add any other context or screenshots about the feature request here. 51 | validations: 52 | required: false 53 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question-or-support-request.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | --- 10 | name: Question or Support Request 11 | about: Ask a question or request support. 12 | title: '' 13 | labels: 'B: question' 14 | assignees: '' 15 | 16 | --- 17 | **Test environment version** 18 | * Branch: 19 | * Commit: 20 | 21 | **Dasharo version** 22 | 23 | 24 | **Dasharo variant** 25 | 26 | 27 | **Question text** 28 | 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/task.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | --- 10 | name: Task 11 | about: Anything actionable that doesn't qualify as a bug or feature. 12 | title: '' 13 | labels: 'P: default, T: task' 14 | assignees: '' 15 | 16 | --- 17 | **Test environment version** 18 | * Branch: 19 | * Commit: 20 | 21 | **Dasharo version (if applicable)** 22 | 23 | 24 | **Dasharo variant (if applicable)** 25 | 26 | 27 | **Affected component(s) or functionality (if applicable)** 28 | 29 | 30 | **Brief summary** 31 | 32 | 33 | **Additional context** 34 | 35 | -------------------------------------------------------------------------------- /.github/workflows/auto-docs.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: Auto Docs 6 | 7 | on: 8 | push: 9 | branches: 10 | - master 11 | - develop 12 | - documentation 13 | 14 | jobs: 15 | generate-docs: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - name: Checkout repository 20 | uses: actions/checkout@v4 21 | 22 | - name: Set up Python 23 | uses: actions/setup-python@v5 24 | with: 25 | python-version: '3.x' 26 | 27 | - name: Install dependencies 28 | run: pip install -r requirements.txt 29 | 30 | - name: Generate documentation 31 | run: cd ${GITHUB_WORKSPACE}/ && bash scripts/create-docs.sh 32 | 33 | - name: Deploy to GitHub Pages 34 | uses: peaceiris/actions-gh-pages@v4 35 | with: 36 | github_token: ${{ secrets.GITHUB_TOKEN }} 37 | publish_dir: ./docs 38 | publish_branch: gh-pages 39 | destination_dir: . 40 | allow_empty_commit: false 41 | keep_files: true 42 | add: true 43 | force_orphan: true 44 | -------------------------------------------------------------------------------- /.github/workflows/qemu-self-test.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: Keywords self-tests with QEMU 6 | 7 | on: [push, pull_request] 8 | 9 | jobs: 10 | qemu: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout repository and submodules 15 | uses: actions/checkout@v2 16 | with: 17 | submodules: 'recursive' 18 | 19 | - name: Set up QEMU 20 | run: | 21 | sudo apt-get update 22 | sudo apt-get install qemu-system-x86-64 swtpm 23 | 24 | # Based on: https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ 25 | # It mentiones enteprise large-runners, let's see if it works 26 | # on regular public runners as well 27 | - name: Enable KVM group perms 28 | run: | 29 | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules 30 | sudo udevadm control --reload-rules 31 | sudo udevadm trigger --name-match=kvm 32 | 33 | - name: Start QEMU in background 34 | run: | 35 | ./scripts/ci/qemu-run.sh nographic firmware & 36 | 37 | - name: Set up Python 38 | uses: actions/setup-python@v2 39 | with: 40 | python-version: '3.11' 41 | 42 | - name: Install dependencies 43 | run: | 44 | python -m pip install --upgrade pip 45 | pip install -r requirements.txt 46 | 47 | - name: Start keywords self-tests with QEMU 48 | run: | 49 | ./scripts/ci/qemu-self-test.sh 50 | 51 | - name: Save artifacts 52 | uses: actions/upload-artifact@v4 53 | with: 54 | name: "qemu-logs" 55 | path: | 56 | ./logs/ 57 | retention-days: 30 58 | -------------------------------------------------------------------------------- /.github/workflows/smoke.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: Smoke tests on selected platforms 6 | 7 | on: [push, pull_request] 8 | 9 | jobs: 10 | build: 11 | runs-on: self-hosted 12 | 13 | steps: 14 | - name: Checkout repository and submodules 15 | uses: actions/checkout@v2 16 | with: 17 | submodules: 'recursive' 18 | 19 | - name: Set up Python 20 | uses: actions/setup-python@v2 21 | with: 22 | python-version: '3.11' 23 | 24 | - name: Install dependencies 25 | run: | 26 | python -m pip install --upgrade pip 27 | pip install -r requirements.txt 28 | 29 | - name: Execute robot command 30 | run: | 31 | scripts/ci/smoke.sh 32 | 33 | - name: Upload HTML files as artifacts 34 | uses: actions/upload-artifact@v2 35 | if: always() 36 | with: 37 | name: HTML-Reports 38 | path: | 39 | logs/ 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | robot-venv 6 | robotframework 7 | minicom.cap 8 | *.xml 9 | *.html 10 | *.log 11 | *.rom 12 | *.tar.gz 13 | *.md5 14 | *.js 15 | *.pyc 16 | spreadsheet-creds.json 17 | downstream_job_parameters.txt 18 | openbmc-test-automation/ 19 | __pycache__* 20 | *.fd 21 | dl-cache/* 22 | !dl-cache/.gitkeep 23 | qemu-data/ 24 | command_log.txt 25 | ipxe/ 26 | /logs 27 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | [submodule "rtectrl-rest-api"] 6 | path = rtectrl-rest-api 7 | url = https://github.com/3mdeb/rtectrl-rest-api.git 8 | [submodule "sonoff-rest-api"] 9 | path = sonoff-rest-api 10 | url = https://github.com/3mdeb/sonoff-rest-api.git 11 | [submodule "pikvm-rest-api"] 12 | path = pikvm-rest-api 13 | url = https://github.com/3mdeb/pikvm-rest-api.git 14 | [submodule "osfv-scripts"] 15 | path = osfv-scripts 16 | url = https://github.com/Dasharo/osfv-scripts.git 17 | [submodule "dcu"] 18 | path = dcu 19 | url = https://github.com/Dasharo/dcu.git 20 | [submodule "osfv-test-data"] 21 | path = osfv-test-data 22 | url = https://github.com/Dasharo/osfv-test-data.git 23 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --- 6 | default_stages: [pre-commit] 7 | 8 | default_install_hook_types: [pre-commit, commit-msg] 9 | 10 | ci: 11 | autoupdate_commit_msg: 'pre-commit: autoupdate hooks' 12 | autofix_prs: false 13 | # shellcheck requires docker, which is not available on pre-commit.ci 14 | skip: [shellcheck] 15 | 16 | repos: 17 | - repo: https://github.com/pre-commit/pre-commit-hooks 18 | rev: v5.0.0 19 | hooks: 20 | - id: check-added-large-files 21 | - id: check-merge-conflict 22 | - id: check-symlinks 23 | - id: detect-private-key 24 | - id: end-of-file-fixer 25 | - id: trailing-whitespace 26 | - id: mixed-line-ending 27 | 28 | - repo: https://github.com/talos-systems/conform 29 | rev: v0.1.0-alpha.30 30 | hooks: 31 | - id: conform 32 | stages: 33 | - commit-msg 34 | 35 | - repo: https://github.com/codespell-project/codespell 36 | rev: v2.3.0 37 | hooks: 38 | - id: codespell 39 | 40 | - repo: https://github.com/igorshubovych/markdownlint-cli 41 | rev: v0.42.0 42 | hooks: 43 | - id: markdownlint 44 | - id: markdownlint-fix 45 | 46 | - repo: https://github.com/koalaman/shellcheck-precommit 47 | rev: v0.10.0 48 | hooks: 49 | - id: shellcheck 50 | args: ["--severity=warning"] 51 | 52 | - repo: https://github.com/pycqa/isort 53 | rev: 5.13.2 54 | hooks: 55 | - id: isort 56 | name: isort (python) 57 | 58 | - repo: https://github.com/psf/black 59 | rev: 24.10.0 60 | hooks: 61 | - id: black 62 | 63 | - repo: https://github.com/MarketSquare/robotframework-tidy 64 | rev: 4.14.0 65 | hooks: 66 | - id: robotidy 67 | 68 | - repo: https://github.com/MarketSquare/robotframework-robocop 69 | rev: 5.4.0 70 | hooks: 71 | - id: robocop 72 | 73 | - repo: https://github.com/fsfe/reuse-tool 74 | rev: v5.0.2 75 | hooks: 76 | - id: reuse-lint-file 77 | 78 | - repo: local 79 | hooks: 80 | - id: platform-configs-var-check 81 | name: platform-configs 82 | description: Check for unused variables in platform-configs 83 | language: script 84 | entry: ./scripts/check-unused-variables.sh 85 | args: [ "-f" ] 86 | files: 'platform-configs/.*\.robot$' 87 | -------------------------------------------------------------------------------- /.robocop: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --config robocop.toml 6 | -------------------------------------------------------------------------------- /.robotidy: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | spacecount = 4 6 | indent = 4 7 | continuation-indent = 4 8 | line-length = 120 9 | lineseparator = "unix" 10 | separator = "space" 11 | 12 | transform = [ 13 | "AddMissingEnd", 14 | "AlignSettingsSection", 15 | "AlignVariablesSection", 16 | "DiscardEmptySections", 17 | "InlineIf", 18 | "MergeAndOrderSections", 19 | "NormalizeAssignments", 20 | "NormalizeComments", 21 | "NormalizeNewLines", 22 | "NormalizeSectionHeaderName", 23 | "NormalizeSeparators", 24 | "NormalizeSettingName", 25 | "OrderSettings", 26 | "OrderSettingsSection", 27 | "RemoveEmptySettings", 28 | "RenameKeywords", 29 | "RenameTestCases", 30 | "RenameVariables", 31 | "ReplaceBreakContinue", 32 | "ReplaceEmptyValues", 33 | "ReplaceReturns", 34 | "ReplaceRunKeywordIf", 35 | "SplitTooLongLine", 36 | ] 37 | 38 | # Consider enabling: 39 | # "SmartSortKeywords", 40 | 41 | 42 | configure = [ 43 | "NormalizeAssignments:equal_sign_type=equal_sign", 44 | "NormalizeAssignments:equal_sign_type_variables=equal_sign", 45 | "OrderSettingsSection:group_order=documentation,imports,settings,tags", 46 | "OrderSettingsSection:documentation_order=documentation,metadata", 47 | "OrderSettingsSection:imports_order=library,resource,variables", 48 | "OrderSettingsSection:settings_order=suite_setup,suite_teardown,test_setup,test_teardown,test_timeout,test_template", 49 | "RenameKeywords:ignore_library=False", 50 | "RenameVariables:settings_section_case=upper", 51 | "RenameVariables:variables_section_case=upper", 52 | "RenameVariables:variable_separator=underscore", 53 | "SplitTooLongLine:split_single_value=True", 54 | "SplitTooLongLine:align_new_line=True", 55 | ] 56 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | --- 6 | extends: default 7 | 8 | rules: 9 | comments: 10 | require-starting-space: true 11 | ignore-shebangs: true 12 | min-spaces-from-content: 2 13 | document-start: 14 | present: true 15 | level: error 16 | indentation: 17 | spaces: 2 18 | line-length: disable 19 | truthy: 20 | check-keys: false 21 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Changelog 8 | 9 | All notable changes to this project will be documented in this file. 10 | 11 | ## [v0.1.0] - 2022-10-30 12 | 13 | ### Added 14 | 15 | - `dasharo-compatibility/__init__.robot`: add keyword for prepare platform to 16 | testing 17 | - `dasharo-compatibility/dasharo-tools-suite.robot`: add test suite. 18 | - `dasharo-compatibility/smbios.robot`: add test suite. 19 | - `keys-and-keywords/firmware-keywords.robot`: add keywords for performing 20 | tasks on the firmware level. 21 | - `keys-and-keywords/keys.robot`: add file for keys encoding. 22 | - `keys-and-keywords/setup-keywords.robot`: add keywords for preparing the Test 23 | Suites, testing stand and DUTs. 24 | - `keys-and-keywords/ubuntu-keywords.robot`: add keywords for performing 25 | tasks on the OS level (Ubuntu 22.04). 26 | - `platform-configs/msi-pro-z690-ddr5.robot`: add configuration file dedicated 27 | for the platform 28 | - `platform-configs/msi-pro-z690-wifi-ddr4.robot`: add configuration file 29 | dedicated for the platform 30 | - `requirements.txt`: add list of requirements to setup test env 31 | - `.gitignore`: add types of ignored folders and files 32 | - `.gitignore`: add file for importing external resources 33 | - `regression.sh`: add the file for running all of the test modules. 34 | - `README.md`: add basic documentation on how to establish the test env and 35 | how to run tests. 36 | -------------------------------------------------------------------------------- /FUNDING.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | open_collective: 3mdeb_com 6 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2023 3mdeb 2 | SPDX-License-Identifier: Apache-2.0 3 | 4 | Open Source Firmware Validation 5 | Copyright 2023 3mdeb 6 | 7 | This product includes software developed at 3mdeb (https://3mdeb.com/). 8 | -------------------------------------------------------------------------------- /REUSE.toml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | version = 1 6 | 7 | [[annotations]] 8 | path = ["**/*.robot", "**/*.png", "**/*.svg", "**/*.pem", "**/*.json"] 9 | precedence = "closest" 10 | SPDX-FileCopyrightText = "2024 3mdeb " 11 | SPDX-License-Identifier = "Apache-2.0" 12 | -------------------------------------------------------------------------------- /assessment/txe-secure-boot.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # Resource ../platform-configs/msi-pro-z690-a-ddr5.robot 16 | # Required setup keywords: 17 | # Prepare Test Suite - elementary setup keyword for all tests. 18 | # Upload Required Images - uploads all required files onto the PiKVM. 19 | # Required teardown keywords: 20 | # Log Out And Close Connection - elementary teardown keyword for all tests. 21 | Suite Setup Run Keywords 22 | ... Prepare Test Suite 23 | Suite Teardown Run Keyword 24 | ... Log Out And Close Connection 25 | Test Setup Restore Initial DUT Connection Method 26 | 27 | 28 | *** Test Cases *** 29 | TXE001.001 Check if platform is not fused 30 | [Documentation] This test aims to verify that the platform is not fused 31 | 32 | Power On 33 | Enter UEFI Shell 34 | Set Prompt For Terminal FS2:\\> 35 | Execute UEFI Shell Command fs2: 36 | ${out}= Execute UEFI Shell Command ls 37 | Should Contain ${out} TxeInfo.efi 38 | Should Contain ${out} FPT.efi 39 | Should Contain ${out} fparts.txt 40 | ${out}= Execute UEFI Shell Command TxeInfo.efi -VERBOSE 0.1 41 | ${man_mode}= Get Lines Containing String ${out} ManufacturingMode: 42 | Should Contain ${man_mode} Enabled 43 | ${fpf}= Get Lines Containing String ${out} Global Valid FPF: 44 | Should Contain ${fpf} Invalid 45 | -------------------------------------------------------------------------------- /dasharo-compatibility/__init__.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Resource ../variables.robot 10 | Resource ../keywords.robot 11 | Resource ../keys.robot 12 | 13 | Suite Setup Prepare Platform 14 | 15 | 16 | *** Keywords *** 17 | Prepare Platform 18 | [Documentation] Keyword allows to flashing the device with the required 19 | ... firmware version. Number of files used in the flashing procedure and 20 | ... method of the flashing depends on the platform specify: 21 | ... -> for the platforms that have external flashing enabled, 22 | ... flashrom utility installed on the RTE is used. 23 | ... -> for the platforms that have BMC, pflash utility built in OBMC is 24 | ... used. 25 | ... -> for the platforms that don't both don't have external flashing 26 | ... enabled and OBMC, internal flashing mechanism is used. 27 | IF '${CONFIG}'=='raptor-cs_talos2' 28 | Variable Should Exist ${FW_FILE} 29 | Variable Should Exist ${BOOTBLOCK_FILE} 30 | Variable Should Exist ${Z_IMAGE_FILE} 31 | Prepare Test Suite 32 | Flash Heads From OpenBMC ${BOOTBLOCK_FILE} ${FW_FILE} ${Z_IMAGE_FILE} 33 | ${fw_ver_file}= Get Firmware Version From Coreboot File ${FW_FILE} 34 | Power On 35 | ${fw_ver_bootblock} ${fw_ver_romstage}= Get Firmware Version From Bootlogs 36 | Log Out And Close Connection 37 | Should Be Equal ${fw_ver_file} ${fw_ver_bootblock} 38 | Should Be Equal ${fw_ver_bootblock} ${fw_ver_romstage} 39 | ELSE 40 | Variable Should Exist ${FW_FILE} 41 | Prepare Test Suite 42 | Flash Firmware ${FW_FILE} 43 | Power Cycle On 44 | ${version}= Get Firmware Version 45 | ${coreboot_version}= Get Firmware Version From Binary ${FW_FILE} 46 | Log Out And Close Connection 47 | Should Contain ${coreboot_version} ${version} 48 | END 49 | -------------------------------------------------------------------------------- /dasharo-compatibility/boot-blocking.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keywords 20 | ... Prepare Test Suite 21 | ... AND 22 | ... Skip If not ${BOOT_BLOCKING_SUPPORT} Boot blocking not supported 23 | Suite Teardown Run Keyword 24 | ... Log Out And Close Connection 25 | 26 | 27 | *** Test Cases *** 28 | BBB001.001 Boot blocking (charger disconnected) (Ubuntu) 29 | [Documentation] Discharge the battery to below 5% and check if booting is 30 | ... blocked. 31 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} BBB001.001 not supported 32 | Power On 33 | Login To Linux 34 | Switch To Root User 35 | Sonoff Off 36 | Discharge The Battery Until Target Level In Linux 3 37 | Execute Command In Terminal reboot 38 | 39 | BBB001.002 Boot blocking (charger connected) (Ubuntu) 40 | [Documentation] Discharge the battery to below 5% and check if booting is 41 | ... blocked. 42 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} BBB001.001 not supported 43 | Power On 44 | Login To Linux 45 | Switch To Root User 46 | Sonoff Off 47 | Discharge The Battery Until Target Level In Linux 3 48 | Sonoff On 49 | Execute Command In Terminal reboot 50 | -------------------------------------------------------------------------------- /dasharo-compatibility/check-ethernet-ports-order.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library DateTime 4 | Library OperatingSystem 5 | Library Process 6 | Library String 7 | Library Telnet timeout=20 seconds 8 | Library SSHLibrary timeout=90 seconds 9 | Library RequestsLibrary 10 | Resource ../variables.robot 11 | Resource ../keywords.robot 12 | Resource ../keys.robot 13 | 14 | Suite Setup Run Keywords 15 | ... Prepare Test Suite 16 | Suite Teardown Run Keyword 17 | ... Log Out And Close Connection 18 | 19 | 20 | *** Test Cases *** 21 | SPS001.001 Ethernet ports are in order 22 | [Documentation] This test automates the verification of port order based 23 | ... on PCIe bus numbers and checks PCIe switching. 24 | Skip If '''${ETH_PORTS}''' == '' not supported 25 | Power On 26 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 27 | Login To Linux 28 | Switch To Root User 29 | ${pci_devices}= Get MACs 30 | Log PCIe devices and their MACs: ${pci_devices} 31 | Compare Interfaces ${pci_devices} 32 | 33 | 34 | *** Keywords *** 35 | Get PCIe 36 | ${lspci_output}= Execute Command In Terminal lspci -nn |grep "${ETHERNET_ID}" 37 | @{lines}= Split String ${lspci_output} \n 38 | ${ethernet_devs}= Create List 39 | FOR ${line} IN @{lines} 40 | ${dev}= Evaluate '${line}'.split()[0] 41 | Append To List ${ethernet_devs} ${dev} 42 | END 43 | RETURN ${ethernet_devs} 44 | 45 | Get MACs 46 | [Documentation] Extract MAC addresses from lspci output. 47 | ${ethernet_devs}= Get PCIe 48 | ${pci_devices}= Create List 49 | FOR ${dev} IN @{ethernet_devs} 50 | ${lspci_output}= Execute Command In Terminal lspci -s ${dev} -v |grep "Device Serial" 51 | Append PCIe MAC ${lspci_output} ${pci_devices} 52 | END 53 | RETURN ${pci_devices} 54 | 55 | Append PCIe MAC 56 | [Arguments] ${line} ${pci_devices} 57 | ${serial}= Evaluate '${line}'.split()[-1] 58 | ${mac}= Replace String ${serial} ff-ff- ${EMPTY} 59 | IF '00-00-00-00-00-00' not in '${mac}' 60 | Append To List ${pci_devices} ${mac} 61 | END 62 | 63 | Compare Interfaces 64 | [Arguments] ${pci_devices} 65 | Should Be Equal As Strings 66 | ... ${ETH_PORTS} 67 | ... ${pci_devices} 68 | ... The interfaces and PCIe buses do not match the expected order! 69 | -------------------------------------------------------------------------------- /dasharo-compatibility/cpu-throttling.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=300 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../lib/performance/cpu.robot 12 | Resource ../variables.robot 13 | Resource ../keywords.robot 14 | Resource ../keys.robot 15 | 16 | # TODO: 17 | # - document which setup/teardown keywords to use and what are they doing 18 | # - go threough them and make sure they are doing what the name suggest (not 19 | # exactly the case right now) 20 | Suite Setup Run Keyword 21 | ... Prepare Test Suite 22 | Suite Teardown Run Keyword 23 | ... Log Out And Close Connection 24 | 25 | 26 | *** Test Cases *** 27 | THR001.001 Try to enter a threshold value that's above the limit 28 | [Documentation] Verify that a threshold value that's above the limit 29 | ... will get rejected with a proper prompt 30 | Skip If not "${OPTIONS_LIB}" == "options-lib_uefi-setup-menu" 31 | # According to Intel datasheets, the throttling temperature must be within 32 | # {TjMax; TjMax - 63} 33 | Set UEFI Option CpuThrottlingThreshold 200 34 | Save Changes 35 | Read From Terminal Until error 36 | Write Bare Into Terminal c 37 | Read From Terminal Until TjMax 38 | 39 | THR001.002 Try to enter a threshold value that's below the limit 40 | [Documentation] Verify that a threshold value that's below the limit 41 | ... will get rejected with a proper prompt 42 | Skip If not "${OPTIONS_LIB}" == "options-lib_uefi-setup-menu" 43 | Set UEFI Option CpuThrottlingThreshold 10 44 | Save Changes 45 | Read From Terminal Until error 46 | Write Bare Into Terminal c 47 | Read From Terminal Until TjMax 48 | 49 | THR002.001 Try to enter a threshold value within the limits and verify in Ubuntu 50 | [Documentation] Verify whether a reasonable throttling threshold will 51 | ... take effect in Ubuntu 52 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} THR002.001 not supported 53 | Set UEFI Option CpuThrottlingThreshold 70 54 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 55 | Login To Linux 56 | Stress Test 57 | # Wait until the stress load gets to "heat up" the CPU 58 | Sleep 10 59 | ${out}= Execute Command In Terminal sensors 60 | ${temperature}= Get CPU Temperature 61 | Should Be True ${temperature} < 73 # needs a bit of a margin 62 | -------------------------------------------------------------------------------- /dasharo-compatibility/custom-boot-menu-key.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=30 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keyword 20 | ... Prepare Test Suite 21 | Suite Teardown Run Keyword 22 | ... Log Out And Close Connection 23 | 24 | 25 | *** Test Cases *** 26 | CBK001.001 Custom boot menu key 27 | [Documentation] Check whether the DUT is configured properly to use 28 | ... custom boot menu hotkey. 29 | Skip If not ${CUSTOM_BOOT_MENU_KEY_SUPPORT} CBK001.001 not supported 30 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} CBK001.001 not supported 31 | Power On 32 | Enter Boot Menu Tianocore 33 | Read From Terminal Until ${BOOT_MENU_STRING} 34 | 35 | CBK002.001 Custom setup menu key 36 | [Documentation] Check whether the DUT is configured properly to use 37 | ... custom setup menu hotkey. 38 | Skip If not ${CUSTOM_SETUP_MENU_KEY_SUPPORT} CBK002.001 not supported 39 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} CBK002.001 not supported 40 | Power On 41 | Enter Setup Menu Tianocore 42 | Read From Terminal Until ${SETUP_MENU_STRING} 43 | -------------------------------------------------------------------------------- /dasharo-compatibility/custom-boot-order.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource ../lib/platform/power.robot 3 | Resource ../lib/platform/boot.robot 4 | 5 | Suite Setup Prepare Test Suite 6 | Suite Teardown Log Out And Close Connection 7 | 8 | 9 | *** Test Cases *** 10 | CBO001.101 Custom Boot Order (EDK2) 11 | [Documentation] Check if customization of Boot Order persists and 12 | ... correct OS boots. 13 | Depends On ${TESTS_IN_FIRMWARE_SUPPORT} 14 | 15 | Power Cycle Into Firmware Setup 16 | Set Selected OS As First In Boot Order Via EDK2 ${ENV_ID_UBUNTU} 17 | Verify Selected OS As First In Boot Order Via EDK2 ${ENV_ID_UBUNTU} 18 | 19 | Power Cycle Into Firmware Setup 20 | Set Selected OS As First In Boot Order Via EDK2 ${ENV_ID_WINDOWS} 21 | Verify Selected OS As First In Boot Order Via EDK2 ${ENV_ID_WINDOWS} 22 | -------------------------------------------------------------------------------- /dasharo-compatibility/custom-network-boot-entries.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keyword 20 | ... Prepare Test Suite 21 | Suite Teardown Run Keyword 22 | ... Log Out And Close Connection 23 | 24 | 25 | *** Test Cases *** 26 | CNB001.201 Only one iPXE in boot menu 27 | [Documentation] Check whether the network boot option with iPXE appears 28 | ... only once in the boot option list. 29 | ... Previous IDs: CNB001.001 30 | Skip If not ${CUSTOM_NETWORK_BOOT_ENTRIES_SUPPORT} CNB001.201 not supported 31 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} CNB001.201 not supported 32 | Skip If '${ENV_ID_UBUNTU}' not in ${TESTED_LINUX_DISTROS} CNB001.201 not supported 33 | Power On 34 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 35 | ${boot_menu}= Get UEFI Boot Manager Entries 36 | Should Contain X Times ${boot_menu} ${IPXE_BOOT_ENTRY} 1 37 | 38 | CNB001.202 Only one iPXE in boot menu 39 | [Documentation] Check whether the network boot option with iPXE appears 40 | ... only once in the boot option list. 41 | Skip If not ${CUSTOM_NETWORK_BOOT_ENTRIES_SUPPORT} CNB001.202 not supported 42 | Skip If '${ENV_ID_FEDORA}' not in ${TESTED_LINUX_DISTROS} CNB001.202 not supported 43 | Power On 44 | Boot System Or From Connected Disk ${ENV_ID_FEDORA} 45 | ${boot_menu}= Get UEFI Boot Manager Entries 46 | Should Contain X Times ${boot_menu} ${IPXE_BOOT_ENTRY} 1 47 | -------------------------------------------------------------------------------- /dasharo-compatibility/eMMC-support.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keyword 20 | ... Prepare Test Suite 21 | Suite Teardown Run Keyword 22 | ... Log Out And Close Connection 23 | 24 | 25 | *** Test Cases *** 26 | MMC001.001 eMMC support (Ubuntu) 27 | [Documentation] Check whether the eMMC driver is detected via the 28 | ... Operating System. 29 | Skip If not ${EMMC_SUPPORT} MMC001.001 not supported 30 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} MMC001.001 not supported 31 | Power On 32 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 33 | Login To Linux 34 | Switch To Root User 35 | ${out}= Execute Command In Terminal cat /sys/class/block/mmcblk0/device/name 36 | Should Contain ${out} ${E_MMC_NAME} 37 | Exit From Root User 38 | -------------------------------------------------------------------------------- /dasharo-compatibility/efi.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keywords 20 | ... Prepare Test Suite 21 | ... AND 22 | ... Skip If not ${UEFI_COMPATIBLE_INTERFACE_SUPPORT} UEFI interface tests not supported 23 | Suite Teardown Run Keyword 24 | ... Log Out And Close Connection 25 | 26 | 27 | *** Test Cases *** 28 | EFI001.201 Boot into UEFI OS (Ubuntu) 29 | [Documentation] Boot into Linux OS and check whether there is a 30 | ... possibility to identify the system. 31 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} EFI001.201 not supported 32 | Power On 33 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 34 | Login To Linux 35 | Switch To Root User 36 | ${out}= Execute Command In Terminal cat /etc/os-release 37 | Should Contain ${out} Ubuntu 38 | 39 | EFI001.301 Boot into UEFI OS (Windows) 40 | [Documentation] Boot into Windows 11 OS and check whether there is a 41 | ... possibility to identify the system 42 | Skip If not ${TESTS_IN_WINDOWS_SUPPORT} EFI001.301 not supported 43 | Power On 44 | Login To Windows 45 | ${out}= Execute Command In Terminal (Get-WmiObject -class Win32_OperatingSystem).Caption 46 | Should Contain ${out} Microsoft Windows 11 47 | -------------------------------------------------------------------------------- /dasharo-compatibility/ethernet-port-names.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Resource ../variables.robot 10 | Resource ../keywords.robot 11 | Resource ../keys.robot 12 | 13 | Suite Setup Run Keywords 14 | ... Prepare Test Suite 15 | Suite Teardown Run Keyword 16 | ... Log Out And Close Connection 17 | 18 | 19 | *** Test Cases *** 20 | EPN001.201 Check the ethernet port names (Ubuntu) 21 | [Documentation] Check whether the ethernet ports are named 'enp' 22 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} EPN001.201 not supported 23 | Skip If '${ENV_ID_UBUNTU}' not in ${TESTED_LINUX_DISTROS} EPN001.201 not supported 24 | Power On 25 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 26 | Login To Linux 27 | ${out}= Execute Linux Command ip a 28 | Should Not Contain Any ${out} 29 | ... eno1 eno2 eno3 eno4 eno5 eno6 30 | -------------------------------------------------------------------------------- /dasharo-compatibility/firmware-bulding-locally.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keywords 20 | ... Prepare Test Suite 21 | ... AND 22 | ... Skip If not ${FIRMWARE_BUILDING_SUPPORT} Firmware building tests not supported 23 | Suite Teardown Run Keyword 24 | ... Log Out And Close Connection 25 | 26 | 27 | *** Test Cases *** 28 | FLB001.001 Firmware locally build (Ubuntu) 29 | [Documentation] This test aims to verify whether there is a possibility 30 | ... to build firmware on the local machine, based on 31 | ... `Build manual` procedure dedicated to the platform. 32 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} FLB001.001 not supported 33 | Power On 34 | Login To Linux 35 | Switch To Root User 36 | Install Docker Packages 37 | Build Firmware From Source 38 | 39 | FLB002.001 Flash locally built firmware (Ubuntu) 40 | [Documentation] This test aims to verify whether there is a possibility 41 | ... to flash the locally built firmware to the DUT. 42 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} FLB002.001 not supported 43 | Power On 44 | Login To Linux 45 | Switch To Root User 46 | Write Into Terminal flashrom -p internal -w ../coreboot/build/coreboot.rom --ifd -i bios 47 | ${flash_result}= Read From Terminal Until Prompt 48 | IF "Warning: Chip content is identical to the requested image." in """${flash_result}""" 49 | Pass Execution Identical firmware already flashed 50 | END 51 | Should Contain ${flash_result} VERIFIED 52 | -------------------------------------------------------------------------------- /dasharo-compatibility/flash-test-stub.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | Resource ../platform-configs/include/protectli-vp66xx.robot 15 | 16 | # TODO: 17 | # - document which setup/teardown keywords to use and what are they doing 18 | # - go threough them and make sure they are doing what the name suggest (not 19 | # exactly the case right now) 20 | Suite Setup Run Keyword 21 | ... Prepare Test Suite 22 | Suite Teardown Run Keyword 23 | ... Log Out And Close Connection 24 | 25 | 26 | *** Test Cases *** 27 | STUB001.001 External flash explicit 28 | Flash Device Via External Programmer 29 | 30 | STUB001.002 External flash implicit 31 | Flash Firmware read-test.rom 32 | -------------------------------------------------------------------------------- /dasharo-compatibility/flash-write-protection.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keywords 20 | ... Prepare Test Suite 21 | ... AND 22 | ... Skip If not ${HARDWARE_WP_SUPPORT} Flash protection tests not supported 23 | Suite Teardown Run Keyword 24 | ... Log Out And Close Connection 25 | 26 | 27 | *** Test Cases *** 28 | HWP001.001 Hardware flash write protection support 29 | [Documentation] Check whether the DUT support hardware write protection 30 | ... mechanism. 31 | Power On 32 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 33 | Login To Linux 34 | Switch To Root User 35 | Check Write Protection Availability 36 | 37 | HWP002.001 Hardware flash write protection enable / disable 38 | [Documentation] Check whether there is a possibility to set and erase 39 | ... hardware write protection on the DUT. 40 | Power On 41 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 42 | Login To Linux 43 | Switch To Root User 44 | Erase Write Protection 45 | Set Write Protection 0x00000000 ${FLASH_LENGTH} 46 | Check Write Protection Status 47 | Compare Write Protection Ranges 0x00000000 ${FLASH_LENGTH} 48 | -------------------------------------------------------------------------------- /dasharo-compatibility/heads-device-tree.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | Resource ../keys-and-keywords/heads-keywords.robot 15 | 16 | # TODO: 17 | # - document which setup/teardown keywords to use and what are they doing 18 | # - go through them and make sure they are doing what the name suggest (not 19 | # exactly the case right now) 20 | Suite Setup Run Keywords 21 | ... Prepare Test Suite 22 | ... AND 23 | ... Skip If not ${DEVICE_TREE_SUPPORT} heads devicetree tests not supported 24 | Suite Teardown Run Keyword 25 | ... Log Out And Close Connection 26 | 27 | 28 | *** Test Cases *** 29 | DVT001.001 Node with coreboot existst 30 | [Documentation] Check whether the node with the coreboot exists in 31 | ... Device Tree. 32 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} DVT001.001 not supported 33 | Power On 34 | Detect Heads Main Menu 35 | Enter Heads Recovery Shell 36 | ${coreboot_node}= Execute Linux Command xxd /sys/firmware/devicetree/base/firmware/coreboot/compatible 37 | Should Not Contain ${coreboot_node} No such file or directory 38 | 39 | DVT002.001 Memory for coreboot is reserved 40 | [Documentation] Check whether the memory for coreboot is reserved. 41 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} DVT002.001 not supported 42 | Power On 43 | Detect Heads Main Menu 44 | Enter Heads Recovery Shell 45 | ${coreboot_region}= Execute Linux Command xxd /sys/firmware/devicetree/base/firmware/coreboot/reg 46 | Should Not Contain ${coreboot_region} No such file or directory 47 | ${reserved_ranges}= Execute Linux Command xxd /sys/firmware/devicetree/base/reserved-memory/ranges 48 | -------------------------------------------------------------------------------- /dasharo-compatibility/petitboot-payload-support.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Resource ../variables.robot 10 | Resource ../keywords.robot 11 | Resource ../keys.robot 12 | 13 | Suite Setup Run Keywords 14 | ... Prepare Test Suite 15 | ... AND 16 | ... Skip If not ${PETITBOOT_PAYLOAD_SUPPORT} Petitboot payload not supported 17 | Suite Teardown Run Keyword 18 | ... Log Out And Close Connection 19 | 20 | 21 | *** Test Cases *** 22 | PBT001.001 Petitboot installation 23 | [Documentation] Check whether the DUT during booting procedure reaches 24 | ... Petitboot menu 25 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} PBT001.001 not supported 26 | Variable Should Exist ${FW_FILE} 27 | Variable Should Exist ${BOOTBLOCK_FILE} 28 | Variable Should Exist ${PNOR_FILE} 29 | Flash Petitboot From OpenBMC ${BOOTBLOCK_FILE} ${FW_FILE} ${PNOR_FILE} 30 | 31 | PBT002.001 Boot into Petitboot 32 | [Documentation] This test verifies that the DUT during booting procedure 33 | ... reaches Petitboot menu. 34 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} PBT002.001 not supported 35 | Power On 36 | Set DUT Response Timeout 200s 37 | Read From Terminal Until Petitboot 38 | 39 | PBT003.001 Read System Information from Petitboot 40 | [Documentation] This test verifies that Petitboot System Information 41 | ... option is available and works correctly. 42 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} PBT003.001 not supported 43 | Power On 44 | Set DUT Response Timeout 200s 45 | Read From Terminal Until Petitboot 46 | Write Bare Into Terminal ${ARROW_DOWN} 47 | Sleep 10s 48 | Read System Information In Petitboot 49 | 50 | PBT004.001 Rescan Devices by Petitboot 51 | [Documentation] This test verifies that Petitboot Rescan Device option 52 | ... is available and works correctly. 53 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} PBT004.001 not supported 54 | Power On 55 | Set DUT Response Timeout 200s 56 | Read From Terminal Until Petitboot 57 | Sleep 2s 58 | Write Bare Into Terminal ${ARROW_DOWN} 59 | Sleep 10s 60 | Rescan Devices In Petitboot 61 | -------------------------------------------------------------------------------- /dasharo-compatibility/platform-hibernation-and-resume.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library DateTime 4 | Library OperatingSystem 5 | Library Process 6 | Library String 7 | Library Telnet timeout=20 seconds 8 | Library SSHLibrary timeout=20 seconds 9 | Library RequestsLibrary 10 | Resource ../variables.robot 11 | Resource ../keywords.robot 12 | Resource ../keys.robot 13 | 14 | Suite Setup Prepare Test Suite 15 | Suite Teardown Log Out And Close Connection 16 | 17 | 18 | *** Test Cases *** 19 | # For now, the test has to be done manually, because of the issue with rtcwake: 20 | # https://github.com/Dasharo/dasharo-issues/issues/485 21 | 22 | # Manual test steps: 23 | # 1. Power on the DUT 24 | # 2. Login to Linux 25 | # 3. Open terminal window and execute following command: "systemctl hibernate" 26 | # 4. When the machine finishes hibernation process, wake it up by pressing the 27 | # power button 28 | 29 | # Expected result: 30 | # 1. The DUT should power back on 31 | # 2. All previously opened windows should remain open 32 | 33 | HIB001.001 Cyclic platform hibernation and resume (Ubuntu) 34 | [Documentation] This test aims to verify that the DUT platform hibernation 35 | ... and resume procedure performed cyclically works correctly 36 | Skip If not ${HIBERNATION_AND_RESUME_SUPPORT} HIB001.001 not supported 37 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} HIB001.001 not supported 38 | ${hibernation_detected_fails}= Set Variable ${0} 39 | Power On 40 | Boot Operating System ubuntu 41 | Login To Linux 42 | Switch To Root User 43 | 44 | FOR ${index} IN RANGE 0 ${HIBERNATION_ITERATIONS_NUMBER} 45 | ${is_hibernation_performed_correctly}= Perform Hibernation Test Using FWTS 46 | IF not ${is_hibernation_performed_correctly} 47 | ${hibernation_detected_fails}= Evaluate ${hibernation_detected_fails} + 1 48 | END 49 | END 50 | Log To Console 51 | ... \n${HIBERNATION_ITERATIONS_NUMBER} iterations were performed to check the hibernation procedure. \n${hibernation_detected_fails} iterations have failed. 52 | IF ${hibernation_detected_fails} > ${HIBERNATION_ALLOWED_FAILS} 53 | FAIL 54 | ... \nTest case HIB001.001 has been marked as failed. \nThe number of detected errors is greater than the number of allowed fails: ${HIBERNATION_ALLOWED_FAILS}. 55 | ELSE 56 | Pass Execution 57 | ... \nTest case HIB001.001 has been marked passed. \nThe number of detected errors is at least the same as the number of allowed fails: ${HIBERNATION_ALLOWED_FAILS}. 58 | END 59 | -------------------------------------------------------------------------------- /dasharo-compatibility/sata-detect.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Resource ../variables.robot 10 | Resource ../keywords.robot 11 | Resource ../keys.robot 12 | 13 | Suite Setup Run Keyword 14 | ... Prepare Test Suite 15 | Suite Teardown Run Keyword 16 | ... Log Out And Close Connection 17 | 18 | 19 | *** Test Cases *** 20 | # TODO 21 | # SAT001.001 SATA support in firmware 22 | 23 | SAT001.201 SATA support in OS (Ubuntu) 24 | [Documentation] This test aims to verify that SATA is detected from OS 25 | ... by using smartctl. 26 | Depends On ${TESTS_IN_FIRMWARE_SUPPORT} 27 | Depends On ${TESTS_IN_UBUNTU_SUPPORT} 28 | Depends On ${SATA_SUPPORT} 29 | 30 | Power On 31 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 32 | Login To Linux 33 | Switch To Root User 34 | Detect Or Install Package smartmontools 35 | 36 | ${lsblk_out}= Execute Command In Terminal lsblk -d -o NAME -n 37 | @{disks}= Split String ${lsblk_out} \n 38 | 39 | FOR ${disk} IN @{disks} 40 | ${out}= Execute Command In Terminal sudo smartctl -i /dev/${disk} 41 | Log ${out} 42 | ${sata_present}= Run Keyword And Return Status Should Contain ${out} SATA Version is: 43 | Pass Execution If '${sata_present}' == 'True' 'SATA disk found, passing test' 44 | END 45 | 46 | Fail No SATA disk was found, failing test 47 | 48 | # TODO 49 | # SAT001.003 SATA support in OS (Windows) 50 | -------------------------------------------------------------------------------- /dasharo-compatibility/uefi-shell.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keyword 20 | ... Prepare Test Suite 21 | Suite Teardown Run Keyword 22 | ... Log Out And Close Connection 23 | 24 | 25 | *** Test Cases *** 26 | USH001.001 UEFI Shell 27 | [Documentation] Check whether the UEFI Shell is available, and whether 28 | ... UEFI Shell was sourced from coreboot image, or from OS drive. 29 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} USH001.001 not supported 30 | Power On 31 | ${boot_menu}= Enter Boot Menu Tianocore And Return Construction 32 | Enter Submenu From Snapshot ${boot_menu} UEFI Shell 33 | Read From Terminal Until Shell> 34 | Write Bare Into Terminal dh 35 | Press Enter 36 | ${shell_dump_handle}= Read From Terminal Until Shell> 37 | 38 | Should Not Contain ${shell_dump_handle} LoadedImage(Shell) 39 | ... UEFI Shell sourced from Dasharo FW image! 40 | Should Contain ${shell_dump_handle} LoadedImage(\\EFI\\Shell\\Shell.efi) 41 | ... UEFI Shell not sourced from EFI partition! 42 | -------------------------------------------------------------------------------- /dasharo-performance/__init__.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Resource ../variables.robot 10 | Resource ../keywords.robot 11 | Resource ../keys.robot 12 | 13 | Suite Setup Prepare Platform 14 | 15 | 16 | *** Keywords *** 17 | Prepare Platform 18 | [Documentation] Keyword allows to flashing the device with the required 19 | ... firmware version. Number of files used in the flashing procedure and 20 | ... method of the flashing depends on the platform specify: 21 | ... -> for the platforms that have external flashing enabled, 22 | ... flashrom utility installed on the RTE is used. 23 | ... -> for the platforms that have BMC, pflash utility built in OBMC is 24 | ... used. 25 | ... -> for the platforms that don't both don't have external flashing 26 | ... enabled and OBMC, internal flashing mechanism is used. 27 | IF '${CONFIG}'=='raptor-cs_talos2' 28 | Variable Should Exist ${FW_FILE} 29 | Variable Should Exist ${BOOTBLOCK_FILE} 30 | Variable Should Exist ${Z_IMAGE_FILE} 31 | Prepare Test Suite 32 | Flash Heads From OpenBMC ${BOOTBLOCK_FILE} ${FW_FILE} ${Z_IMAGE_FILE} 33 | ${fw_ver_file}= Get Firmware Version From Coreboot File ${FW_FILE} 34 | Power On 35 | ${fw_ver_bootblock} ${fw_ver_romstage}= Get Firmware Version From Bootlogs 36 | Log Out And Close Connection 37 | Should Be Equal ${fw_ver_file} ${fw_ver_bootblock} 38 | Should Be Equal ${fw_ver_bootblock} ${fw_ver_romstage} 39 | ELSE 40 | Variable Should Exist ${FW_FILE} 41 | Prepare Test Suite 42 | Flash Firmware ${FW_FILE} 43 | Power Cycle On 44 | ${version}= Get Firmware Version 45 | ${coreboot_version}= Get Firmware Version From Binary ${FW_FILE} 46 | Log Out And Close Connection 47 | Should Contain ${coreboot_version} ${version} 48 | END 49 | -------------------------------------------------------------------------------- /dasharo-security/__init__.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Resource ../variables.robot 10 | Resource ../keywords.robot 11 | Resource ../keys.robot 12 | 13 | Suite Setup Prepare Platform 14 | 15 | 16 | *** Keywords *** 17 | Prepare Platform 18 | [Documentation] Keyword allows to flashing the device with the required 19 | ... firmware version. Number of files used in the flashing procedure and 20 | ... method of the flashing depends on the platform specify: 21 | ... -> for the platforms that have external flashing enabled, 22 | ... flashrom utility installed on the RTE is used. 23 | ... -> for the platforms that have BMC, pflash utility built in OBMC is 24 | ... used. 25 | ... -> for the platforms that don't both don't have external flashing 26 | ... enabled and OBMC, internal flashing mechanism is used. 27 | IF '${CONFIG}'=='raptor-cs_talos2' 28 | Variable Should Exist ${FW_FILE} 29 | Variable Should Exist ${BOOTBLOCK_FILE} 30 | Variable Should Exist ${Z_IMAGE_FILE} 31 | Prepare Test Suite 32 | Flash Heads From OpenBMC ${BOOTBLOCK_FILE} ${FW_FILE} ${Z_IMAGE_FILE} 33 | ${fw_ver_file}= Get Firmware Version From Coreboot File ${FW_FILE} 34 | Power On 35 | ${fw_ver_bootblock} ${fw_ver_romstage}= Get Firmware Version From Bootlogs 36 | Log Out And Close Connection 37 | Should Be Equal ${fw_ver_file} ${fw_ver_bootblock} 38 | Should Be Equal ${fw_ver_bootblock} ${fw_ver_romstage} 39 | ELSE 40 | Variable Should Exist ${FW_FILE} 41 | Prepare Test Suite 42 | Flash Firmware ${FW_FILE} 43 | Power Cycle On 44 | ${version}= Get Firmware Version 45 | ${coreboot_version}= Get Firmware Version From Binary ${FW_FILE} 46 | Log Out And Close Connection 47 | Should Contain ${coreboot_version} ${version} 48 | END 49 | -------------------------------------------------------------------------------- /dasharo-security/me-neuter-static.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keywords 20 | ... Prepare Test Suite 21 | ... AND 22 | ... Skip If not ${ME_STATICALLY_DISABLED} ME is not statically disabled for this platform 23 | Suite Teardown Run Keyword 24 | ... Log Out And Close Connection 25 | 26 | 27 | *** Test Cases *** 28 | MES001.001 Check if ME is statically disabled 29 | [Documentation] Check whether the Intel ME is disabled at build time. 30 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} MES001.001 not supported 31 | Power On 32 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 33 | Login To Linux 34 | Switch To Root User 35 | ${result}= Check ME Out 36 | Should Not Be Equal As Strings ${result} Enabled 37 | -------------------------------------------------------------------------------- /dasharo-security/network-stack.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keywords 20 | ... Prepare Test Suite 21 | ... AND 22 | ... Skip If not ${DASHARO_NETWORKING_MENU_SUPPORT} Dasharo Networking menu not supported 23 | Suite Teardown Run Keyword 24 | ... Log Out And Close Connection 25 | 26 | 27 | *** Test Cases *** 28 | NBA001.001 Enable Network Boot (firmware) 29 | [Documentation] This test aims to verify that the Network Boot option 30 | ... might be enabled. If this option is activated, an additional option 31 | ... in the Boot menu which allows to boot the system from iPXE servers 32 | ... will appear. 33 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} NBA001.001 not supported 34 | IF '${DUT_CONNECTION_METHOD}' == 'pikvm' Remap Keys Variables To PiKVM 35 | Set UEFI Option NetworkBoot ${TRUE} 36 | 37 | ${boot_menu}= Enter Boot Menu Tianocore And Return Construction 38 | Should Contain ${boot_menu} ${IPXE_BOOT_ENTRY} 39 | 40 | NBA002.001 Disable Network Boot (firmware) 41 | [Documentation] This test aims to verify that the Network Boot option 42 | ... might be disabled. If this option is deactivated, an additional option 43 | ... in the Boot menu which allows to boot the system from iPXE servers 44 | ... will be hidden. 45 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} NBA002.001 not supported 46 | IF '${DUT_CONNECTION_METHOD}' == 'pikvm' Remap Keys Variables To PiKVM 47 | Set UEFI Option NetworkBoot ${FALSE} 48 | 49 | ${boot_menu}= Enter Boot Menu Tianocore And Return Construction 50 | Should Not Contain ${boot_menu} ${IPXE_BOOT_ENTRY} 51 | -------------------------------------------------------------------------------- /dasharo-security/option-rom.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 3 | Library SSHLibrary timeout=90 seconds 4 | Library RequestsLibrary 5 | Resource ../keywords.robot 6 | Resource ../lib/bios/menus.robot 7 | Resource ../variables.robot 8 | Resource ../keys.robot 9 | 10 | Suite Setup Run Keyword 11 | ... Prepare Test Suite 12 | Suite Teardown Run Keyword 13 | ... Log Out And Close Connection 14 | 15 | 16 | *** Test Cases *** 17 | SOR001.001 Check that all options in OptionROMs are available 18 | [Documentation] This test checks if all OptionROM options are available 19 | Skip If not ${DASHARO_PCI_PCIE_MENU_SUPPORT} SOR001.001 not supported 20 | Power On 21 | ${setup_menu}= Enter Setup Menu Tianocore And Return Construction 22 | ${dasharo_menu}= Enter Dasharo System Features ${setup_menu} 23 | ${menu_construction}= Enter Dasharo Submenu ${dasharo_menu} PCI/PCIe Configuration 24 | Enter Submenu From Snapshot ${menu_construction} OptionROM Execution Policy 25 | ${out}= Read From Terminal Until ---/ 26 | Log ${out} 27 | ${opts}= Extract Strings From Frame ${out} 28 | Log ${opts} 29 | Should Be Equal As Strings ${opts}[0] Disable all OptionROMs loading 30 | Should Be Equal As Strings ${opts}[1] Enable all OptionROMs loading 31 | Should Be Equal As Strings ${opts}[2] Enable OptionROM loading only on GPUs 32 | -------------------------------------------------------------------------------- /dasharo-security/rebar.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 3 | Library SSHLibrary timeout=90 seconds 4 | Library RequestsLibrary 5 | Resource ../keywords.robot 6 | Resource ../lib/bios/menus.robot 7 | Resource ../variables.robot 8 | Resource ../keys.robot 9 | 10 | Suite Setup Run Keyword 11 | ... Prepare Test Suite 12 | Suite Teardown Run Keyword 13 | ... Log Out And Close Connection 14 | 15 | 16 | *** Test Cases *** 17 | RBE001.001 Check if Resizeable BARs option is present 18 | [Documentation] This test checks that Resizable BAR option is available 19 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} RBE001.001 not supported 20 | Skip If not ${DASHARO_PCI_PCIE_MENU_SUPPORT} RBE001.001 not supported 21 | Skip If not ${DASHARO_PCIE_REBAR_SUPPORT} RBE001.001 not supported 22 | ${out}= Get UEFI Option PCIeResizeableBarsEnabled 23 | IF '${out}' not in ['True', 'False'] Fail Option not found 24 | -------------------------------------------------------------------------------- /dasharo-security/tcg-opal-disk-password.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | # TODO: maybe have a single file to include if we need to include the same 10 | # stuff in all test cases 11 | Resource ../variables.robot 12 | Resource ../keywords.robot 13 | Resource ../keys.robot 14 | 15 | # TODO: 16 | # - document which setup/teardown keywords to use and what are they doing 17 | # - go threough them and make sure they are doing what the name suggest (not 18 | # exactly the case right now) 19 | Suite Setup Run Keyword 20 | ... Prepare Test Suite 21 | Suite Teardown Run Keyword 22 | ... Log Out And Close Connection 23 | 24 | 25 | *** Test Cases *** 26 | DMP001.001 TCG OPAL disk password set and check 27 | [Documentation] This test doesn't have documentation 28 | Skip If not ${TESTS_IN_FIRMWARE_SUPPORT} DMP001.001 not supported 29 | Skip If not ${TCG_OPAL_DISK_PASSWORD_SUPPORT} DMP001.001 not supported 30 | Power On 31 | ${setup_menu}= Enter Setup Menu Tianocore And Return Construction 32 | ${device_mgr_menu}= Enter Submenu From Snapshot And Return Construction 33 | ... ${setup_menu} 34 | ... Device Manager 35 | ${tcg_drive_menu}= Enter Submenu From Snapshot And Return Construction 36 | ... ${device_mgr_menu} 37 | ... TCG Drive Management 38 | # test assumes that only the first disk is bootable or there is only 39 | # one disk 40 | ${has_connected_disks}= Run Keyword And Return Status 41 | ... Should Not Contain ${tcg_drive_menu} No disks connected to system 42 | IF not ${has_connected_disks} 43 | Fail Cannot test disk password feature, no supported disk connected to the system 44 | END 45 | Press Key N Times 1 ${ENTER} 46 | Log Enable Feature 47 | Press Key N Times And Enter 2 ${ARROW_DOWN} 48 | Save Changes And Reset 49 | @{password}= Set Variable 1 2 3 50 | Type In New Disk Password ${password} 51 | ${setup_menu}= Enter Setup Menu Tianocore And Return Construction 52 | Enter Submenu From Snapshot ${setup_menu} Reset 53 | Log Test if disk password works 54 | Type In Disk Password ${password} 55 | Remove Disk Password ${password} 56 | -------------------------------------------------------------------------------- /dasharo-stability/__init__.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Resource ../variables.robot 10 | Resource ../keywords.robot 11 | Resource ../keys.robot 12 | 13 | Suite Setup Prepare Platform 14 | 15 | 16 | *** Keywords *** 17 | Prepare Platform 18 | [Documentation] Keyword allows to flashing the device with the required 19 | ... firmware version. Number of files used in the flashing procedure and 20 | ... method of the flashing depends on the platform specify: 21 | ... -> for the platforms that have external flashing enabled, 22 | ... flashrom utility installed on the RTE is used. 23 | ... -> for the platforms that have BMC, pflash utility built in OBMC is 24 | ... used. 25 | ... -> for the platforms that don't both don't have external flashing 26 | ... enabled and OBMC, internal flashing mechanism is used. 27 | IF '${CONFIG}'=='raptor-cs_talos2' 28 | Variable Should Exist ${FW_FILE} 29 | Variable Should Exist ${BOOTBLOCK_FILE} 30 | Variable Should Exist ${Z_IMAGE_FILE} 31 | Prepare Test Suite 32 | Flash Heads From OpenBMC ${BOOTBLOCK_FILE} ${FW_FILE} ${Z_IMAGE_FILE} 33 | ${fw_ver_file}= Get Firmware Version From Coreboot File ${FW_FILE} 34 | Power On 35 | ${fw_ver_bootblock} ${fw_ver_romstage}= Get Firmware Version From Bootlogs 36 | Log Out And Close Connection 37 | Should Be Equal ${fw_ver_file} ${fw_ver_bootblock} 38 | Should Be Equal ${fw_ver_bootblock} ${fw_ver_romstage} 39 | ELSE 40 | Variable Should Exist ${FW_FILE} 41 | Prepare Test Suite 42 | Flash Firmware ${FW_FILE} 43 | Power Cycle On 44 | ${version}= Get Firmware Version 45 | ${coreboot_version}= Get Firmware Version From Binary ${FW_FILE} 46 | Log Out And Close Connection 47 | Should Contain ${coreboot_version} ${version} 48 | END 49 | -------------------------------------------------------------------------------- /dasharo-stability/capsule-update-files/CapsuleApp.efi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dasharo/open-source-firmware-validation/bf52b932be8b6b9a65856d2352a4144abe089a4a/dasharo-stability/capsule-update-files/CapsuleApp.efi -------------------------------------------------------------------------------- /dasharo-stability/capsule-update-files/CapsuleApp.efi.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2024 3mdeb 2 | 3 | SPDX-License-Identifier: Apache-2.0 4 | -------------------------------------------------------------------------------- /dasharo-stability/capsule-update-files/romhole: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dasharo/open-source-firmware-validation/bf52b932be8b6b9a65856d2352a4144abe089a4a/dasharo-stability/capsule-update-files/romhole -------------------------------------------------------------------------------- /dasharo-stability/capsule-update-files/romhole.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2024 3mdeb 2 | 3 | SPDX-License-Identifier: Apache-2.0 4 | -------------------------------------------------------------------------------- /dasharo-stability/power-on-keyword-stress.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Resource ../variables.robot 10 | Resource ../keywords.robot 11 | Resource ../keys.robot 12 | 13 | Suite Setup Run Keyword 14 | ... Prepare Test Suite 15 | Suite Teardown Run Keyword 16 | ... Log Out And Close Connection 17 | 18 | 19 | *** Test Cases *** 20 | Stress test Power On keyword for stability when in firmware 21 | # Set DUT Response Timeout 30s 22 | ${failures}= Set Variable 0 23 | FOR ${count} IN RANGE 10 24 | Log To Console \nIteration number: ${count} 25 | ${result}= Run Keyword And Ignore Error Test Power On Kwd In Firmware 26 | Log To Console ${SPACE}Result: ${result} 27 | IF '${result}[0]' == 'FAIL' 28 | ${failures}= Evaluate ${failures} + 1 29 | END 30 | END 31 | Log To Console \nFailures: ${failures} 32 | Should Be Equal As Integers ${failures} 0 msg=No failures were expected 33 | 34 | Stress test Power On keyword for stability when in OS 35 | # Set DUT Response Timeout 30s 36 | ${failures}= Set Variable 0 37 | FOR ${count} IN RANGE 10 38 | Log To Console \nIteration number: ${count} 39 | ${result}= Run Keyword And Ignore Error Test Power On Kwd In OS 40 | Log To Console ${SPACE}Result: ${result} 41 | IF '${result}[0]' == 'FAIL' 42 | ${failures}= Evaluate ${failures} + 1 43 | END 44 | END 45 | Log To Console \nFailures: ${failures} 46 | Should Be Equal As Integers ${failures} 0 msg=No failures were expected 47 | 48 | 49 | *** Keywords *** 50 | Test Power On Kwd In Firmware 51 | Power On 52 | ${setup_menu}= Enter Setup Menu Tianocore And Return Construction 53 | ${dasharo_menu}= Enter Dasharo System Features ${setup_menu} 54 | Sleep 10s 55 | 56 | Test Power On Kwd In OS 57 | Power On 58 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 59 | Login To Linux 60 | Switch To Root User 61 | Execute Command In Terminal sleep 10 62 | -------------------------------------------------------------------------------- /dl-cache/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dasharo/open-source-firmware-validation/bf52b932be8b6b9a65856d2352a4144abe089a4a/dl-cache/.gitkeep -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # OSFV documentation README 8 | 9 | Introducing new platform to the Open Source Firmware Validation infrastructure 10 | requires acquiring crucial parameters of the Device Under Tests (DUT). To 11 | leverage this process, users can refer to the following diagrams and answer the 12 | accompanying questions. 13 | 14 | ## Power State requirements 15 | 16 | ![power-state](./img/power-state-v0.1.0.svg) 17 | 18 | ## Power Supply requirements 19 | 20 | ![power-supply](./img/power-supply-v0.1.0.svg) 21 | 22 | ## Serial requirements 23 | 24 | ![serial](./img/serial-v0.1.0.svg) 25 | -------------------------------------------------------------------------------- /docs/dts-tests.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # DTS tests 8 | 9 | This document describes current DTS tests coverage. Tests planned: 10 | 11 | * E2E tests; 12 | * Unit tests. 13 | 14 | ## E2E tests 15 | 16 | E2E - End to End tests, tests that verify how DTS goes from start to end for 17 | every user workflow (e.g. installation, update, etc.) for every platform. 18 | 19 | Location in OSFV: `dts/dts-e2e.robot`. 20 | 21 | These tests include modifications for DTS platform emulation so the tests 22 | could be launched on Qemu. Then every test case choose the workflow by 23 | choosing DTS menu option, and provides credentials (if necessary). So, the 24 | start conditions are: platform configuration and workflow selection. 25 | 26 | Then every test case goes through the chosen workflow and checks for expected 27 | behavior. If everything goes as expected - test case passes, otherwise - it 28 | fails. 29 | 30 | Control variables: 31 | 32 | * `dts_ipxe_link`: useful if you are testing DTS which is not released yet. Just 33 | put here a link to your script which will load your DTS. By default DTS is 34 | being booted from `dl.3mdeb.com`; 35 | * `dpp_email`, `dpp_password`: for DPP credentials, if tests need them. 36 | 37 | Launching example: 38 | 39 | ```bash 40 | robot -b command_log.txt -v snipeit:no -L TRACE -v config:qemu -v rte_ip:127.0.0.1 -v boot_dts_from_ipxe_shell:True -v dts_ipxe_link:http://192.168.0.102:8080/ipxe -v dpp_email:'EMAIL' -v dpp_password:'PASSWORD' -t "E2E006.002*" dts/dts-e2e.robot 41 | ``` 42 | 43 | > Note: replace `EMAIL` and `PASSWORD` with appropriate credentials if required. 44 | > `http://192.168.0.102:8080/ipxe` with your DTS iPXE 45 | > script link. 46 | 47 | ## Unit tests 48 | 49 | These tests have not been implemented yet. 50 | -------------------------------------------------------------------------------- /docs/img/osfv_cli_after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dasharo/open-source-firmware-validation/bf52b932be8b6b9a65856d2352a4144abe089a4a/docs/img/osfv_cli_after.png -------------------------------------------------------------------------------- /docs/img/osfv_dcu_integration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dasharo/open-source-firmware-validation/bf52b932be8b6b9a65856d2352a4144abe089a4a/docs/img/osfv_dcu_integration.png -------------------------------------------------------------------------------- /docs/img/platform-configs-protectli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dasharo/open-source-firmware-validation/bf52b932be8b6b9a65856d2352a4144abe089a4a/docs/img/platform-configs-protectli.png -------------------------------------------------------------------------------- /docs/raptor-talos-2.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # RCS Talos II platform 8 | 9 | When running tests on Talos II platform use the following commands: 10 | 11 | **WARNING** The support state of this platform in the `main` branch may vary. 12 | We should have a single documentation for all platforms. This effort is tracked in 13 | [this issue](https://github.com/Dasharo/open-source-firmware-validation/issues/112). 14 | 15 | * For running a single test case: 16 | 17 | ```bash 18 | robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ 19 | -v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ 20 | -t $TEST_CASE_ID $TEST_MODULE/$TEST_SUITE 21 | ``` 22 | 23 | * For running single test suite: 24 | 25 | ```bash 26 | robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ 27 | -v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ 28 | $TEST_MODULE/$TEST_SUITE 29 | ``` 30 | 31 | * For running single test module: 32 | 33 | ```bash 34 | robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ 35 | -v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ 36 | ./$TEST_MODULE 37 | ``` 38 | 39 | Parameters should be defined as follows: 40 | 41 | * $DEVICE_IP - OBMC IP address (currently `192.168.20.9`), 42 | * $FW_FILE - path to and name of the coreboot firmware file, 43 | * $BOOTBLOCK_FILE - path to and name of the bootblock file, 44 | * $ZIMAGE_FILE - path to and name of the zImage file, 45 | * $PNOR_FILE - path to and name of the pnor file, 46 | * $TEST_MODULE - name of the test module (i.e. `dasharo-compatibility`), 47 | * $TEST_SUITE - name of the test suite (i.e. `coreboot-base-port`), 48 | * $TEST_CASE_ID - ID of the requested to run test case (i.e. `CBP001.001`). 49 | Note that after test case ID asterisk should be added. This is necessary due 50 | to the construction of the flag `-t` (or `--test`) 51 | 52 | You can also run tests with `-v snipeit:no` in order to skip checking whether 53 | the platform is available on snipeit. 54 | -------------------------------------------------------------------------------- /docs/troubleshooting.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Troubleshooting 8 | 9 | ## Tests fail on 'Suite Setup' - 'To Boot Directly' not found 10 | 11 | If DUT is configured to use a PiKVM it is important to make sure that the serial 12 | output is enabled in the firmware and this setting is turned on by default. 13 | This issue is not related to PiKVM itself. It will occur on any DUT that uses 14 | serial connection. However PiKVM may make it look like everything is working 15 | correctly (video output etc). On some platforms like example on the MSI 16 | boards, the default setting for the Serial Redirection is off. This is why 17 | tests that flash firmware need to have the fw file modified to have the serial 18 | enabled. Otherwise every time firmware is flashed by the test the DUT setup 19 | will be broken. To prepare a modified fw file use: 20 | 21 | ```shell 22 | ./dcu variable ./test/data/firmware.rom --set SerialRedirection --value Enabled 23 | ``` 24 | -------------------------------------------------------------------------------- /docs/uml/power-state-v0.1.0.puml: -------------------------------------------------------------------------------- 1 | ' SPDX-FileCopyrightText: 2024 3mdeb 2 | ' 3 | ' SPDX-License-Identifier: Apache-2.0 4 | 5 | @startuml 6 | 7 | title OSFV Power state requirements - v0.1.0\nHigh priority (tells us whether we can implement some form of automatic power control) 8 | 9 | skinparam participantBorderColor #38d430 10 | skinparam participantPadding 0 11 | skinparam SequenceParticipantBorderThickness 3 12 | skinparam participantBackgroundColor #white 13 | 14 | participant "Power state after\npower failure?" as PowerState 15 | participant "Power/reset buttons\nexposed on GPIO headers?" as PowerGPIO 16 | participant "Is there another way to\nconnect to those signals?" as PowerOther 17 | 18 | skinparam participantBackgroundColor #38d430 19 | 20 | participant "Connect them to\nRTE GPIO header" as output1 21 | participant "Power/reset buttons control is not\nmandatory (but is still useful for\ntests such as waking up from suspend)" as output2 22 | participant "Power control cannot be\nimplemented. Manual power\ncontrol must be used." as output3 23 | 24 | PowerState -> PowerGPIO: Powered off 25 | PowerGPIO -> output1: Yes 26 | PowerOther -> output1: Yes 27 | 28 | PowerState --> output2 29 | PowerGPIO --> PowerOther: No 30 | PowerOther --> output3: No 31 | 32 | @enduml 33 | -------------------------------------------------------------------------------- /docs/uml/power-supply-v0.1.0.puml: -------------------------------------------------------------------------------- 1 | ' SPDX-FileCopyrightText: 2024 3mdeb 2 | ' 3 | ' SPDX-License-Identifier: Apache-2.0 4 | 5 | @startuml 6 | 7 | title OSFV Power supply requirements - v0.1.0\nLow priority (tells us how we need to implement the connections, but does not limit the test scope) 8 | 9 | skinparam participantBorderColor #38d430 10 | skinparam participantPadding 0 11 | skinparam SequenceParticipantBorderThickness 3 12 | skinparam participantBackgroundColor #white 13 | 14 | participant "Power supply fits into\nRTE DC barrel jack?" as PowerSupply 15 | 16 | skinparam participantBackgroundColor #38d430 17 | 18 | participant "Use RTE relay for\npower supply control" as output1 19 | participant "Use Sonoff for\npower supply control" as output2 20 | 21 | PowerSupply -> output1: Yes 22 | PowerSupply --> output2: No 23 | 24 | @enduml 25 | -------------------------------------------------------------------------------- /docs/uml/serial-v0.1.0.puml: -------------------------------------------------------------------------------- 1 | ' SPDX-FileCopyrightText: 2024 3mdeb 2 | ' 3 | ' SPDX-License-Identifier: Apache-2.0 4 | 5 | @startuml 6 | 7 | title OSFV serial requirements - v0.1.0\nHigh priority (tells us whether we can execute any firmware-level tests at all, or just OS-level tests) 8 | 9 | skinparam participantBorderColor #38d430 10 | skinparam participantPadding 0 11 | skinparam SequenceParticipantBorderThickness 3 12 | skinparam participantBackgroundColor #white 13 | 14 | participant "Serial port present?\n(hardware interface)" as SerialPort 15 | participant "BIOS serial console\nredirection possible?" as BIOSConsole 16 | participant "RX and TX redirection\npossible?" as RXTXRedirection 17 | 18 | skinparam participantBackgroundColor #38d430 19 | 20 | participant "Use ser2net for both\ninput and output" as output1 21 | participant "Use ser2net for gathering output.\nUse USB keyboard emulation for input" as output2 22 | participant "Firmware tests based on video\noutput and USB keyboard input.\nCURRENTLY VIDEO OCR NOT SUPPORTED." as output3 23 | 24 | note right of output3 25 | No firmware-level tests 26 | can be executed. 27 | Only tests from OS. 28 | end note 29 | 30 | SerialPort -> BIOSConsole: Yes 31 | BIOSConsole -> RXTXRedirection: Yes 32 | RXTXRedirection -> output1: Yes 33 | RXTXRedirection -> output2: TX only (MSI, laptops with serial over EC) 34 | RXTXRedirection -> output3: RX only (No such case so far) 35 | 36 | SerialPort --> output3: No 37 | BIOSConsole --> output3: No 38 | 39 | @enduml 40 | -------------------------------------------------------------------------------- /drive_letters.ps1: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | Get-WmiObject -Query "SELECT * FROM Win32_DiskDrive" | ForEach-Object { 6 | $disk = $_ 7 | $partitions = "ASSOCIATORS OF {Win32_DiskDrive.DeviceID='$($disk.DeviceID)'} WHERE AssocClass = Win32_DiskDriveToDiskPartition" 8 | Get-WmiObject -Query $partitions | ForEach-Object { 9 | $partition = $_ 10 | $logicalDisks = "ASSOCIATORS OF {Win32_DiskPartition.DeviceID='$($partition.DeviceID)'} WHERE AssocClass = Win32_LogicalDiskToPartition" 11 | Get-WmiObject -Query $logicalDisks | ForEach-Object { 12 | $logicalDisk = $_ 13 | "$($logicalDisk.DeviceID) $($disk.Model)" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /get_results_from_logs.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | import os 6 | import sys 7 | import xml.etree.ElementTree as ET 8 | 9 | platform = sys.argv[1] 10 | 11 | with open("test_cases_statuses_daily.csv", "w") as csv_file: 12 | csv_file.write("Test case,Result\n") 13 | for file in os.listdir(platform): 14 | if file.endswith(".xml"): 15 | tree = ET.parse(os.path.join(platform, file)) 16 | root = tree.getroot() 17 | for test in root.iter("test"): 18 | name = test.get("name") 19 | name = name.replace(",", "") 20 | result = test[-1].get("status") 21 | data = name + "," + result + "\n" 22 | csv_file.write(data) 23 | -------------------------------------------------------------------------------- /keys-and-keywords/heads-keywords.robot: -------------------------------------------------------------------------------- 1 | *** Keywords *** 2 | Detect Heads Main Menu 3 | [Documentation] Keyword waits and detects Heads main menu. Content of 4 | ... main menu window is returned. 5 | Set DUT Response Timeout 300s 6 | Read From Terminal Until Heads Boot Menu 7 | ${output}= Read From Terminal Until ┘ 8 | Sleep 1s 9 | RETURN ${output} 10 | 11 | Enter Heads Recovery Shell 12 | [Documentation] Keyword allows to enter Heads recovery shell from Heads 13 | ... main menu. 14 | Write Bare Into Terminal o 15 | Sleep 0.5s 16 | Write Bare Into Terminal ${ENTER} 17 | Read From Terminal Until ┘ 18 | Sleep 0.5s 19 | Write Bare Into Terminal x 20 | Sleep 0.5s 21 | Write Bare Into Terminal ${ENTER} 22 | Sleep 0.5s 23 | Read From Terminal Until User requested recovery shell 24 | Set Prompt For Terminal ${HEADS_PROMPT} 25 | Read From Terminal Until Prompt 26 | 27 | Get TPM PCRs 28 | [Documentation] Keyword allows to gets and returns TPM PCRs from Heads 29 | ... recovery shell. 30 | Write Into Terminal cat /sys/class/tpm/tpm0/pcrs 31 | ${output}= Read From Terminal Until Prompt 32 | @{output_split}= Split String ${output} separator=\r\n 33 | @{tpm_pcrs}= Create List 34 | FOR ${line} IN @{output_split} 35 | IF "${line}"!="${EMPTY}" and "${line}"!="${SPACE}" 36 | Append To List ${tpm_pcrs} ${line[:-1]} 37 | END 38 | END 39 | RETURN ${tpm_pcrs} 40 | 41 | Reboot Platform From Shell 42 | [Documentation] Keyword allows to reboot platform by executing 'reboot' 43 | ... from Heads shell. 'Execute reboot command' can't be used with Heads 44 | ... because sysrq is used and output differs. 45 | Write Into Terminal reboot 46 | Read From Terminal Until sysrq: Resetting 47 | -------------------------------------------------------------------------------- /keys-and-keywords/totp.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | import pyotp 6 | 7 | 8 | def get_totp_from_uri(uri): 9 | totp = pyotp.parse_uri(uri) 10 | return totp.now() 11 | -------------------------------------------------------------------------------- /keys-and-keywords/ubuntu-keywords.robot: -------------------------------------------------------------------------------- 1 | *** Keywords *** 2 | Detect Or Install Package 3 | [Documentation] Keyword allows to check whether the package, that is 4 | ... necessary to run the test case, has already been installed on 5 | ... the system, otherwise forces it to be installed. 6 | [Arguments] ${package} 7 | ${is_package_installed}= Set Variable ${FALSE} 8 | Log To Console \nChecking if ${package} is installed... 9 | ${is_package_installed}= Check If Package Is Installed ${package} 10 | IF ${is_package_installed} 11 | Log To Console \nPackage ${package} is installed 12 | ELSE 13 | Log To Console \nPackage ${package} is not installed 14 | END 15 | IF ${is_package_installed} RETURN 16 | Log To Console \nInstalling required package (${package})... 17 | Install Package ${package} 18 | Sleep 10s 19 | ${is_package_installed}= Check If Package Is Installed ${package} 20 | IF ${is_package_installed}=='False' 21 | FAIL \nRequired package (${package}) cannot be installed 22 | END 23 | Log To Console \nRequired package (${package}) installed successfully 24 | 25 | Check If Package Is Installed 26 | [Documentation] Keyword allows to check whether the package, that is 27 | ... necessary to run the test case, has already been installed on the 28 | ... system. 29 | [Arguments] ${package} 30 | ${output}= Execute Linux Command dpkg --list ${package} | cat 31 | ${status}= Evaluate "no packages found matching" in """${output}""" 32 | ${is_installed}= Set Variable If ${status} ${FALSE} ${TRUE} 33 | RETURN ${is_installed} 34 | 35 | Install Package 36 | [Documentation] Keyword allows to install the package, that is necessary 37 | ... to run the test case 38 | [Arguments] ${package} 39 | Set DUT Response Timeout 600s 40 | Write Into Terminal apt-get install --assume-yes ${package} 41 | Read From Terminal Until Prompt 42 | Set DUT Response Timeout 30s 43 | 44 | Get Logging Level 45 | [Documentation] This keyword returns TRUE if logging is disabled and 46 | ... FALSE if it is not. 47 | ${ret}= Execute Linux Command cut -f1 /proc/sys/kernel/printk 48 | 49 | RETURN ${ret} 50 | 51 | Set Logging Level 52 | [Documentation] This keyword sets the logging level to given value [0; 7] 53 | [Arguments] ${level} 54 | Execute Linux Command echo "kernel.printk = ${level} 4 1 7" > /etc/sysctl/d/10-console-messages.conf 55 | Execute Linux Command sed -i '/kernel\.printk =/d' /etc/sysctl.conf 56 | Execute Linux Command echo "kernel.printk = ${level} 4 1 7" >> /etc/sysctl.conf 57 | Execute Linux Command sysctl --system 58 | -------------------------------------------------------------------------------- /keys.robot: -------------------------------------------------------------------------------- 1 | *** Variables *** 2 | ${ARROW_UP}= \x1b\x5b\x41 3 | ${ARROW_DOWN}= \x1b\x5b\x42 4 | ${ARROW_RIGHT}= \x1b\x5b\x43 5 | ${ARROW_LEFT}= \x1b\x5b\x44 6 | ${F1}= \x1b\x4f\x50 7 | ${F2}= \x1b\x4f\x51 8 | ${F3}= \x1b\x4f\x52 9 | ${F4}= \x1b\x4f\x53 10 | ${F5}= \x1b\x5b\x31\x35\x7e 11 | ${F6}= \x1b\x5b\x31\x37\x7e 12 | ${F7}= \x1b\x5b\x31\x38\x7e 13 | ${F8}= \x1b\x5b\x31\x39\x7e 14 | ${F9}= \x1b\x5b\x32\x30\x7e 15 | ${F10}= \x1b\x5b\x32\x31\x7e 16 | ${F11}= \x1b\x5b\x32\x33\x7e 17 | ${F12}= \x1b\x5b\x32\x34\x7e 18 | ${CTRL_B}= \x02 19 | ${CTRL_C}= \x03 20 | ${CTRL_D}= \x04 21 | ${ESC}= \x1b 22 | ${ENTER}= \x0d 23 | ${BACKSPACE}= \x08 24 | ${KEY_SPACE}= \x20 25 | ${DELETE}= \x1b\x5b\x33\x7e 26 | ${KEY_PLUS}= \x2b 27 | -------------------------------------------------------------------------------- /lib/cbmem.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Collection of keywords for getting boot time from cbmem in linux 3 | 4 | Resource ../keywords.robot 5 | 6 | 7 | *** Keywords *** 8 | Get Boot Time From Cbmem 9 | [Documentation] Calculates boot time based on cbmem timestamps 10 | # fix for LT1000 and protectli platforms (output without tabs) 11 | ${out_cbmem}= Execute Command In Terminal cbmem -T 12 | Should Not Contain 13 | ... ${out_cbmem} 14 | ... Operation not permitted 15 | ... msg=Cannot get cbmem log. Probably Secure Boot is enabled (kernel lockdown mode). 16 | ${lines}= Split To Lines ${out_cbmem} 17 | ${first_line}= Get From List ${lines} 0 18 | ${last_line}= Get From List ${lines} -1 19 | ${first_timestamp}= Get Timestamp From Cbmem Log ${first_line} 20 | ${last_timestamp}= Get Timestamp From Cbmem Log ${last_line} 21 | ${boot_time}= Evaluate (${last_timestamp} - ${first_timestamp}) / 1000000 22 | RETURN ${boot_time} 23 | 24 | Get Timestamp From Cbmem Log 25 | [Documentation] Returns timestamp from a single cbmem -T log line 26 | [Arguments] ${line} 27 | ${columns}= Split String ${line} 28 | ${timestamp}= Get From List ${columns} 1 29 | RETURN ${timestamp} 30 | 31 | Calculate Boot Time Statistics 32 | [Documentation] Calculates the standard deviation, min, max of 33 | ... boot time measurements 34 | [Arguments] ${samples} 35 | ${iterations}= Get Length ${samples} 36 | ${standard_deviation}= Set Variable 0 37 | ${min}= Set Variable 99999999 38 | ${max}= Set Variable 0 39 | ${average}= Set Variable 0 40 | 41 | FOR ${index} IN RANGE 0 ${iterations} 42 | ${duration}= Get From List ${samples} ${index} 43 | ${min}= Evaluate 44 | ... ${min} if float(${min}) < float(${duration}) else ${duration} 45 | ${max}= Evaluate 46 | ... ${max} if float(${max}) > float(${duration}) else ${duration} 47 | ${average}= Evaluate ${average} + ${duration} 48 | END 49 | ${average}= Evaluate ${average}/${iterations} 50 | 51 | FOR ${index} IN RANGE 0 ${iterations} 52 | ${duration}= Get From List ${samples} ${index} 53 | ${diff}= Evaluate (${duration} - ${average}) 54 | ${diff}= Evaluate ${diff}*${diff} 55 | ${standard_deviation}= Evaluate ${standard_deviation} + ${diff} 56 | END 57 | ${standard_deviation}= Evaluate 58 | ... math.sqrt(${standard_deviation} / ${iterations}) 59 | 60 | RETURN ${min} ${max} ${average} ${standard_deviation} 61 | -------------------------------------------------------------------------------- /lib/dmidecode-lib.robot: -------------------------------------------------------------------------------- 1 | *** Keywords *** 2 | Check Firmware Version 3 | [Documentation] Keyword allows to check firmware version via dmidecode 4 | [Arguments] ${expected_version}=${FW_VERSION} 5 | ${output}= Execute Command In Terminal dmidecode -t 0 6 | Should Contain ${output} ${expected_version} 7 | 8 | Get Firmware UUID 9 | [Documentation] Keyword allows to check firmware UUID via dmidecode 10 | ${uuid}= Execute Command In Terminal dmidecode | grep UUID | awk -F': ' '{print $2}' 11 | RETURN ${uuid} 12 | 13 | Get Firmware Serial Number 14 | [Documentation] Keyword allows to check firmware serial number via 15 | ... dmidecode 16 | ${serial_no}= Execute Command In Terminal dmidecode | grep Serial | awk -F': ' 'NR == 1 {print $2}' 17 | RETURN ${serial_no} 18 | -------------------------------------------------------------------------------- /lib/fan_curve_tests/fan_curve_tests.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2025 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | import os 6 | 7 | import matplotlib.pyplot as plt 8 | import pandas 9 | from robot.api.deco import keyword 10 | from robot.libraries.BuiltIn import BuiltIn 11 | 12 | 13 | @keyword("Plot Fan Curve") 14 | def plot_fan_curve(file_path, title): 15 | in_file = file_path + ".csv" 16 | out_file = file_path + ".png" 17 | 18 | data = pandas.read_csv(in_file) 19 | temp = data["temp"] 20 | speed = data["speed"] 21 | tolerance = data["tolerance"] 22 | expected = data["expected"] 23 | 24 | plt.title(title) 25 | plt.xlabel("CPU temperature [°C]") 26 | plt.ylabel("Fan speed") 27 | plt.errorbar(temp, speed, label="speed", fmt=".") 28 | # plt.plot(temp, speed-tolerance, label="min", marker=".") 29 | # plt.plot(temp, speed+tolerance, label="max", marker=".") 30 | plt.errorbar( 31 | temp, 32 | expected, 33 | yerr=tolerance, 34 | label="expected", 35 | fmt=".", 36 | capsize=3, 37 | capthick=0.5, 38 | linewidth=0.5, 39 | ) 40 | plt.legend() 41 | plt.savefig(out_file) 42 | plt.clf() 43 | 44 | out_filename = os.path.basename(out_file) 45 | return out_filename 46 | 47 | 48 | def _get_over_tolerance(measurement): 49 | diff = abs(measurement["speed"] - measurement["expected"]) 50 | over_tolerance = max(diff - measurement["tolerance"], 0) 51 | return over_tolerance 52 | 53 | 54 | def _get_diff_from_tolerance(measurement): 55 | diff = abs(measurement["speed"] - measurement["expected"]) 56 | # Measurements that are in the tolerance are always better 57 | # those outside tolerance. To order them according to that, the 58 | # weight of anything over tolerance is increased 59 | over_tolerance = _get_over_tolerance(measurement) * 1000 60 | # To also sort the measurements which fall into tolerance 61 | return over_tolerance * 1000 + diff 62 | 63 | 64 | @keyword("Count Failed Fan Measurements") 65 | def count_failed_fan_measurements(measurements): 66 | # RF passes a measurements as [measurements] 67 | if type(measurements[0]) is list: 68 | measurements = measurements[0] 69 | 70 | count = 0 71 | for m in measurements: 72 | if _get_over_tolerance(m) > 0: 73 | count += 1 74 | return count 75 | 76 | 77 | @keyword("Filter Fan Measurements") 78 | def filter_fan_measurements(measurements, percentile_drop): 79 | # RF passes a measurements as [measurements] 80 | if type(measurements[0]) is list: 81 | measurements = measurements[0] 82 | # sort by the amount of deviation from expected values 83 | m_sorted = sorted(measurements, key=_get_diff_from_tolerance) 84 | save_amount = int(len(m_sorted) - len(m_sorted) * percentile_drop / 100) 85 | m_saved = m_sorted[:save_amount] 86 | return m_saved 87 | -------------------------------------------------------------------------------- /lib/framework.robot: -------------------------------------------------------------------------------- 1 | *** Keywords *** 2 | Depends On Variable 3 | [Documentation] Skips the test if ``variable`` does not exist. 4 | [Arguments] ${variable} 5 | ${variable_exists}= Run Keyword And Return Status Variable Should Exist ${variable} 6 | Depends On ${variable_exists} Variable: ${variable} is not defined 7 | 8 | Depends On 9 | [Documentation] Skips test if ``condition`` is not met. Test identifier 10 | ... (first word of its name) and optional ``reason`` is set 11 | ... to the test as per ```Skip`` keyword. 12 | [Arguments] ${condition} ${reason}=${NONE} 13 | ${line}= Set Variable ${TEST_NAME.split()}[0] not supported 14 | IF """${reason}""" != """${NONE}""" 15 | ${line}= Set Variable ${line}: ${reason} 16 | END 17 | Skip If not ${condition} ${line} 18 | -------------------------------------------------------------------------------- /lib/me.robot: -------------------------------------------------------------------------------- 1 | *** Comments *** 2 | @@ -0,0 +1,23 @@ 3 | 4 | 5 | *** Settings *** 6 | Library BuiltIn 7 | Library Process 8 | 9 | 10 | *** Variables *** 11 | ${EXPECTED}= 00:16.0 12 | 13 | 14 | *** Keywords *** 15 | Check ME Out 16 | [Documentation] Keyword Runs Lspci To Check Whether The ME Device 17 | ... Exists Or Not 18 | ... 19 | ${out}= Execute Command In Terminal lspci 20 | ${condition}= Evaluate '${EXPECTED}' in """${out}""" 21 | IF ${condition} 22 | ${out_data}= Check ME State 23 | ELSE 24 | ${out_data}= Evaluate 'Disabled' 25 | END 26 | RETURN ${out_data} 27 | 28 | Check ME State 29 | [Documentation] Keyword Checks The ME PCI Register Offset 0x40 To Find Current ME State, Returns: 30 | ... -Disabled (Soft) For 3 31 | ... -Disabled (HAP) for 2 32 | ... -Enabled for 0 33 | ${out}= Execute Command In Terminal setpci -s 16.0 40.L 34 | IF "No devices selected for operation group 1." in """${out}""" 35 | ${result}= Evaluate 'Disabled' 36 | ELSE 37 | ${char}= Evaluate ${out}[3] 38 | # Current Operation Mode: bits 16:19 of register HFSTS1 (0x40) 39 | IF '${char}' == '3' 40 | ${result}= Evaluate 'Disabled (Soft)' 41 | ELSE IF '${char}' == '2' 42 | ${result}= Evaluate 'Disabled (HAP)' 43 | ELSE IF '${char}' == '0' 44 | ${result}= Evaluate 'Enabled' 45 | END 46 | END 47 | RETURN ${result} 48 | -------------------------------------------------------------------------------- /lib/novacustom-lib.robot: -------------------------------------------------------------------------------- 1 | *** Keywords *** 2 | Check EC Firmware Version 3 | [Documentation] Keyword allows checking EC firmware version via the 4 | ... dasharo_ectool info utility. 5 | [Arguments] ${expected_version}=${EC_VERSION} ${tool}=dasharo_ectool 6 | ${output}= Execute Command In Terminal ${tool} info 7 | Should Contain ${output} ${expected_version} 8 | 9 | Flash EC Firmware 10 | [Documentation] Keyword allows flashing EC firmware via the 11 | ... dasharo_ectool info utility. 12 | [Arguments] ${ec_fw_download_link}=https://3mdeb.com/open-source-firmware/Dasharo/${EC_BINARY_LOCATION} 13 | ... ${tool}=dasharo_ectool 14 | Execute Command In Terminal 15 | ... command=wget -O /tmp/ec.rom ${ec_fw_download_link} 16 | ... timeout=320s 17 | Write Into Terminal ${tool} flash /tmp/ec.rom 18 | Press Enter 19 | Read From Terminal Until Successfully programmed SPI ROM 20 | Sleep 10s 21 | -------------------------------------------------------------------------------- /lib/performance/gpu.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation GPU header for OSFV Performance Library 3 | 4 | Library Dialogs 5 | Resource common.robot 6 | 7 | 8 | *** Keywords *** 9 | Run Unigine Superposition On Ubuntu 10 | [Documentation] Wrapper for PTS. Run suite, gather and process 11 | ... results. It assumes DUT is logged in into regular user 12 | ... account on Ubuntu 13 | [Arguments] ${test_run_name}=gpu_test${CURRENT_DATE} 14 | 15 | # Required for graphical benchmarking over ssh 16 | Execute Manual Step Please ensure DUT has active desktop session 17 | ... by logging into Gnome Desktop. 18 | ${cmd}= Set Variable DISPLAY=:0 19 | 20 | IF ${NVIDIA_GRAPHICS_CARD_SUPPORT} 21 | ${cmd}= Catenate ${cmd} 22 | ... __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 23 | ${cmd}= Catenate ${cmd} 24 | ... __VK_LAYER_NV_optimus=NVIDIA_only VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json 25 | END 26 | 27 | ${cmd}= Catenate ${cmd} 28 | ... phoronix-test-suite batch-run 29 | ${cmd}= Catenate ${cmd} 30 | ... unigine-super RESULT_NAME=${test_run_name} 31 | 32 | Write Into Terminal ${cmd} 33 | # Test options 34 | Read From Terminal Until Resolution: 35 | # 1: 800 x 600 2: 1024 x 768 3: 1280 x 1024 36 | # 4: 1600 x 1200 5: 1920 x 1080 6: 1920 x 1200 37 | Write Into Terminal 5 # Full HD 1920 x 1080 38 | Read From Terminal Until Mode: 39 | # 1 : Fullscreen 2: Windowed 40 | Write Into Terminal 2 # Test in-window performance 41 | Read From Terminal Until Quality: 42 | # 1: Low 2: Medium 3: High 4: Ultra 43 | Write Into Terminal 2 # Medium preset 44 | # Test takes around 11 minutes, but will repeat runs if deviation is too high, 45 | # therefore we give almost 3x that time to ensure it has enough to rerun 46 | Set DUT Response Timeout 1800 47 | ${out}= Read From Terminal Until Prompt 48 | Should Contain ${out} Average: 49 | ... Benchmark did not produce results 50 | ${lines}= Split String ${out} \n 51 | FOR ${line} IN @{lines} 52 | IF '''Average''' in '''${line}''' 53 | ${parts}= Split String ${line} 54 | ${value}= Get From List ${parts} 1 55 | RETURN ${value} 56 | END 57 | END 58 | Fail Could not acquire results 59 | -------------------------------------------------------------------------------- /lib/power-after-fail-lib.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation Collection of keywords related to the Power State After 3 | ... Power Fail option 4 | 5 | Library terminal 6 | 7 | 8 | *** Keywords *** 9 | Simulate Power Failure 10 | [Documentation] This keyword simulates a power failure to the DUT. 11 | ... It is using osfv_cli libraries which control the power 12 | ... via a RTE relay or a sonoff. 13 | # Use 15 seconds delay because if power is absent for less than roughly 10 14 | # seconds the platform powers on regardless of the settings (original 15 | # firmware behaves the same) and waiting 10 seconds doesn't produce stable 16 | # results. 17 | Rte Psu Off 18 | Sleep 15s 19 | Read From Terminal 20 | Rte Psu On 21 | -------------------------------------------------------------------------------- /lib/self-tests.robot: -------------------------------------------------------------------------------- 1 | *** Keywords *** 2 | Menu Construction Should Not Contain Control Text 3 | [Documentation] Checks if parsed menu construction does not contain 4 | ... some unnecessary help text, which is not a valid entry. 5 | [Arguments] ${menu} 6 | Should Not Contain Any 7 | ... ${menu} 8 | ... Esc\=Exit 9 | ... ^v\=Move High 10 | ... \=Select Entry 11 | ... F9\=Reset to Defaults F10\=Save 12 | ... LCtrl+LAlt+F12\=Save screenshot 13 | ... Toggle Checkbox 14 | -------------------------------------------------------------------------------- /lib/tpm2.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library OperatingSystem 3 | Library String 4 | 5 | 6 | *** Keywords *** 7 | Flush TPM Contexts 8 | Execute Linux Tpm2 Tools Command tpm2_flushcontext -t 9 | Execute Linux Tpm2 Tools Command tpm2_flushcontext -l 10 | Execute Linux Tpm2 Tools Command tpm2_flushcontext -s 11 | 12 | Check Which TPM2 Banks Are Enabled 13 | [Documentation] Checks which Bank is enabled, returns tuple (bool, bool) 14 | ${out}= Execute Linux Command tpm2_getcap pcrs 15 | ${sha1}= Run Keyword And Return Status 16 | ... Should Contain 17 | ... ${out} 18 | ... sha1: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] 19 | ${sha256}= Run Keyword And Return Status 20 | ... Should Contain 21 | ... ${out} 22 | ... sha256: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ] 23 | RETURN ${sha1} ${sha256} 24 | 25 | Check If SHA1 And SHA256 Banks Are Enabled 26 | ${sha1} ${sha256}= Check Which TPM2 Banks Are Enabled 27 | Should Be True ${sha1} 28 | Should Be True ${sha256} 29 | 30 | TPM2 Suite Setup 31 | Prepare Test Suite 32 | Skip If '${TPM_SUPPORTED_VERSION}' != '2' TPM commands tests supported only TPM2 33 | Skip If not ${TESTS_IN_UBUNTU_SUPPORT} TPM commands tests supported only on Ubuntu 34 | Power On 35 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 36 | Login To Linux 37 | Switch To Root User 38 | Verify Presence Of TPM Via Sysfs 39 | Detect Or Install Package tpm2-tools 40 | ${passed}= Run Keyword And Return Status 41 | ... Check If SHA1 And SHA256 Banks Are Enabled 42 | IF not ${passed} 43 | # Restore default allocations in case any bank was disabled and reboot 44 | Execute Linux Command tpm2_pcrallocate 45 | Execute Reboot Command 46 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 47 | Login To Linux 48 | Switch To Root User 49 | END 50 | ${sha1_enabled} ${sha256_enabled}= Check Which TPM2 Banks Are Enabled 51 | Set Suite Variable $SHA1_ENABLED ${sha1_enabled} 52 | Set Suite Variable $SHA256_ENABLED ${sha256_enabled} 53 | 54 | Check TPM2 Banks State After FW Changes 55 | [Documentation] Verifies the state of TPM Banks. Fails test if they are different than input. 56 | [Arguments] ${sha1_desired} ${sha256_desired} 57 | Save Changes And Reset 58 | Read From Terminal Until Press F12 to change the boot measurements to use PCR bank(s) of the TPM 59 | Press Key N Times 1 ${F12} 60 | Prepare TPM Test On Linux 61 | ${sha1} ${sha256}= Check Which TPM2 Banks Are Enabled 62 | Should Be Equal ${sha1} ${sha1_desired} 63 | Should Be Equal ${sha256} ${sha256_desired} 64 | -------------------------------------------------------------------------------- /lib/trenchboot.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 3 | Resource terminal.robot 4 | 5 | 6 | *** Keywords *** 7 | TrenchBoot Telnet Root Login 8 | [Documentation] Telnet login for Trenchboot 9 | # The login is password-less which makes use of Telnet.Login very 10 | # inconvenient. 11 | Telnet.Set Prompt root@tb:~# 12 | Telnet.Read Until login: 13 | Telnet.Write root 14 | # Try to work around prompt detection issues by first matching on a single 15 | # character. 16 | Telnet.Set Prompt \# 17 | Telnet.Read Until Prompt 18 | # Now set the real prompt and tell dmesg to shut up. 19 | Telnet.Set Prompt root@tb:~# 20 | Execute Command In Terminal dmesg -n1 21 | -------------------------------------------------------------------------------- /os-config/201-credentials.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2025 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | DEVICE_OS_USERNAME = "ubuntu" 6 | DEVICE_OS_PASSWORD = "ubuntu" 7 | DEVICE_OS_HOSTNAME = "3mdeb" 8 | 9 | DEVICE_OS_USER_PROMPT = f"{DEVICE_OS_USERNAME}@{DEVICE_OS_HOSTNAME}:~$" 10 | DEVICE_OS_ROOT_PROMPT = f"root@{DEVICE_OS_HOSTNAME}:/home/{DEVICE_OS_USERNAME}#" 11 | -------------------------------------------------------------------------------- /os-config/202-credentials.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2025 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | DEVICE_OS_USERNAME = "linux" 6 | DEVICE_OS_PASSWORD = "linux" 7 | DEVICE_OS_HOSTNAME = "3mdeb" 8 | 9 | DEVICE_OS_USER_PROMPT = f"[{DEVICE_OS_USERNAME}@{DEVICE_OS_HOSTNAME} ~]$" 10 | DEVICE_OS_ROOT_PROMPT = f"[root@{DEVICE_OS_HOSTNAME} {DEVICE_OS_USERNAME}]#" 11 | -------------------------------------------------------------------------------- /os-config/301-credentials.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2025 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | DEVICE_OS_USERNAME = "user" 6 | DEVICE_OS_PASSWORD = "windows" 7 | 8 | DEVICE_OS_USER_PROMPT = f"PS C:\\Users\\{DEVICE_OS_USERNAME}>" 9 | DEVICE_OS_ROOT_PROMPT = f"PS C:\\Users\\{DEVICE_OS_USERNAME}>" 10 | -------------------------------------------------------------------------------- /os-config/ansible/linux-packages-playbook.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | - name: Common tasks 6 | hosts: host 7 | become: true 8 | tasks: 9 | - name: Load package names 10 | ansible.builtin.include_vars: "{{os_id}}-packages.yaml" 11 | - name: Install packages 12 | ansible.builtin.package: 13 | name: 14 | - "{{package_network_manager}}" 15 | - "{{package_lm_sensors}}" 16 | - "{{package_flashrom}}" 17 | - "{{package_libpci_dev}}" 18 | - "{{package_alsa_utils}}" 19 | - "{{package_cpuid}}" 20 | - "{{package_dmidecode}}" 21 | - "{{package_acpi_call}}" 22 | - "{{package_libinput_tools}}" 23 | - "{{package_iperf3}}" 24 | - "{{package_fwts}}" 25 | - "{{package_util_linux}}" 26 | - "{{package_smartmontools}}" 27 | - "{{package_ffmeg}}" 28 | - "{{package_usbutils}}" 29 | - "{{package_tpm2_tools}}" 30 | - "{{package_pulseaudio_utils}}" 31 | state: present 32 | - name: Install coreboot tools files 33 | ansible.builtin.copy: 34 | src: "{{ item.src }}" 35 | dest: /usr/bin/ 36 | mode: 755 37 | loop: 38 | - src: "./../../osfv-test-data/coreboot-tools/flashrom" 39 | - src: "./../../osfv-test-data/coreboot-tools/cbmem" 40 | - src: "./../../osfv-test-data/coreboot-tools/cbfstool" 41 | 42 | - name: Gnome turn off automatic suspend on AC 43 | ansible.builtin.command: gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 44 | - name: Gnome turn off automatic suspend on battery 45 | ansible.builtin.command: gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0 46 | - name: Gnome turn off automatic screen lock 47 | ansible.builtin.command: gsettings set org.gnome.desktop.session idle-delay 0 48 | - name: Systemd turn off suspend 49 | ansible.builtin.command: systemctl mask suspend.target 50 | 51 | - name: OS specific tasks 52 | hosts: host 53 | become: true 54 | tasks: 55 | - name: Include OS specific tasks 56 | ansible.builtin.include_tasks: "os-specific-tasks/{{ os_id }}.yaml" 57 | -------------------------------------------------------------------------------- /os-config/ansible/os-specific-tasks/201.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | - name: Prepare UEFI Shell components 6 | ansible.builtin.copy: 7 | src: "{{ item.src }}" 8 | dest: /tmp/ 9 | mode: 755 10 | loop: 11 | - src: "./../../../osfv-test-data/uefi-shell/Shell.efi" 12 | - src: "./../../../osfv-test-data/uefi-shell/deploy-shell-efi.sh" 13 | 14 | - name: Install UEFI Shell 15 | ansible.builtin.command: /tmp/deploy-shell-efi.sh /tmp/Shell.efi 16 | -------------------------------------------------------------------------------- /os-config/ansible/os-specific-tasks/202.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # acpi_call package is not available in fedora repos 6 | - name: "Download acpi_call rpm package" 7 | ansible.builtin.get_url: 8 | url: https://github.com/MiMillieuh/acpi_call-fedora/releases/download/1.2.2-1/acpi_call-1.2.2-1.x86_64.rpm 9 | dest: /tmp/acpi_call.rpm 10 | 11 | - name: "Install acpi_call rpm package" 12 | ansible.builtin.dnf: 13 | name: /tmp/acpi_call.rpm 14 | state: present 15 | disable_gpg_check: true 16 | 17 | - name: "Autoload acpi_call module" 18 | ansible.builtin.copy: 19 | dest: /etc/modules-load.d/acpi_call.conf 20 | content: acpi_call 21 | 22 | # spi_intel_pci module conflicts with flashrom 23 | - name: Blacklist spi_intel_pci module 24 | ansible.builtin.copy: 25 | dest: /etc/modprobe.d/osfv-blacklist.conf 26 | content: blacklist spi_intel_pci 27 | 28 | - name: Unload spi_intel_pci module 29 | ansible.builtin.command: modprobe -r spi_intel_pci 30 | 31 | # The WiFi/Bt cards of MTL laptops don't work on Fedora 41 with 6.13 kernel 32 | - name: Get default kernel 33 | ansible.builtin.command: grubby --default-kernel 34 | register: default_kernel_version 35 | - name: Get default index 36 | ansible.builtin.command: grubby --default-index 37 | register: default_kernel_index 38 | - name: Downgrade default kernel 39 | ansible.builtin.command: grubby --set-default-index {{ default_kernel_index.stdout | int + 1 }} 40 | when: '"6.13" in default_kernel_version.stdout' 41 | -------------------------------------------------------------------------------- /os-config/ansible/vars/201-packages.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | package_network_manager: network-manager 6 | package_lm_sensors: lm-sensors 7 | package_flashrom: flashrom 8 | package_pciutils: pciutils 9 | package_libpci_dev: libpci-dev 10 | package_alsa_utils: alsa-utils 11 | package_cpuid: cpuid 12 | package_dmidecode: dmidecode 13 | package_acpi_call: acpi-call 14 | package_libinput_tools: libinput-tools 15 | package_iperf3: iperf3 16 | package_fwts: fwts 17 | package_util_linux: util-linux 18 | package_smartmontools: smartmontools 19 | package_ffmeg: ffmpeg 20 | package_usbutils: usbutils 21 | package_tpm2_tools: tpm2-tools 22 | package_ethtool: ethtool 23 | package_stress_ng: stress-ng 24 | package_pulseaudio_utils: pulseaudio-utils 25 | -------------------------------------------------------------------------------- /os-config/ansible/vars/202-packages.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | package_network_manager: NetworkManager 6 | package_lm_sensors: lm_sensors 7 | package_flashrom: flashrom 8 | package_pciutils: pciutils 9 | package_libpci_dev: pciutils-devel 10 | package_alsa_utils: alsa-utils 11 | package_cpuid: cpuid 12 | package_dmidecode: dmidecode 13 | package_acpi_call: bash # TODO, not available in dnf? 14 | package_libinput_tools: libinput-utils 15 | package_iperf3: iperf3 16 | package_fwts: fwts 17 | package_util_linux: util-linux 18 | package_smartmontools: smartmontools 19 | package_ffmeg: ffmpeg 20 | package_usbutils: usbutils 21 | package_tpm2_tools: tpm2-tools 22 | package_ethtool: ethtool 23 | package_stress_ng: stress-ng 24 | package_pulseaudio_utils: pulseaudio-utils 25 | -------------------------------------------------------------------------------- /os-config/environment-test-ids.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2025 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # 1xx - Firmware 6 | ENV_ID_EDK2 = "101" 7 | ENV_ID_SEABIOS = "102" 8 | ENV_ID_IPXE = "103" 9 | ENV_ID_HEADS = "104" 10 | 11 | # 2xx - Linux 12 | ENV_ID_UBUNTU = "201" 13 | ENV_ID_FEDORA = "202" 14 | ENV_ID_QUBES = "203" 15 | ENV_ID_TRENCHBOOT = "204" 16 | 17 | # 3xx - Windows 18 | ENV_ID_WINDOWS = "301" 19 | 20 | ENV_ID_OS_BOOTMENU_NAMES = { 21 | ENV_ID_UBUNTU: "Ubuntu", 22 | ENV_ID_FEDORA: "fedora", 23 | ENV_ID_WINDOWS: "Windows Boot", 24 | ENV_ID_TRENCHBOOT: "trenchboot", 25 | } 26 | -------------------------------------------------------------------------------- /platform-configs/include/novacustom-adl.robot: -------------------------------------------------------------------------------- 1 | *** Variables *** 2 | # Flash 3 | ${FLASH_SIZE}= ${32*1024*1024} 4 | 5 | # CPU - all our models happen to have 4P + 8E configuration 6 | ${INITIAL_CPU_FREQUENCY}= 2100 7 | ${DEF_CORES_PER_SOCKET}= 12 8 | ${DEF_THREADS_PER_CORE}= 2 9 | ${DEF_THREADS_TOTAL}= 16 10 | # TODO: remove, the value below can be inferred from the one above 11 | ${DEF_ONLINE_CPU}= 0-15 12 | ${DEF_SOCKETS}= 1 13 | 14 | # Connectivity 15 | ${WIFI_CARD}= Intel(R) Wi-Fi 6 AX201 160MHz 16 | ${WIFI_CARD_UBUNTU}= Intel Corporation Alder Lake-P PCH CNVi WiFi (rev 01) 17 | ${BLUETOOTH_CARD_UBUNTU}= Intel Corp. AX201 Bluetooth 18 | 19 | # USB 20 | ${WEBCAM_UBUNTU}= Chicony Electronics Co., Ltd Chicony USB2.0 Camera 21 | 22 | # DMI 23 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v1.7.2 24 | # TODO verify 25 | ${DMIDECODE_RELEASE_DATE}= 03/17/2022 26 | 27 | ${L3_CACHE_SUPPORT}= ${TRUE} 28 | -------------------------------------------------------------------------------- /platform-configs/include/novacustom-mtl.robot: -------------------------------------------------------------------------------- 1 | *** Variables *** 2 | ${POWER_CTRL}= none 3 | 4 | # Flash 5 | ${FLASH_SIZE}= ${32*1024*1024} 6 | 7 | # CPU 8 | ${INITIAL_CPU_FREQUENCY}= 2800 9 | ${DEF_CORES_PER_SOCKET}= 16 10 | ${DEF_THREADS_PER_CORE}= 2 11 | ${DEF_THREADS_TOTAL}= 22 12 | # TODO: remove, the value below can be inferred from the one above 13 | ${DEF_ONLINE_CPU}= 0-21 14 | ${DEF_SOCKETS}= 1 15 | 16 | # Connectivity 17 | ${WIFI_CARD}= Intel(R) Wi-Fi 6 AX201 160MHz 18 | ${WIFI_CARD_UBUNTU}= Intel Corporation Meteor Lake PCH CNVi WiFi (rev 20) 19 | ${BLUETOOTH_CARD_UBUNTU}= Intel Corp. AX211 Bluetooth 20 | 21 | # USB 22 | ${WEBCAM_UBUNTU}= Bison Electronics Inc. BisonCam,NB Pro 23 | ${USB_STACK_SUPPORT}= ${TRUE} 24 | 25 | # DMI 26 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v1.5.2 27 | # TODO verify 28 | ${DMIDECODE_RELEASE_DATE}= 03/17/2022 29 | 30 | # Not supported until we release the Dasharo System Driver 31 | ${FAN_SPEED_MEASURE_SUPPORT}= ${FALSE} 32 | ${CUSTOM_FAN_CURVE_SILENT_MODE_SUPPORT}= ${FALSE} 33 | ${CUSTOM_FAN_CURVE_PERFORMANCE_MODE_SUPPORT}= ${FALSE} 34 | 35 | ${L3_CACHE_SUPPORT}= ${TRUE} 36 | 37 | # Only S0ix is available on MTL 38 | ${DASHARO_POWER_MGMT_MENU_SUPPORT}= ${FALSE} 39 | -------------------------------------------------------------------------------- /platform-configs/include/novacustom-tgl.robot: -------------------------------------------------------------------------------- 1 | *** Variables *** 2 | # Flash 3 | ${FLASH_SIZE}= ${16*1024*1024} 4 | 5 | # CPU 6 | ${INITIAL_CPU_FREQUENCY}= 2800 7 | ${DEF_CORES_PER_SOCKET}= 4 8 | ${DEF_THREADS_PER_CORE}= 2 9 | ${DEF_THREADS_TOTAL}= ${TBD} 10 | # TODO: remove, the value below can be inferred from the one above 11 | ${DEF_ONLINE_CPU}= 0-7 12 | ${DEF_SOCKETS}= 1 13 | 14 | # Connectivity 15 | ${WIFI_CARD}= Intel(R) Wi-Fi 6 AX201 160MHz 16 | ${WIFI_CARD_UBUNTU}= Intel Corporation Wi-Fi 6 AX201 (rev 20) 17 | ${BLUETOOTH_CARD_UBUNTU}= Intel Corp. AX201 Bluetooth 18 | 19 | # USB 20 | ${WEBCAM_UBUNTU}= Chicony Electronics Co., Ltd Chicony USB2.0 Camera 21 | 22 | # DMI 23 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v1.6.0-rc1 24 | # TODO verify 25 | ${DMIDECODE_RELEASE_DATE}= 03/17/2022 26 | 27 | ${L3_CACHE_SUPPORT}= ${TRUE} 28 | -------------------------------------------------------------------------------- /platform-configs/include/protectli-pro.robot: -------------------------------------------------------------------------------- 1 | *** Variables *** 2 | # Regression test flags 3 | ${DASHARO_SECURITY_MENU_SUPPORT}= ${TRUE} 4 | 5 | ${NVME_DISK_SUPPORT}= ${TRUE} 6 | 7 | # Test module: dasharo-security 8 | ${VERIFIED_BOOT_SUPPORT}= ${TRUE} 9 | ${VERIFIED_BOOT_POPUP_SUPPORT}= ${TRUE} 10 | ${MEASURED_BOOT_SUPPORT}= ${TRUE} 11 | ${BIOS_LOCK_SUPPORT}= ${TRUE} 12 | ${SMM_WRITE_PROTECTION_SUPPORT}= ${TRUE} 13 | # WDT not yet enabled 14 | ${DASHARO_CHIPSET_MENU_SUPPORT}= ${FALSE} 15 | ${UEFI_PASSWORD_SUPPORT}= ${TRUE} 16 | ${ME_STATICALLY_DISABLED}= ${TRUE} 17 | -------------------------------------------------------------------------------- /platform-configs/include/protectli-v1x10.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource protectli-common.robot 3 | 4 | 5 | *** Variables *** 6 | ${FLASH_SIZE}= ${16*1024*1024} 7 | 8 | ${DEF_CORES_PER_SOCKET}= 4 9 | ${DEF_THREADS_PER_CORE}= 1 10 | ${DEF_THREADS_TOTAL}= 4 11 | ${DEF_ONLINE_CPU}= 0-3 12 | ${DEF_SOCKETS}= 1 13 | 14 | ${INITIAL_CPU_FREQUENCY}= 2000 15 | ${MAX_CPU_TEMP}= 77 16 | 17 | ${E_MMC_NAME}= BJTD4R 18 | 19 | ${DMIDECODE_SERIAL_NUMBER}= N/A 20 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v 21 | ${DMIDECODE_RELEASE_DATE}= ${EMPTY} 22 | ${DMIDECODE_MANUFACTURER}= Protectli 23 | ${DMIDECODE_VENDOR}= 3mdeb 24 | ${DMIDECODE_FAMILY}= Vault 25 | ${DMIDECODE_TYPE}= Desktop 26 | 27 | ${NVME_DISK_SUPPORT}= ${TRUE} 28 | ${MEASURED_BOOT_SUPPORT}= ${TRUE} 29 | 30 | ${DASHARO_USB_MENU_SUPPORT}= ${FALSE} 31 | ${USB_STACK_SUPPORT}= ${FALSE} 32 | ${USB_MASS_STORAGE_SUPPORT}= ${FALSE} 33 | ${EXTERNAL_DISPLAY_PORT_SUPPORT}= ${FALSE} 34 | 35 | ${DCU_SUPPORTED_BOOLEAN_SMMSTORE_VARIABLE}= ${EMPTY} 36 | 37 | 38 | *** Keywords *** 39 | Flash Device Via External Programmer 40 | [Documentation] Keyword allows to flash Device Under Test firmware by 41 | ... using external programmer and check flashing procedure 42 | ... result. Implementation must be compatible with the theory 43 | ... of operation of a specific platform. 44 | ${flash_result}= Run osfv_cli rte --rte_ip ${RTE_IP} flash write --rom ${FW_FILE} 45 | Should Contain ${flash_result} Flash written 46 | -------------------------------------------------------------------------------- /platform-configs/include/protectli-vp24xx.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource protectli-pro.robot 3 | Resource protectli-common.robot 4 | 5 | 6 | *** Variables *** 7 | ${FLASH_SIZE}= ${16*1024*1024} 8 | ${WIFI_CARD_UBUNTU}= Intel Corporation Wi-Fi 6 AX200 (rev 1a) 9 | ${LTE_CARD}= Qualcomm, Inc. MDG200 10 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 11 | ${MAX_CPU_TEMP}= 95 12 | ${DMIDECODE_MANUFACTURER}= Protectli 13 | ${DMIDECODE_VENDOR}= 3mdeb 14 | ${DMIDECODE_FAMILY}= Vault Pro 15 | 16 | ${SENSORS_CONFIG_FILE}= include/sensors/default-sensors-config.yaml 17 | -------------------------------------------------------------------------------- /platform-configs/include/protectli-vp32xx.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource protectli-pro.robot 3 | Resource protectli-common.robot 4 | 5 | 6 | *** Variables *** 7 | ${FLASH_SIZE}= ${16*1024*1024} 8 | 9 | ${MAX_CPU_TEMP}= 82 10 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 11 | ${ETHERNET_ID}= 8086:125c 12 | @{ETH_PERF_PAIR_2_G}= enp2s0 enp4s0 13 | 14 | ${SENSORS_CONFIG_FILE}= include/sensors/default-sensors-config.yaml 15 | -------------------------------------------------------------------------------- /platform-configs/include/protectli-vp46xx.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource protectli-pro.robot 3 | Resource protectli-common.robot 4 | 5 | 6 | *** Variables *** 7 | ${FLASH_SIZE}= ${16*1024*1024} 8 | 9 | ${INITIAL_CPU_FREQUENCY}= 2600 10 | ${MAX_CPU_TEMP}= 82 11 | ${WATCHDOG_SUPPORT}= ${TRUE} 12 | 13 | # eMMC driver support 14 | ${E_MMC_NAME}= AJTD4R 15 | 16 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v1.2.0 17 | ${DMIDECODE_RELEASE_DATE}= 03/13/2024 18 | 19 | @{ETH_PERF_PAIR_2_G}= enp5s0 enp6s0 20 | 21 | ${ETHERNET_ID}= 8086:15f3 22 | -------------------------------------------------------------------------------- /platform-configs/include/protectli-vp66xx.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource protectli-pro.robot 3 | Resource protectli-common.robot 4 | 5 | 6 | *** Variables *** 7 | ${FLASH_SIZE}= ${16*1024*1024} 8 | ${INITIAL_CPU_FREQUENCY}= 2600 9 | ${MAX_CPU_TEMP}= 82 10 | 11 | ${CPU_P_CORES_MAX}= 2 12 | ${CPU_E_CORES_MAX}= 8 13 | 14 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v0.9.2-rc1 15 | ${DMIDECODE_RELEASE_DATE}= 05/26/2025 16 | 17 | ${EMMC_SUPPORT}= ${FALSE} 18 | ${HYPER_THREADING_SUPPORT}= ${TRUE} 19 | ${INTEL_HYBRID_ARCH_SUPPORT}= ${TRUE} 20 | @{ETH_PERF_PAIR_2_G}= enp5s0 enp6s0 21 | @{ETH_PERF_PAIR_10_G}= enp2s0f0 enp2s0f1 22 | ${WIFI_CARD_UBUNTU}= Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter 23 | ${WIFI_CARD}= Qualcomm Atheros QCA61x4A Wireless Network Adapter 24 | 25 | ${ETHERNET_ID}= 8086:125c 26 | 27 | ${CUSTOM_FAN_CURVE_PERFORMANCE_MODE_SUPPORT}= ${TRUE} 28 | ${CUSTOM_FAN_CURVE_SILENT_MODE_SUPPORT}= ${TRUE} 29 | ${CUSTOM_FAN_CURVE_OFF_MODE_SUPPORT}= ${TRUE} 30 | 31 | # Variables used in lib/sensors to determine platform-specific methods of 32 | # measuring temperatures, fans etc. 33 | ${SENSORS_CONFIG_FILE}= include/sensors/protectli-vp66xx-sensors-config.yaml 34 | ${CUSTOM_FAN_CURVE_FILE}= include/sensors/protectli-vp66xx-fan-curve-config.yaml 35 | -------------------------------------------------------------------------------- /platform-configs/include/sensors/default-sensors-config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # example_sensor_measurement: 6 | # # Can be one of {`lm-sensors`, `hwmon`, `system76-acpi`, `none`} depending on measured value and device 7 | # - method: none 8 | # # Abosule path to hwmon file representing the sensor 9 | # # Has to be set if PWM measurement method is hwmon 10 | # # example: /sys/devices/LNXSYSTM\:00/LNXSYBUS\:00/17761776\:00/hwmon/hwmon0/pwm1 11 | # hwmon_path: none 12 | # # The name of the sensor in `sensors` command if method 13 | # # is set to lm-sensors. For example `w83795g-i2c-1-2f`. `none` if lm-sensors 14 | # # is not used or no filtering of the command output by sensor name is needed 15 | # lm_sensors_sensor_name: none 16 | 17 | cpu_temperature_measurement: 18 | # Can be one of {`lm-sensors`, `hwmon`, `none`} 19 | method: lm-sensors 20 | hwmon_path: none 21 | lm_sensors_sensor_name: none 22 | 23 | fan_pwm_measurement: 24 | # Can be one of {`hwmon`, `none`} 25 | method: none 26 | hwmon_path: none 27 | lm_sensors_sensor_name: none 28 | 29 | fan_rpm_measurement: 30 | # Can be one of {`lm-sensors`, `system76-acpi`, `none`} 31 | method: none 32 | hwmon_path: none 33 | lm_sensors_sensor_name: none 34 | 35 | # Kernel modules that might need to be enabled using modprobe in order to use 36 | # the sensors. 37 | sensors_kernel_modules: 38 | # name of the kernel module 39 | - module: none 40 | # optional force_id arg for modprobe 41 | force_id: none 42 | -------------------------------------------------------------------------------- /platform-configs/include/sensors/protectli-vp66xx-fan-curve-config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | temperature_curve_settings: 5 | percentile_drop: 10 6 | acceptable_invalid_percent: 10 7 | 8 | temperature_curve_silent: 9 | - range: [0, 40] 10 | evaluation_pwm: [0, 1] 11 | tolerance_pwm: 6 12 | evaluation_rpm: [250, 250] 13 | tolerance_rpm: 250 14 | 15 | - range: [40, 50] 16 | evaluation_pwm: [20, 35] 17 | tolerance_pwm: 6 18 | evaluation_rpm: [700, 700] # Anywhere between 0 and 1100 + 300 tolerance 19 | tolerance_rpm: 700 20 | 21 | - range: [50, 85] 22 | evaluation_pwm: [35, 100] 23 | tolerance_pwm: 6 24 | evaluation_rpm: [1100, 2900] 25 | tolerance_rpm: 300 26 | 27 | - range: [85, 100] 28 | evaluation_pwm: [100, 100] 29 | tolerance_pwm: 6 30 | evaluation_rpm: [3100, 3100] 31 | tolerance_rpm: 400 32 | 33 | temperature_curve_performance: 34 | - range: [0, 30] 35 | evaluation_pwm: [0, 1] 36 | tolerance_pwm: 6 37 | evaluation_rpm: [250, 250] 38 | tolerance_rpm: 250 39 | 40 | - range: [30, 40] 41 | evaluation_pwm: [0, 40] 42 | tolerance_pwm: 6 43 | evaluation_rpm: [1000, 1000] 44 | tolerance_rpm: 1000 45 | 46 | - range: [40, 75] 47 | evaluation_pwm: [40, 100] 48 | tolerance_pwm: 6 49 | evaluation_rpm: [2000, 3400] 50 | tolerance_rpm: 300 51 | 52 | - range: [75, 100] 53 | evaluation_pwm: [100, 100] 54 | tolerance_pwm: 6 55 | evaluation_rpm: [3300, 3300] 56 | tolerance_rpm: 400 57 | 58 | temperature_curve_off: 59 | - range: [0, 100] 60 | evaluation_pwm: [0, 1] 61 | tolerance_pwm: 6 62 | evaluation_rpm: [250, 250] 63 | tolerance_rpm: 150 64 | -------------------------------------------------------------------------------- /platform-configs/include/sensors/protectli-vp66xx-sensors-config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | cpu_temperature_measurement: 6 | method: lm-sensors 7 | hwmon_path: none 8 | lm_sensors_sensor_name: none 9 | 10 | fan_pwm_measurement: 11 | method: none 12 | hwmon_path: none 13 | lm_sensors_sensor_name: none 14 | 15 | fan_rpm_measurement: 16 | method: lm-sensors 17 | hwmon_path: none 18 | lm_sensors_sensor_name: it8786-isa-0a20 19 | 20 | sensors_kernel_modules: 21 | - module: it87 22 | force_id: '0x8786' 23 | -------------------------------------------------------------------------------- /platform-configs/minnowboard-turbot.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/default.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_DUT_CONNECTION_METHOD}= Telnet 7 | ${DUT_CONNECTION_METHOD}= ${INITIAL_DUT_CONNECTION_METHOD} 8 | ${PAYLOAD}= tianocore 9 | ${RTE_S2_N_PORT}= 13542 10 | ${FLASH_SIZE}= ${8*1024*1024} 11 | ${FLASH_LENGTH}= ${TBD} 12 | ${TIANOCORE_STRING}= to enter Boot Manager Menu 13 | ${BOOT_MENU_STRING}= Please select boot device: 14 | ${BOOT_MENU_KEY}= ${F7} 15 | ${SETUP_MENU_KEY}= ${F2} 16 | ${SETUP_MENU_STRING}= Select Entry 17 | ${EDK2_IPXE_CHECKPOINT}= iPXE Shell 18 | ${MANUFACTURER}= MinnowBoard 19 | ${CPU}= Intel Atom E3845 SoC 20 | ${POWER_CTRL}= RteCtrl 21 | ${FLASH_VERIFY_METHOD}= tianocore-shell 22 | ${FLASH_VERIFY_OPTION}= UEFI Shell 23 | ${WIFI_CARD}= ${TBD} 24 | ${MAX_CPU_TEMP}= ${TBD} 25 | 26 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 27 | 28 | # Supported test environments 29 | ${TESTS_IN_FIRMWARE_SUPPORT}= ${TRUE} 30 | ${TESTS_IN_UBUNTU_SUPPORT}= ${FALSE} 31 | ${TESTS_IN_DEBIAN_SUPPORT}= ${FALSE} 32 | ${TESTS_IN_WINDOWS_SUPPORT}= ${FALSE} 33 | 34 | # Regression test flags 35 | ${CUSTOM_BOOT_MENU_KEY_SUPPORT}= ${TRUE} 36 | 37 | 38 | *** Keywords *** 39 | Power On 40 | [Documentation] Implementation of keywords.Power On 41 | Power On Default 42 | -------------------------------------------------------------------------------- /platform-configs/msi-pro-z690-a-ddr5.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/msi-z690-common.robot 3 | 4 | 5 | *** Variables *** 6 | ${FW_VERSION}= v1.1.4-rc1 7 | ${DMIDECODE_SERIAL_NUMBER}= N/A 8 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) ${FW_VERSION} 9 | ${DMIDECODE_PRODUCT_NAME}= MS-7D25 10 | ${DMIDECODE_RELEASE_DATE}= 09/27/2024 11 | 12 | ${CPU_MAX_FREQUENCY}= 5200 13 | ${CPU_MIN_FREQUENCY}= 300 14 | 15 | ${DEF_THREADS_PER_CORE}= 2 16 | ${DEF_THREADS_TOTAL}= 20 17 | ${DEF_ONLINE_CPU}= 0-19 18 | ${DEF_SOCKETS}= 1 19 | 20 | ${DEF_CORES_PER_SOCKET}= 14 21 | 22 | ${CPU_P_CORES_MAX}= 6 23 | ${CPU_E_CORES_MAX}= 8 24 | -------------------------------------------------------------------------------- /platform-configs/msi-pro-z690-a-wifi-ddr4.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/msi-z690-common.robot 3 | 4 | 5 | *** Variables *** 6 | ${FW_VERSION}= v1.1.4-rc1 7 | ${DMIDECODE_SERIAL_NUMBER}= N/A 8 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v1.1.4-rc1 9 | ${DMIDECODE_PRODUCT_NAME}= MS-7D25 10 | ${DMIDECODE_RELEASE_DATE}= 10/07/2024 11 | 12 | ${WIFI_CARD}= Intel(R) Wi-Fi 6 AX201 160MHz 13 | ${WIFI_CARD_UBUNTU}= Intel Corporation Alder Lake-S PCH CNVi WiFi (rev 11) 14 | 15 | ${WIRELESS_CARD_SUPPORT}= ${TRUE} 16 | ${WIRELESS_CARD_WIFI_SUPPORT}= ${TRUE} 17 | ${WIRELESS_CARD_BLUETOOTH_SUPPORT}= ${TRUE} 18 | 19 | ${CPU_MAX_FREQUENCY}= 5000 20 | ${CPU_MIN_FREQUENCY}= 300 21 | 22 | # We have 2 such platforms in the lab and options below are suitable only for one of them as they have different CPUs. 23 | ${DEF_THREADS_PER_CORE}= 2 24 | ${DEF_THREADS_TOTAL}= 28 25 | ${DEF_ONLINE_CPU}= 0-27 26 | ${DEF_SOCKETS}= 1 27 | 28 | ${DEF_CORES_PER_SOCKET}= 20 29 | 30 | ${CPU_P_CORES_MAX}= 8 31 | ${CPU_E_CORES_MAX}= 12 32 | -------------------------------------------------------------------------------- /platform-configs/msi-pro-z790-p-ddr5.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/msi-z690-common.robot 3 | 4 | 5 | *** Variables *** 6 | ${FW_VERSION}= v0.9.2-rc3 7 | ${DMIDECODE_SERIAL_NUMBER}= N/A 8 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v0.9.2-rc3 9 | ${DMIDECODE_PRODUCT_NAME}= MS-7E06 10 | ${DMIDECODE_RELEASE_DATE}= 11/27/2023 11 | 12 | ${CPU_MAX_FREQUENCY}= 5200 13 | ${CPU_MIN_FREQUENCY}= 300 14 | -------------------------------------------------------------------------------- /platform-configs/no-rte.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/default.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_DUT_CONNECTION_METHOD}= Telnet 7 | ${DUT_CONNECTION_METHOD}= ${INITIAL_DUT_CONNECTION_METHOD} 8 | -------------------------------------------------------------------------------- /platform-configs/novacustom-ns50mu.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/novacustom-tgl.robot 3 | Resource include/novacustom-common.robot 4 | 5 | 6 | *** Variables *** 7 | ${INITIAL_DUT_CONNECTION_METHOD}= Telnet 8 | ${DUT_CONNECTION_METHOD}= Telnet 9 | ${POWER_CTRL}= sonoff 10 | 11 | # CPU 12 | ${CPU}= Intel(R) Core(TM) i7-1165G7 CPU 13 | 14 | # Test configuration 15 | ${3_MDEB_WIFI_NETWORK}= 3mdeb_abr 16 | ${CLEVO_BATTERY_CAPACITY}= 3200*1000 17 | ${CLEVO_DISK}= Samsung SSD 980 PRO 18 | ${CLEVO_USB_C_HUB}= 4-port 19 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 20 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 21 | ${DMIDECODE_PRODUCT_NAME}= NS50_70MU 22 | ${EXTERNAL_HEADSET}= USB PnP Audio Device 23 | ${USB_DEVICE}= SanDisk 24 | ${USB_MODEL}= USB Flash Memory 25 | ${CPU_MAX_FREQUENCY}= 4800 26 | ${CPU_MIN_FREQUENCY}= 300 27 | 28 | # dasharo-compability 29 | ${FW_NO_EC_SYNC_DOWNLOAD_LINK}= 30 | ... https://dl.3mdeb.com/open-source-firmware/Dasharo/novacustom_ns5x_tgl/v1.5.1/novacustom_ns5x_tgl_v1.5.1.rom 31 | ${EC_NO_SYNC_DOWNLOAD_LINK}= 32 | ... https://dl.3mdeb.com/open-source-firmware/Dasharo/novacustom_ns5x_tgl/v1.5.1/novacustom_ns5x_tgl_ec_v1.5.1.rom 33 | ${FW_NO_EC_SYNC_VERSION}= v1.5.1 34 | ${EC_NO_SYNC_VERSION}= 2023-10-31_f148431 35 | 36 | ${TESTS_IN_FIRMWARE_SUPPORT}= ${FALSE} 37 | @{TESTED_LINUX_DISTROS}= ${ENV_ID_UBUNTU} ${ENV_ID_FEDORA} 38 | ${DEFAULT_BOOT_OS_ID}= ${ENV_ID_UBUNTU} 39 | 40 | # cpu performance Windows 41 | ${SMALLPT_TEST_SCORE}= 38.263 42 | ${CRAFTY_TEST_SCORE}= 8494085 43 | ${CACHEBENCH_TEST_SCORE}= 97428.4 44 | ${BLAKE2_TEST_SCORE}= 3.51 45 | -------------------------------------------------------------------------------- /platform-configs/novacustom-ns50pu.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/novacustom-adl.robot 3 | Resource include/novacustom-common.robot 4 | 5 | 6 | *** Variables *** 7 | # CPU 8 | ${CPU}= Intel(R) Core(TM) i5-1240P 9 | 10 | # Test configuration 11 | ${3_MDEB_WIFI_NETWORK}= 3mdeb_abr 12 | ${CLEVO_BATTERY_CAPACITY}= 3200*1000 13 | ${CLEVO_DISK}= Samsung SSD 980 PRO 14 | ${CLEVO_USB_C_HUB}= 4-port 15 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 16 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 17 | ${DMIDECODE_PRODUCT_NAME}= NS5x_NS7xPU 18 | ${EXTERNAL_HEADSET}= USB PnP Audio Device 19 | ${USB_DEVICE}= Kingston 20 | ${USB_MODEL}= USB Flash Memory 21 | ${CPU_MAX_FREQUENCY}= 4500 22 | ${CPU_MIN_FREQUENCY}= 300 23 | 24 | ${OPTIONS_LIB}= options-lib_dcu 25 | -------------------------------------------------------------------------------- /platform-configs/novacustom-ns70mu.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/novacustom-tgl.robot 3 | Resource include/novacustom-common.robot 4 | 5 | 6 | *** Variables *** 7 | # CPU 8 | ${CPU}= Intel(R) Core(TM) i7-1165G7 CPU 9 | 10 | # Test configuration 11 | ${3_MDEB_WIFI_NETWORK}= 3mdeb_abr 12 | ${CLEVO_BATTERY_CAPACITY}= 3200*1000 13 | ${CLEVO_DISK}= Samsung SSD 980 PRO 14 | ${CLEVO_USB_C_HUB}= 4-port 15 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 16 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 17 | ${DMIDECODE_PRODUCT_NAME}= NS50_70MU 18 | ${EXTERNAL_HEADSET}= USB PnP Audio Device 19 | ${USB_DEVICE}= SanDisk 20 | ${USB_MODEL}= USB Flash Memory 21 | ${CPU_MAX_FREQUENCY}= 4800 22 | ${CPU_MIN_FREQUENCY}= 300 23 | 24 | # dasharo-compability 25 | ${FW_NO_EC_SYNC_DOWNLOAD_LINK}= 26 | ... https://dl.3mdeb.com/open-source-firmware/Dasharo/novacustom_ns5x_tgl/v1.5.1/novacustom_ns5x_tgl_v1.5.1.rom 27 | ${EC_NO_SYNC_DOWNLOAD_LINK}= 28 | ... https://dl.3mdeb.com/open-source-firmware/Dasharo/novacustom_ns5x_tgl/v1.5.1/novacustom_ns5x_tgl_ec_v1.5.1.rom 29 | ${FW_NO_EC_SYNC_VERSION}= v1.5.1 30 | ${EC_NO_SYNC_VERSION}= 2023-10-31_f148431 31 | 32 | ${OPTIONS_LIB}= options-lib_dcu 33 | -------------------------------------------------------------------------------- /platform-configs/novacustom-ns70pu.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/novacustom-adl.robot 3 | Resource include/novacustom-common.robot 4 | 5 | 6 | *** Variables *** 7 | # CPU 8 | ${CPU}= Intel(R) Core(TM) i7-1260P 9 | 10 | # Test configuration 11 | ${3_MDEB_WIFI_NETWORK}= 3mdeb_abr 12 | ${CLEVO_BATTERY_CAPACITY}= 3200*1000 13 | ${CLEVO_DISK}= Samsung SSD 980 PRO 14 | ${CLEVO_USB_C_HUB}= 4-port 15 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 16 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 17 | ${DMIDECODE_PRODUCT_NAME}= NS5x_NS7xPU 18 | ${EXTERNAL_HEADSET}= USB PnP Audio Device 19 | ${USB_DEVICE}= Kingston 20 | ${USB_MODEL}= USB Flash Memory 21 | ${CPU_MAX_FREQUENCY}= 4500 22 | ${CPU_MIN_FREQUENCY}= 300 23 | 24 | ${OPTIONS_LIB}= options-lib_dcu 25 | -------------------------------------------------------------------------------- /platform-configs/novacustom-nv41mb.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/novacustom-tgl.robot 3 | Resource include/novacustom-common.robot 4 | 5 | 6 | *** Variables *** 7 | # CPU 8 | ${CPU}= Intel(R) Core(TM) i7-1165G7 CPU 9 | 10 | ${3_MDEB_WIFI_NETWORK}= 3mdeb_abr 11 | ${CLEVO_BATTERY_CAPACITY}= 3200*1000 12 | ${CLEVO_DISK}= Samsung SSD 980 PRO 13 | ${CLEVO_USB_C_HUB}= 4-port 14 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 15 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 16 | ${DMIDECODE_PRODUCT_NAME}= NV4XMB,ME,MZ 17 | ${EXTERNAL_HEADSET}= USB PnP Audio Device 18 | ${USB_DEVICE}= SanDisk 19 | ${USB_MODEL}= USB Flash Memory 20 | ${CPU_MAX_FREQUENCY}= 4800 21 | ${CPU_MIN_FREQUENCY}= 300 22 | 23 | ${NVIDIA_GRAPHICS_CARD_SUPPORT}= ${TRUE} 24 | ${OPTIONS_LIB}= options-lib_dcu 25 | 26 | # cpu performance Windows 27 | ${SMALLPT_TEST_SCORE}= 35.376 28 | ${CRAFTY_TEST_SCORE}= 9224291 29 | ${CACHEBENCH_TEST_SCORE}= 104565.1 30 | ${BLAKE2_TEST_SCORE}= 3.64 31 | -------------------------------------------------------------------------------- /platform-configs/novacustom-nv41mz.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/novacustom-tgl.robot 3 | Resource include/novacustom-common.robot 4 | 5 | 6 | *** Variables *** 7 | # CPU 8 | ${CPU}= Intel(R) Core(TM) i7-1165G7 CPU 9 | 10 | # Test configuration 11 | ${3_MDEB_WIFI_NETWORK}= 3mdeb_abr 12 | ${CLEVO_BATTERY_CAPACITY}= 3200*1000 13 | ${CLEVO_DISK}= Samsung SSD 980 PRO 14 | ${CLEVO_USB_C_HUB}= 4-port 15 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 16 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 17 | ${DMIDECODE_PRODUCT_NAME}= NV4XMB,ME,MZ 18 | ${EXTERNAL_HEADSET}= USB PnP Audio Device 19 | ${USB_DEVICE}= SanDisk 20 | ${USB_MODEL}= USB Flash Memory 21 | ${CPU_MAX_FREQUENCY}= 4800 22 | ${CPU_MIN_FREQUENCY}= 300 23 | 24 | ${OPTIONS_LIB}= options-lib_dcu 25 | -------------------------------------------------------------------------------- /platform-configs/novacustom-nv41pz.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/novacustom-adl.robot 3 | Resource include/novacustom-common.robot 4 | 5 | 6 | *** Variables *** 7 | # CPU 8 | ${CPU}= Intel(R) Core(TM) i5-1240P CPU 9 | 10 | # Test configuration 11 | ${3_MDEB_WIFI_NETWORK}= 3mdeb_abr 12 | ${CLEVO_BATTERY_CAPACITY}= 3200*1000 13 | ${CLEVO_DISK}= Samsung SSD 980 PRO 14 | ${CLEVO_USB_C_HUB}= 4-port 15 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 16 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 17 | ${DMIDECODE_PRODUCT_NAME}= NV4xPZ 18 | ${EXTERNAL_HEADSET}= USB PnP Audio Device 19 | ${USB_DEVICE}= Kingston 20 | ${USB_MODEL}= USB Flash Memory 21 | ${CPU_MAX_FREQUENCY}= 4800 22 | ${CPU_MIN_FREQUENCY}= 300 23 | 24 | ${BLUETOOTH_CARD_UBUNTU}= 8087:0026 25 | 26 | ${POWER_CTRL}= none 27 | 28 | ${USB_STACK_SUPPORT}= ${TRUE} 29 | ${TESTS_IN_WINDOWS_SUPPORT}= ${FALSE} 30 | 31 | ${TPM_SUPPORTED_VERSION}= 2 32 | ${TPM_EXPECTED_CHIP}= SLB9670 33 | 34 | ${OPTIONS_LIB}= options-lib_dcu 35 | 36 | # cpu performance Windows 37 | ${SMALLPT_TEST_SCORE}= 30.796 38 | ${CRAFTY_TEST_SCORE}= 7480997 39 | ${CACHEBENCH_TEST_SCORE}= 75584.7 40 | ${BLAKE2_TEST_SCORE}= 3.22 41 | -------------------------------------------------------------------------------- /platform-configs/novacustom-ts1.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource ${INSTALLED_DUT}.robot 3 | # *** Variables *** 4 | # TBD: docking stations, peripherals 5 | # *** Keywords *** 6 | # TBD: external flashing, power control? 7 | -------------------------------------------------------------------------------- /platform-configs/novacustom-v560tne.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/novacustom-common.robot 3 | Resource include/novacustom-mtl.robot 4 | 5 | 6 | *** Variables *** 7 | ${CPU}= Intel(R) Core(TM) Ultra 7 155H 8 | 9 | ${3_MDEB_WIFI_NETWORK}= 3mdeb_abr 10 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 11 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 12 | ${DMIDECODE_PRODUCT_NAME}= V5xTNC_TND_TNE 13 | ${EXTERNAL_HEADSET}= USB PnP Audio Device 14 | ${CPU_MAX_FREQUENCY}= 4800 15 | ${CPU_MIN_FREQUENCY}= 200 16 | ${PLATFORM_CPU_SPEED}= 3.0 17 | 18 | ${TESTS_IN_WINDOWS_SUPPORT}= ${FALSE} # change windows/ubuntu support depending 19 | ${TESTS_IN_UBUNTU_SUPPORT}= ${TRUE} # on which OS is first in the boot order 20 | 21 | ${USB_DETECTION_ITERATIONS_NUMBER}= 3 22 | ${BOOT_FROM_USB_ITERATIONS_NUMBER}= 3 23 | ${WIFI_CARD}= Intel(R) Wi-Fi 6E AX211 160MHz 24 | ${DGPU_ONLY_SUPPORT}= ${TRUE} 25 | ${CLEVO_USB_C_HUB}= Thunderbolt 4 Dock 26 | 27 | # performance 28 | ${ZIP_MULTI_COMPRESSION}= 79729 # MIPS 29 | ${ZIP_MULTI_DECOMPRESSION}= 52410 # MIPS 30 | ${CRAY_5_K_RENDER}= 585.333 # sec 31 | ${CRAY_4_K_RENDER}= 326.895 # sec 32 | ${CRAY_1080_P_RENDER}= 80.547 # sec 33 | ${COREMARK_SINGLE}= 407451.446 # iterations/s 34 | 35 | # disk i-o 36 | ${UBU_SEQ_READ_QUEUED}= 5953.5 # MB/s 37 | ${UBU_SEQ_WRITE_QUEUED}= 5728.6 # MB/s 38 | ${UBU_SEQ_READ_NONQUE}= 4357.4 # MB/s 39 | ${UBU_SEQ_WRITE_NONQUE}= 4293.5 # MB/s 40 | ${UBU_RAND_READ_QUEUED}= 5944.8 # MB/s 41 | ${UBU_RAND_WRITE_QUEUED}= 5634.1 # MB/s 42 | ${UBU_RAND_READ_NONQUE}= 3653.9 # MB/s 43 | ${UBU_RAND_WRITE_NONQUE}= 4083.7 # MB/s 44 | 45 | ${WIN_SEQ_READ_QUEUED}= ${EMPTY} # MB/s 46 | ${WIN_SEQ_WRITE_QUEUED}= ${EMPTY} # MB/s 47 | ${WIN_SEQ_READ_NONQUE}= ${EMPTY} # MB/s 48 | ${WIN_SEQ_WRITE_NONQUE}= ${EMPTY} # MB/s 49 | ${WIN_RAND_READ_QUEUED}= ${EMPTY} # MB/s 50 | ${WIN_RAND_WRITE_QUEUED}= ${EMPTY} # MB/s 51 | ${WIN_RAND_READ_NONQUE}= ${EMPTY} # MB/s 52 | ${WIN_RAND_WRITE_NONQUE}= ${EMPTY} # MB/s 53 | 54 | # GPU Performance 55 | # Reference config: Medium preset, 1920x1080, Windowed 56 | ${GPU_PERFORMANCE_TESTS_SUPPORT}= ${TRUE} 57 | ${NVIDIA_GRAPHICS_CARD_SUPPORT}= ${TRUE} 58 | ${UNIGINE_SUPERPOSITION_RESULT_AC}= 114 # FPS 59 | ${UNIGINE_SUPERPOSITION_RESULT_BAT}= 26.2 # FPS 60 | 61 | ${OPTIONS_LIB}= options-lib_dcu 62 | -------------------------------------------------------------------------------- /platform-configs/optiplex-7010.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/optiplex-common.robot 3 | 4 | 5 | *** Variables *** 6 | ${DEVICE_USB_KEYBOARD}= SiGma Micro Keyboard TRACER Gamma Ivory 7 | ${USB_MODEL}= Kingston 8 | ${USB_DEVICE}= Multifunction Composite Gadget 9 | 10 | ${CPU}= Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz 11 | ${PLATFORM_CPU_SPEED}= 3.20 12 | ${INITIAL_CPU_FREQUENCY}= 1600 13 | ${CPU_MIN_FREQUENCY}= 300 14 | ${CPU_MAX_FREQUENCY}= 3600 15 | ${PLATFORM_RAM_SPEED}= 800 16 | ${DEF_THREADS_TOTAL}= 4 17 | ${DEF_THREADS_PER_CORE}= 1 18 | ${DEF_CORES_PER_SOCKET}= 4 19 | ${DEF_SOCKETS}= 1 20 | ${DEF_ONLINE_CPU}= 0-3 21 | ${DEF_CORES}= 2 22 | ${DEF_THREADS}= 1 23 | ${DEF_CPU}= 2 24 | ${DRAM_SIZE}= ${16384} 25 | ${PLATFORM_RAM_SIZE}= 16384 26 | 27 | ${DMIDECODE_PRODUCT_NAME}= OptiPlex 9010 28 | ${DMIDECODE_SERIAL_NUMBER}= 123456789 29 | ${DMIDECODE_MANUFACTURER}= Dell Inc. 30 | 31 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 32 | -------------------------------------------------------------------------------- /platform-configs/optiplex-9010.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/optiplex-common.robot 3 | -------------------------------------------------------------------------------- /platform-configs/pcengines-apu2.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/pcengines.robot 3 | 4 | 5 | *** Variables *** 6 | ${DMIDECODE_PRODUCT_NAME}= apu2 7 | ${FLASH_VERIFY_METHOD}= none 8 | ${PLATFORM_CPU_SPEED}= 1.0 9 | ${PLATFORM_RAM_SPEED}= 1333 10 | ${PLATFORM_RAM_SIZE}= 4096 11 | ${BIOS_LOCK_SUPPORT}= ${True} 12 | 13 | 14 | *** Keywords *** 15 | Power On 16 | [Documentation] Implementation of keywords.Power On 17 | Power On Default 18 | -------------------------------------------------------------------------------- /platform-configs/pcengines-apu3.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/pcengines.robot 3 | 4 | 5 | *** Variables *** 6 | ${DMIDECODE_PRODUCT_NAME}= apu3 7 | -------------------------------------------------------------------------------- /platform-configs/pcengines-apu4.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/pcengines.robot 3 | 4 | 5 | *** Variables *** 6 | ${DMIDECODE_PRODUCT_NAME}= apu4 7 | -------------------------------------------------------------------------------- /platform-configs/pcengines-apu6.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/pcengines.robot 3 | 4 | 5 | *** Variables *** 6 | ${DMIDECODE_PRODUCT_NAME}= apu6 7 | -------------------------------------------------------------------------------- /platform-configs/protectli-v1210.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-v1x10.robot 3 | 4 | 5 | *** Variables *** 6 | ${DMIDECODE_PRODUCT_NAME}= V1210 7 | 8 | ${CPU_MAX_FREQUENCY}= 2900 9 | ${CPU_MIN_FREQUENCY}= 800 10 | ${PLATFORM_CPU_SPEED}= 2.00 11 | ${PLATFORM_RAM_SPEED}= 2933 12 | ${PLATFORM_RAM_SIZE}= 4096 13 | 14 | # List of ethernet interfaces 15 | @{ETH_PORTS}= 64-62-66-2f-00-12 16 | ... 64-62-66-2f-00-13 17 | ${ETHERNET_ID}= 8086:125c 18 | @{ETH_PERF_PAIR_2_G}= eno0 eno1 19 | -------------------------------------------------------------------------------- /platform-configs/protectli-v1211.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-v1x10.robot 3 | 4 | 5 | *** Variables *** 6 | ${DMIDECODE_PRODUCT_NAME}= V1211 7 | 8 | ${CPU_MAX_FREQUENCY}= 2900 9 | ${CPU_MIN_FREQUENCY}= 800 10 | ${PLATFORM_CPU_SPEED}= 2.00 11 | ${PLATFORM_RAM_SPEED}= 2933 12 | ${PLATFORM_RAM_SIZE}= 8192 13 | 14 | # List of ethernet interfaces 15 | @{ETH_PORTS}= 64-62-66-2f-07-d2 16 | ... 64-62-66-2f-07-d3 17 | ${ETHERNET_ID}= 8086:125c 18 | @{ETH_PERF_PAIR_2_G}= eno0 eno1 19 | -------------------------------------------------------------------------------- /platform-configs/protectli-v1410.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-v1x10.robot 3 | 4 | 5 | *** Variables *** 6 | ${DMIDECODE_PRODUCT_NAME}= V1410 7 | 8 | ${CPU_MAX_FREQUENCY}= 2900 9 | ${CPU_MIN_FREQUENCY}= 800 10 | ${PLATFORM_CPU_SPEED}= 2.00 11 | ${PLATFORM_RAM_SPEED}= 2933 12 | ${PLATFORM_RAM_SIZE}= 8192 13 | 14 | @{ETH_PERF_PAIR_2_G}= enp2s0 enp5s0 15 | 16 | # List of ethernet interfaces 17 | @{ETH_PORTS}= 64-62-66-2f-08-4a 18 | ... 64-62-66-2f-08-4b 19 | ... 64-62-66-2f-08-4c 20 | ... 64-62-66-2f-08-4d 21 | ${ETHERNET_ID}= 8086:125c 22 | -------------------------------------------------------------------------------- /platform-configs/protectli-v1610.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-v1x10.robot 3 | 4 | 5 | *** Variables *** 6 | ${DMIDECODE_PRODUCT_NAME}= V1610 7 | 8 | ${CPU_MAX_FREQUENCY}= 3100 9 | ${CPU_MIN_FREQUENCY}= 800 10 | ${PLATFORM_CPU_SPEED}= 2.00 11 | ${PLATFORM_RAM_SPEED}= 2933 12 | ${PLATFORM_RAM_SIZE}= 16384 13 | 14 | @{ETH_PERF_PAIR_2_G}= enp4s0 enp5s0 15 | 16 | # List of ethernet interfaces 17 | @{ETH_PORTS}= 64-62-66-2f-09-f0 18 | ... 64-62-66-2f-09-f1 19 | ... 64-62-66-2f-09-f2 20 | ... 64-62-66-2f-09-f3 21 | ... 64-62-66-2f-09-f4 22 | ... 64-62-66-2f-09-f5 23 | ${ETHERNET_ID}= 8086:125c 24 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp2410.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-common.robot 3 | 4 | 5 | *** Variables *** 6 | ${FLASH_SIZE}= ${8*1024*1024} 7 | ${WIFI_CARD}= ${TBD} 8 | ${WIFI_CARD_UBUNTU}= ${TBD} 9 | ${LTE_CARD}= ${TBD} 10 | ${DEF_ONLINE_CPU}= 0-3 11 | ${DEF_SOCKETS}= 1 12 | ${INITIAL_CPU_FREQUENCY}= 2000 13 | ${MAX_CPU_TEMP}= 77 14 | ${CPU_MAX_FREQUENCY}= 2800 15 | ${CPU_MIN_FREQUENCY}= 300 16 | ${CHECK_POWER_LED_SUPPORT}= ${False} 17 | 18 | # eMMC driver support 19 | ${E_MMC_NAME}= 8GTF4R 20 | 21 | ${DMIDECODE_SERIAL_NUMBER}= N/A 22 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v 23 | ${DMIDECODE_PRODUCT_NAME}= VP2410 24 | ${DMIDECODE_RELEASE_DATE}= ${TBD} 25 | ${DMIDECODE_MANUFACTURER}= Protectli 26 | ${DMIDECODE_VENDOR}= 3mdeb 27 | ${DMIDECODE_FAMILY}= Vault Pro 28 | ${DMIDECODE_TYPE}= Desktop 29 | 30 | ${L3_CACHE_SUPPORT}= ${FALSE} 31 | ${DASHARO_SECURITY_MENU_SUPPORT}= ${TRUE} 32 | 33 | # Test module: dasharo-security 34 | ${MEASURED_BOOT_SUPPORT}= ${TRUE} 35 | ${SMM_WRITE_PROTECTION_SUPPORT}= ${TRUE} 36 | ${UEFI_PASSWORD_SUPPORT}= ${TRUE} 37 | ${ME_STATICALLY_DISABLED}= ${TRUE} 38 | 39 | ${PLATFORM_CPU_SPEED}= 2.00 40 | ${PLATFORM_RAM_SPEED}= 2400 41 | ${PLATFORM_RAM_SIZE}= 8192 42 | 43 | @{ETH_PERF_PAIR_1_G}= enp2s0 enp3s0 44 | 45 | @{ETH_PORTS}= 64-62-66-21-03-b8 46 | ... 64-62-66-21-03-b9 47 | ... 64-62-66-21-03-ba 48 | ... 64-62-66-21-03-bb 49 | 50 | ${ETHERNET_ID}= 8086:1539 51 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp2420.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp24xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 2600 7 | ${FLASHING_METHOD}= internal 8 | 9 | # eMMC driver support 10 | ${E_MMC_NAME}= 8GTF4R 11 | 12 | ${DMIDECODE_SERIAL_NUMBER}= N/A 13 | ${DMIDECODE_FIRMWARE_VERSION}= 14 | ... Dasharo (coreboot+UEFI) v1.2.1-rc3 15 | ${DMIDECODE_PRODUCT_NAME}= VP2420 16 | ${DMIDECODE_RELEASE_DATE}= 1/13/2025 17 | ${DMIDECODE_TYPE}= Desktop 18 | 19 | ${CPU_MAX_FREQUENCY}= 2700 20 | ${CPU_MIN_FREQUENCY}= 300 21 | 22 | ${WATCHDOG_SUPPORT}= ${TRUE} 23 | 24 | ${DEF_THREADS_TOTAL}= 4 25 | ${DEF_THREADS_PER_CORE}= 1 26 | ${DEF_CORES_PER_SOCKET}= 4 27 | ${DEF_SOCKETS}= 1 28 | ${DEF_ONLINE_CPU}= 0-3 29 | 30 | ${PLATFORM_CPU_SPEED}= 2.00 31 | ${PLATFORM_RAM_SPEED}= 2933 32 | ${PLATFORM_RAM_SIZE}= 8192 33 | 34 | ${WIFI_CARD}= Qualcomm Atheros QCA61x4A Wireless Network Adapter 35 | ${WIFI_CARD_UBUNTU}= Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter 36 | 37 | @{ETH_PERF_PAIR_2_G}= enp3s0 enp4s0 38 | 39 | @{ETH_PORTS}= 00-e0-67-1c-29-79 40 | ... 00-e0-67-1c-29-7a 41 | ... 00-e0-67-1c-29-7b 42 | ... 00-e0-67-1c-29-7c 43 | 44 | ${ETHERNET_ID}= 8086:15f3 45 | ${NVME_DISK_SUPPORT}= ${FALSE} 46 | 47 | ${TPM_EXPECTED_CHIP}= SLB9670 48 | 49 | 50 | *** Keywords *** 51 | Flash Protectli VP2420 Internal 52 | Make Sure That Flash Locks Are Disabled 53 | Power On 54 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 55 | Login To Linux 56 | Switch To Root User 57 | Send File To DUT ${FW_FILE} /tmp/dasharo.rom 58 | Flash Via Internal Programmer /tmp/dasharo.rom "bios" 59 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp2430.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp24xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 3300 7 | ${FLASHING_METHOD}= external 8 | 9 | # eMMC driver support 10 | ${E_MMC_NAME}= BJTD4R 11 | 12 | ${DMIDECODE_SERIAL_NUMBER}= 123456789 13 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v0.9.0-rc2 14 | ${DMIDECODE_PRODUCT_NAME}= VP2430 15 | ${DMIDECODE_RELEASE_DATE}= 12/17/2024 16 | ${DMIDECODE_TYPE}= Desktop 17 | 18 | ${CPU_MAX_FREQUENCY}= 3400 19 | ${CPU_MIN_FREQUENCY}= 700 20 | 21 | ${WATCHDOG_SUPPORT}= ${FALSE} 22 | 23 | ${DEF_THREADS_TOTAL}= 4 24 | ${DEF_THREADS_PER_CORE}= 1 25 | ${DEF_CORES_PER_SOCKET}= 4 26 | ${DEF_SOCKETS}= 1 27 | ${DEF_ONLINE_CPU}= 0-3 28 | 29 | ${PLATFORM_CPU_SPEED}= 0.80 # get-robot-variables suggests 3,40, but 0,80 is what setup menu shows 30 | ${PLATFORM_RAM_SPEED}= 4800 31 | ${PLATFORM_RAM_SIZE}= 49152 32 | 33 | ${CPU}= Intel(R) N100 34 | 35 | ${WIFI_CARD}= Qualcomm Atheros QCA61x4A Wireless Network Adapter 36 | ${WIFI_CARD_UBUNTU}= Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32) 37 | ${BLUETOOTH_CARD_UBUNTU}= Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32) 38 | ${USB_MODEL}= SanDisk 39 | ${USB_DEVICE}= SanDisk 40 | @{ATTACHED_USB}= SanDisk 41 | 42 | ${ESP_SCANNING_SUPPORT}= ${TRUE} 43 | @{ETH_PORTS}= 00-e0-97-1b-00-47 44 | ... 00-e0-97-1b-00-48 45 | ... 00-e0-97-1b-00-49 46 | ... 00-e0-97-1b-00-4a 47 | @{ETH_PERF_PAIR_2_G}= enp3s0 enp4s0 48 | 49 | ${ETHERNET_ID}= 8086:125c 50 | 51 | ${TPM_EXPECTED_CHIP}= SLB9670 52 | ${SATA_SUPPORT}= ${TRUE} 53 | ${CLEVO_DISK}= KINGSTON SNV3S500G 54 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller: Kingston Technology Company 55 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp2440.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp24xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 3300 7 | ${FLASHING_METHOD}= external 8 | 9 | # eMMC driver support 10 | ${E_MMC_NAME}= BJTD4R 11 | 12 | # dmidecode.robot 13 | ${DMIDECODE_SERIAL_NUMBER}= 123456789 14 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v0.9.0-rc1 15 | ${DMIDECODE_PRODUCT_NAME}= VP2440 16 | ${DMIDECODE_RELEASE_DATE}= 05/15/2025 17 | ${DMIDECODE_TYPE}= Desktop 18 | 19 | # CPF 20 | ${CPU_MAX_FREQUENCY}= 3400 21 | ${CPU_MIN_FREQUENCY}= 700 22 | 23 | ${WATCHDOG_SUPPORT}= ${FALSE} 24 | 25 | ${DEF_THREADS_TOTAL}= 4 26 | ${DEF_THREADS_PER_CORE}= 1 27 | ${DEF_CORES_PER_SOCKET}= 4 28 | ${DEF_SOCKETS}= 1 29 | ${DEF_ONLINE_CPU}= 0-3 30 | 31 | ${PLATFORM_CPU_SPEED}= 0.80 # get-robot-variables suggests 3,40, but 0,80 is what setup menu shows 32 | ${PLATFORM_RAM_SPEED}= 4800 33 | ${PLATFORM_RAM_SIZE}= 49152 34 | 35 | ${CPU}= Intel(R) N100 36 | 37 | ${WIFI_CARD}= MEDIATEK Corp. Device 7906 38 | ${WIFI_CARD_UBUNTU}= MEDIATEK Corp. Device 7906 39 | ${BLUETOOTH_CARD_UBUNTU}= Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32) 40 | ${USB_MODEL}= SanDisk 41 | ${USB_DEVICE}= SanDisk 42 | @{ATTACHED_USB}= SanDisk 43 | 44 | ${ESP_SCANNING_SUPPORT}= ${TRUE} 45 | @{ETH_PORTS}= 00-e0-97-1b-95-25 46 | ... 00-e0-97-1b-95-26 47 | 48 | @{ETH_PERF_PAIR_2_G}= enp3s0 enp4s0 49 | 50 | ${ETHERNET_ID}= 8086:125c 51 | 52 | ${TPM_EXPECTED_CHIP}= SLB9670 53 | ${SATA_SUPPORT}= ${TRUE} 54 | ${CLEVO_DISK}= Protectli 256GB M.2 55 | ${DEVICE_NVME_DISK}= 56 | ... Non-Volatile memory controller: Phison Electronics Corporation PS5019-E19 PCIe4 NVMe Controller 57 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp3210.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp32xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 700 7 | ${PLATFORM_CPU_SPEED}= 0.80 8 | ${CPU_MIN_FREQUENCY}= 700 9 | ${CPU_MAX_FREQUENCY}= 3400 10 | ${PLATFORM_RAM_SPEED}= 4800 11 | ${PLATFORM_RAM_SIZE}= 16384 12 | 13 | ${WIFI_CARD}= Qualcomm Atheros QCA61x4A Wireless Network Adapter 14 | ${WIFI_CARD_UBUNTU}= Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter 15 | ${BLUETOOTH_CARD_UBUNTU}= Qualcomm Atheros Communications AR3012 Bluetooth 4.0 16 | 17 | ${E_MMC_NAME}= BJTD4R 18 | ${CPU}= Intel(R) N100 19 | 20 | ${DMIDECODE_MANUFACTURER}= Protectli 21 | ${DMIDECODE_SERIAL_NUMBER}= 123456789 22 | ${DMIDECODE_PRODUCT_NAME}= VP3210 23 | ${DMIDECODE_FAMILY}= Vault Pro 24 | ${DMIDECODE_TYPE}= Desktop 25 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v0.9.0-rc10 26 | ${DMIDECODE_RELEASE_DATE}= 03/14/2025 27 | ${DEF_THREADS_TOTAL}= 4 28 | ${DEF_THREADS_PER_CORE}= 1 29 | ${DEF_CORES_PER_SOCKET}= 4 30 | ${DEF_SOCKETS}= 1 31 | ${DEF_ONLINE_CPU}= 0-3 32 | ${DEVICE_AUDIO1}= Alderlake-P HDMI 33 | ${DEVICE_AUDIO2}= ${EMPTY} 34 | ${DEVICE_AUDIO1_WIN}= High Definition Audio Controller 35 | 36 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 37 | ${CLEVO_DISK}= N/A 38 | 39 | @{ETH_PORTS}= 64-62-66-23-90-47 40 | ... 64-62-66-23-90-48 41 | 42 | ${TPM_SUPPORTED_VERSION}= 2 43 | ${TPM_EXPECTED_CHIP}= SLB9670 44 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp3230.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp32xx.robot 3 | 4 | 5 | *** Variables *** 6 | # Automatically found variables 7 | ${POWER_CTRL}= sonoff 8 | 9 | ${DEVICE_USB_KEYBOARD}= Logitech, Inc. Keyboard K120 10 | 11 | ${INITIAL_CPU_FREQUENCY}= 800 12 | ${PLATFORM_CPU_SPEED}= 3.80 13 | ${CPU_MIN_FREQUENCY}= 800 14 | ${CPU_MAX_FREQUENCY}= 3800 15 | ${PLATFORM_RAM_SPEED}= 4800 16 | ${PLATFORM_RAM_SIZE}= 16384 17 | 18 | ${WIFI_CARD}= Qualcomm Atheros QCA61x4A Wireless Network Adapter 19 | ${WIFI_CARD_UBUNTU}= Qualcomm Atheros AR9462 Wireless Network Adapter (rev 01) 20 | ${BLUETOOTH_CARD_UBUNTU}= Qualcomm Atheros Communications AR3012 Bluetooth 4.0 21 | 22 | ${E_MMC_NAME}= BJTD4R 23 | ${CPU}= Intel(R) Core(TM) i3-N305 24 | 25 | ${DMIDECODE_MANUFACTURER}= Protectli 26 | ${DMIDECODE_SERIAL_NUMBER}= 123456789 27 | ${DMIDECODE_PRODUCT_NAME}= VP3230 28 | ${DMIDECODE_FAMILY}= Vault Pro 29 | ${DMIDECODE_TYPE}= Desktop 30 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v0.9.0-rc10 31 | ${DMIDECODE_RELEASE_DATE}= 03/14/2025 32 | ${DEF_THREADS_TOTAL}= 8 33 | ${DEF_THREADS_PER_CORE}= 1 34 | ${DEF_CORES_PER_SOCKET}= 8 35 | ${DEF_SOCKETS}= 1 36 | ${DEF_ONLINE_CPU}= 0-7 37 | 38 | ${DEVICE_NVME_DISK}= Phison Electronics Corporation PS5019-E19 39 | ${CLEVO_DISK}= Protectli 256GB M.2 40 | 41 | @{ETH_PORTS}= 64-62-66-23-8f-19 42 | ... 64-62-66-23-8f-1a 43 | 44 | ${TPM_SUPPORTED_VERSION}= 2 45 | ${TPM_EXPECTED_CHIP}= SLB9670 46 | 47 | @{ETH_PERF_PAIR_2_G}= enp2s0 enp4s0 48 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp4630.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp46xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 2100 7 | ${DEF_CORES_PER_SOCKET}= 2 8 | ${DEF_THREADS_PER_CORE}= 2 9 | ${DEF_THREADS_TOTAL}= 4 10 | ${DEF_ONLINE_CPU}= 0-3 11 | ${DEF_SOCKETS}= 1 12 | 13 | ${WIFI_CARD_UBUNTU}= Wi-Fi 6 AX200 14 | ${LTE_CARD}= ME906s LTE 15 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 16 | ${USB_MODEL}= SanDisk 17 | 18 | ${DMIDECODE_PRODUCT_NAME}= VP4630 19 | 20 | ${CPU_MAX_FREQUENCY}= 4200 21 | ${CPU_MIN_FREQUENCY}= 300 22 | 23 | @{ETH_PORTS}= 00-e0-97-1b-99-50 24 | ... 00-e0-97-1b-99-51 25 | ... 00-e0-97-1b-99-52 26 | ... 00-e0-97-1b-99-53 27 | ... 00-e0-97-1b-99-54 28 | ... 00-e0-97-1b-99-55 29 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp4650.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp46xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 2200 7 | ${DEF_CORES_PER_SOCKET}= 4 8 | ${DEF_THREADS_PER_CORE}= 2 9 | ${DEF_THREADS_TOTAL}= 8 10 | ${DEF_ONLINE_CPU}= 0-7 11 | ${DEF_SOCKETS}= 1 12 | 13 | ${POWER_CTRL}= sonoff 14 | ${WIFI_CARD_UBUNTU}= Qualcomm Atheros QCA6174 15 | ${LTE_CARD}= ${TBD} 16 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 17 | ${USB_MODEL}= SanDisk 18 | 19 | ${DMIDECODE_PRODUCT_NAME}= VP4650 20 | 21 | ${CPU_MAX_FREQUENCY}= 4300 22 | ${CPU_MIN_FREQUENCY}= 300 23 | 24 | @{ETH_PORTS}= 64-62-66-21-42-91 25 | ... 64-62-66-21-42-90 26 | ... 64-62-66-21-42-8f 27 | ... 64-62-66-21-42-8e 28 | ... 64-62-66-21-42-8d 29 | ... 64-62-66-21-42-8c 30 | 31 | ${TPM_SUPPORTED_VERSION}= 2 32 | ${TPM_EXPECTED_CHIP}= SLB9665 33 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp4670.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp46xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 1100 7 | ${DEF_CORES_PER_SOCKET}= 6 8 | ${DEF_THREADS_PER_CORE}= 2 9 | ${DEF_THREADS_TOTAL}= 12 10 | ${DEF_ONLINE_CPU}= 0-11 11 | ${DEF_SOCKETS}= 1 12 | 13 | ${POWER_CTRL}= sonoff 14 | ${WIFI_CARD_UBUNTU}= Qualcomm Atheros QCA6174 15 | ${LTE_CARD}= ${TBD} 16 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 17 | ${USB_MODEL}= SanDisk 18 | 19 | ${DMIDECODE_PRODUCT_NAME}= VP4670 20 | 21 | ${CPU_MAX_FREQUENCY}= 5000 22 | ${CPU_MIN_FREQUENCY}= 300 23 | 24 | # Ethernet ports for V2.0A (we have 2 in lab at the moment of me writing this) 25 | @{ETH_PORTS}= 64-62-66-22-93-db 26 | ... 64-62-66-22-93-dc 27 | ... 64-62-66-22-93-dd 28 | ... 64-62-66-22-93-de 29 | ... 64-62-66-22-93-df 30 | ... 64-62-66-22-93-e0 31 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp6650.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp66xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 1100 7 | ${DEF_CORES_PER_SOCKET}= 6 8 | ${DEF_THREADS_PER_CORE}= 2 9 | ${DEF_THREADS_TOTAL}= 12 10 | ${DEF_ONLINE_CPU}= 0-11 11 | ${DEF_SOCKETS}= 1 12 | 13 | ${POWER_CTRL}= sonoff 14 | ${WIFI_CARD_UBUNTU}= ${TBD} 15 | ${LTE_CARD}= ${TBD} 16 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 17 | ${USB_MODEL}= SanDisk 18 | 19 | ${DMIDECODE_PRODUCT_NAME}= VP6650 20 | 21 | ${CPU_MIN_FREQUENCY}= 400 22 | ${CPU_MAX_FREQUENCY}= 4400 23 | ${PLATFORM_CPU_SPEED}= 2.50 24 | ${PLATFORM_RAM_SPEED}= 4200 25 | ${PLATFORM_RAM_SIZE}= 65536 26 | 27 | @{ETH_PORTS}= 64-62-66-22-84-f5 28 | ... 64-62-66-22-84-f6 29 | ... 64-62-66-22-84-f7 30 | ... 64-62-66-22-84-f8 31 | 32 | 33 | *** Keywords *** 34 | Power On 35 | Protectli-common.Power On 36 | -------------------------------------------------------------------------------- /platform-configs/protectli-vp6670.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Resource include/protectli-vp66xx.robot 3 | 4 | 5 | *** Variables *** 6 | ${INITIAL_CPU_FREQUENCY}= 1100 7 | ${DEF_CORES_PER_SOCKET}= 10 8 | ${DEF_THREADS_PER_CORE}= 2 9 | ${DEF_THREADS_TOTAL}= 12 10 | ${DEF_ONLINE_CPU}= 0-11 11 | ${DEF_SOCKETS}= 1 12 | 13 | ${POWER_CTRL}= sonoff 14 | ${LTE_CARD}= ${TBD} 15 | ${DEVICE_NVME_DISK}= Non-Volatile memory controller 16 | ${USB_MODEL}= SanDisk 17 | @{ATTACHED_USB}= Wilk USB 18 | 19 | ${DMIDECODE_PRODUCT_NAME}= VP6670 20 | 21 | ${CPU_MIN_FREQUENCY}= 400 22 | ${CPU_MAX_FREQUENCY}= 4700 23 | ${PLATFORM_CPU_SPEED}= 2.60 24 | ${PLATFORM_RAM_SPEED}= 4200 25 | ${PLATFORM_RAM_SIZE}= 32768 26 | 27 | # List of ethernet interfaces 28 | @{ETH_PORTS}= 64-62-66-22-89-99 29 | ... 64-62-66-22-89-9a 30 | ... 64-62-66-22-89-9b 31 | ... 64-62-66-22-89-9c 32 | @{ETH_PERF_PAIR_2_G}= enp5s0 enp6s0 33 | @{ETH_PERF_PAIR_10_G}= enp2s0f0np0 enp2s0f1np1 34 | -------------------------------------------------------------------------------- /platform-configs/qemu-selftests.robot: -------------------------------------------------------------------------------- 1 | *** Comments *** 2 | This config targets QEMU firmware with as many menus enabled as possible. 3 | 4 | 5 | *** Settings *** 6 | Library ../lib/QemuMonitor.py /tmp/qmp-socket 7 | Resource include/default.robot 8 | 9 | 10 | *** Variables *** 11 | ${INITIAL_DUT_CONNECTION_METHOD}= Telnet 12 | ${DUT_CONNECTION_METHOD}= ${INITIAL_DUT_CONNECTION_METHOD} 13 | ${RTE_S2_N_PORT}= 1234 14 | ${FLASH_SIZE}= ${8*1024*1024} 15 | ${BOOT_MENU_KEY}= ${ESC} 16 | ${SETUP_MENU_KEY}= ${F2} 17 | ${MANUFACTURER}= QEMU 18 | ${POWER_CTRL}= RteCtrl 19 | ${FLASHING_METHOD}= none 20 | 21 | ${DMIDECODE_SERIAL_NUMBER}= N/A 22 | ${DMIDECODE_FIRMWARE_VERSION}= Dasharo (coreboot+UEFI) v0.2.0 23 | ${DMIDECODE_PRODUCT_NAME}= QEMU x86 q35/ich9 24 | ${DMIDECODE_RELEASE_DATE}= 06/21/2024 25 | ${DMIDECODE_MANUFACTURER}= Emulation 26 | ${DMIDECODE_VENDOR}= 3mdeb 27 | ${DMIDECODE_FAMILY}= N/A 28 | ${DMIDECODE_TYPE}= Desktop 29 | 30 | # Supported test environments 31 | ${TESTS_IN_FIRMWARE_SUPPORT}= ${TRUE} 32 | ${TESTS_IN_UBUNTU_SUPPORT}= ${TRUE} 33 | ${TESTS_IN_METATB_SUPPORT}= ${TRUE} 34 | 35 | # Regression test flags 36 | ${DASHARO_SECURITY_MENU_SUPPORT}= ${TRUE} 37 | ${DASHARO_USB_MENU_SUPPORT}= ${TRUE} 38 | ${DASHARO_NETWORKING_MENU_SUPPORT}= ${TRUE} 39 | ${DASHARO_INTEL_ME_MENU_SUPPORT}= ${TRUE} 40 | ${DASHARO_CHIPSET_MENU_SUPPORT}= ${TRUE} 41 | ${DASHARO_POWER_MGMT_MENU_SUPPORT}= ${TRUE} 42 | ${DASHARO_PCI_PCIE_MENU_SUPPORT}= ${TRUE} 43 | ${DASHARO_MEMORY_MENU_SUPPORT}= ${TRUE} 44 | 45 | 46 | *** Keywords *** 47 | Power On 48 | Read From Terminal 49 | Qemu Monitor.System Reset 50 | -------------------------------------------------------------------------------- /requirements-openbmc.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | git+https://github.com/3mdeb/robotframework 6 | robotframework-sshlibrary==3.5.1 7 | robotframework-requests==0.9.4 8 | git+https://github.com/3mdeb/pyte@ignore_param_errors 9 | dbbot-sqlalchemy==0.2 10 | gspread==3.1.0 11 | oauth2client 12 | PyOpenSSL 13 | wakeonlan 14 | cryptography 15 | git-cliff==2.6.1 16 | robotframework-httplibrary 17 | redfish 18 | reuse==4.0.3 19 | robotframework-scplibrary 20 | tox 21 | paramiko>=2.5.0 22 | click 23 | PyYAML>=5.1 24 | redfishtool 25 | robotframework-selenium2library 26 | webdriver_manager 27 | robotframework-angularjs 28 | robotframework-xvfb 29 | websocket-client 30 | pyotp 31 | pre-commit 32 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | attrs==24.3.0 6 | bcrypt==4.1.2 7 | binaryornot==0.4.4 8 | boolean.py==4.0 9 | certifi==2024.2.2 10 | cffi==1.17.1 11 | cfgv==3.4.0 12 | chardet==5.2.0 13 | charset-normalizer==3.3.2 14 | click==8.1.7 15 | colorama==0.4.6 16 | contourpy==1.3.1 17 | cryptography==42.0.5 18 | cycler==0.12.1 19 | dbbot-sqlalchemy==0.2 20 | distlib==0.3.8 21 | Faker==24.11.0 22 | filelock==3.13.4 23 | fonttools==4.56.0 24 | git-cliff==2.6.1 25 | greenlet==3.1.1 26 | gspread==3.1.0 27 | httplib2==0.22.0 28 | identify==2.5.36 29 | idna==3.7 30 | importlib_resources==6.4.0 31 | Jinja2==3.1.3 32 | kiwisolver==1.4.8 33 | license-expression==30.4.1 34 | markdown-it-py==3.0.0 35 | MarkupSafe==2.1.5 36 | matplotlib==3.10.0 37 | mdurl==0.1.2 38 | nodeenv==1.8.0 39 | numpy==2.2.3 40 | oauth2client==4.1.3 41 | osfv @ git+https://github.com/Dasharo/osfv-scripts.git@96cce6d891e78fb84b56a21ee1181a4124ecbe9c#subdirectory=osfv_cli 42 | packaging==24.2 43 | pandas==2.2.3 44 | paramiko==3.4.0 45 | pathspec==0.9.0 46 | pexpect==4.9.0 47 | pikvm @ git+https://github.com/3mdeb/pikvm-rest-api@1a1cc579a286fe82aaa2eccea69f96223712664d 48 | pillow==11.1.0 49 | platformdirs==4.2.1 50 | pre-commit==3.7.0 51 | ptyprocess==0.7.0 52 | pyasn1==0.6.0 53 | pyasn1_modules==0.4.0 54 | pycparser==2.22 55 | Pygments==2.17.2 56 | PyNaCl==1.5.0 57 | pyOpenSSL==24.1.0 58 | pyotp==2.9.0 59 | pyparsing==3.1.2 60 | pyte @ git+https://github.com/3mdeb/pyte@b81646ec9f754aab34ed671b3c852b01cc72bdb4 61 | python-dateutil==2.9.0.post0 62 | python-debian==0.1.49 63 | pytz==2024.1 64 | PyYAML==6.0.1 65 | requests==2.31.0 66 | reuse==4.0.3 67 | rich==13.7.1 68 | rich-click==1.7.4 69 | robotframework @ git+https://github.com/3mdeb/robotframework@6006ce0b3d5fc6b45c5eb040dc859acd64bfa846 70 | robotframework-csvlibrary==0.0.5 71 | robotframework-faker==5.0.0 72 | robotframework-requests==0.9.4 73 | robotframework-robocop==5.0.4 74 | robotframework-sherlock==0.3.0 75 | robotframework-sshlibrary @ git+https://github.com/MarketSquare/SSHLibrary@ba6c3ee783bd6fd8b73c1341fe873a99991a353a 76 | robotframework-tidy==4.11.0 77 | rsa==4.9 78 | scp==0.14.5 79 | semver==3.0.2 80 | setuptools==69.5.1 81 | six==1.16.0 82 | SQLAlchemy==2.0.29 83 | tabulate==0.8.9 84 | telnetlib @ git+https://github.com/3mdeb/telnetlib@b85e3b5e6068eb3441cb21badb5a266301839e61 85 | toml==0.10.2 86 | tomli==2.0.1 87 | tomlkit==0.13.2 88 | typing_extensions==4.11.0 89 | tzdata==2025.1 90 | Unidecode==1.3.8 91 | urllib3==2.2.1 92 | virtualenv==20.26.0 93 | voluptuous==0.14.2 94 | wakeonlan==3.1.0 95 | wcwidth==0.2.13 96 | websocket-client==1.8.0 97 | wrapt==1.16.0 98 | -------------------------------------------------------------------------------- /robocop.toml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | [tool.robocop] 6 | configure = [ 7 | # TODO: add missing documentation for keywords and re-enable 8 | "0201:enabled:False", 9 | # TODO: add missing documentation for test cases and re-enable 10 | "0202:enabled:False", 11 | # TODO: add missing documentation for test suitdes and re-enable 12 | "0203:enabled:False", 13 | # TODO: consider re-enabling 14 | "0301:enabled:False", 15 | # TODO: consider fixing and re-enabling 16 | "0316:enabled:False", 17 | # TODO: fix and re-enable 18 | "0319:enabled:False", 19 | # TODO: fix and re-enable 20 | "0327:enabled:False", 21 | # TODO: fix and re-enable 22 | "0328:enabled:False", 23 | # TODO: consider reducing to default 40, or less 24 | # Has to be high to allow comprehensive documentation of library keywords 25 | "0501:max_len:80", 26 | # TODO: consider reducing to default 10, or less 27 | "0503:max_calls:50", 28 | # TODO: consider reducing to dfeault 20, or less 29 | "0504:max_len:50", 30 | # TODO: consider reducing to dfeault 10, or less 31 | "0505:max_calls:50", 32 | # TODO: reduce to default 400 or so 33 | "0506:max_lines:5000", 34 | # TODO: reduce to 120/80 35 | "0508:line_length:180", 36 | "0701:enabled:False", 37 | # TODO: fix and re-enable 38 | "0908:enabled:False", 39 | # TODO: re-enable after fixes 40 | "0913:enabled:False", 41 | # TODO: fix unused variables and re-enable 42 | "0920:enabled:False", 43 | # TODO: consider fixing and re-enabling 44 | "0922:enabled:False", 45 | # TODO: fix and re-enable 46 | "0924:enabled:False" 47 | ] 48 | -------------------------------------------------------------------------------- /scripts/capsules/root.pub.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDWzCCAkOgAwIBAgIUN6TUIj8GstcO9IUwTMEXmkCxeK8wDQYJKoZIhvcNAQEL 3 | BQAwPTELMAkGA1UEBhMCWFgxETAPBgNVBAgMCFByb3ZpbmNlMQwwCgYDVQQKDANP 4 | cmcxDTALBgNVBAMMBHJvb3QwHhcNMjQwODMwMTA0MDA3WhcNMzQwODI4MTA0MDA3 5 | WjA9MQswCQYDVQQGEwJYWDERMA8GA1UECAwIUHJvdmluY2UxDDAKBgNVBAoMA09y 6 | ZzENMAsGA1UEAwwEcm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB 7 | AMvqsqkyL9ggFheoliT5CD43TlQe7G37nj0MeURhe/PaihMiNIttryudy69vauBr 8 | sA534KaGZrWGVKdfldZLXhPPMuqtUIXEqxvhXLyLjyTyJiTRPVSSwOGSssVIUPT2 9 | Rm6h40SROoa02pHH19UMtutJi6jxZifMa9kZc6B15XPEYdEyMDwzbsbr3xQ3Pfrv 10 | GeSRQ5ykMXZC532NZXg7rLRUGr9+M/hE6ixOm8ClQYn3djmsDHuVPk1we07YBZqq 11 | ga2GrzPTmQ101wT1NfbrwSFn4aNhBhZwnWW55VCZ4yOgYDBp8qY1oomKzD8vYgTk 12 | XZXvxSn2K5hv4R+1UJuhfvMCAwEAAaNTMFEwHQYDVR0OBBYEFEXDOVb1XqQovr4F 13 | YddXtxQSrHYqMB8GA1UdIwQYMBaAFEXDOVb1XqQovr4FYddXtxQSrHYqMA8GA1Ud 14 | EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACjYXNpdhgVpO2YG36nT2Spv 15 | R6EeSaZsfjJvnHTkpFqp2QBelRPHGmCM564NCG5/hVnPPG+zMWleI481zrEX0LK+ 16 | X+VhUgNkWkltkY08GO/IHJbIiWhK8SexKluDj0uCRHqvPseolZoyFRwwPOzJDKjw 17 | 78sMppYcZY65N/9ce9Zo7s2/HSqqhCUy7vC+Z5D7AvnSFLcSalQUOxD4rGNOkoX2 18 | TATEJObeXfu46E7ZTR5/1EC23ian/quAGY6VPDTH/odHtsVQGFmWBbFv/lqjSi7O 19 | hg9KPCuhnhQL56j9k8LJFYs3deuO00g3vjhaEOKSNQM2PTXUONHavm0y/0PGO0Q= 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /scripts/capsules/sign.p12.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2024 3mdeb 2 | 3 | SPDX-License-Identifier: Apache-2.0 4 | -------------------------------------------------------------------------------- /scripts/capsules/sub.pub.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDRzCCAi+gAwIBAgIBATANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQGEwJYWDER 3 | MA8GA1UECAwIUHJvdmluY2UxDDAKBgNVBAoMA09yZzENMAsGA1UEAwwEcm9vdDAe 4 | Fw0yNDA4MzAxMDQwMDdaFw0zNDA4MjgxMDQwMDdaMDwxCzAJBgNVBAYTAlhYMREw 5 | DwYDVQQIDAhQcm92aW5jZTEMMAoGA1UECgwDT3JnMQwwCgYDVQQDDANzdWIwggEi 6 | MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDwo8FL8pAyTh7vBtKMToy/vFp6 7 | +pETes9sfR9dppkGCQ21t+7gFsnUAMbvXcAmISy9YhdAcN3kCNBr/qctdyi9C27O 8 | m3HMsX8/ePZcALrNRuEVJqcnNVzwOn9SZsETA6VmKGf1agAER8YUoPwAFSiwzPVM 9 | lIrtbb67OX3Pmha99x/Yc8x5x4pG45bTiv3fOEntgsfMGPbS3XyFCoA9PjMXtZNr 10 | OeSw4ISH/yshelSCIG7I19zOzsb2T9DSB9EOC7fggEIi1qL2zDrSAbhXK9Rxn87K 11 | e8fF9FBT4m7/sXok3MC0fjh7MxjB9Y1BHmaxMqFPLGsPyaIS+4Qk1H0pNXD5AgMB 12 | AAGjUzBRMB0GA1UdDgQWBBSNIkFSqNAKNt+0lwVjhGt4rhW2gjAfBgNVHSMEGDAW 13 | gBRFwzlW9V6kKL6+BWHXV7cUEqx2KjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3 14 | DQEBCwUAA4IBAQAEwwGdh5IEKB9Qs1A0B+En+J2Uu2epkpX6TN/4JAMrTCghv+iq 15 | U/WwAmJ8dg+CL0vT6nr+t6cIWcVvRwrT6ZfUzLYUhIGDqaJbwjJaeXE1zM5jCMvq 16 | 9kGLw7mqZUiSFFIfejo3TSo2nS45xMgmoiYdXWMe9FX1LII3Yqcx3PgdVuDcA+V5 17 | 8cKxbwRQbt91g6SKoW13mfitm7XUJueT8I+9YovmkKfjIhqa1wK8ikDdG8b/t8vU 18 | Jom/uQh3k6uU0QSURspkqJjF6uBVlCohA+bvJpAqOeTN+Zr45OSX8+ai5h2P12ZW 19 | B+/ycVvhqeDKP7eJItQz0rQeaNgPQYFjp9Xc 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /scripts/ci/ipxe-run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | if [[ $# -ne 2 ]]; then 8 | echo "Usage: $0 " 9 | exit 1 10 | fi 11 | 12 | DTS_IMAGE_PATH=$1 13 | DTS_IMAGE_FILENAME=$( basename "$DTS_IMAGE_PATH" ) 14 | BZ_IMAGE_PATH=$2 15 | BZ_IMAGE_FILENAME=$( basename "$BZ_IMAGE_PATH" ) 16 | IPXE_PATH=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)/../../ipxe 17 | 18 | mkdir -p "$IPXE_PATH" 19 | ln -srf "$DTS_IMAGE_PATH" "$IPXE_PATH"/"$DTS_IMAGE_FILENAME" 20 | ln -srf "$BZ_IMAGE_PATH" "$IPXE_PATH"/"$BZ_IMAGE_FILENAME" 21 | 22 | cat < "$IPXE_PATH/dts.ipxe" 23 | #!ipxe 24 | imgfetch --name file_kernel $BZ_IMAGE_FILENAME 25 | imgfetch --name file_initrd $DTS_IMAGE_FILENAME 26 | kernel file_kernel root=/dev/nfs initrd=file_initrd 27 | boot 28 | EOF 29 | 30 | cd "$IPXE_PATH" && python3 -m http.server 4321 31 | -------------------------------------------------------------------------------- /scripts/ci/qemu-self-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | # Define an array of commands 8 | commands=( 9 | "robot -L TRACE -v config:qemu-selftests -v rte_ip:127.0.0.1 -d ./logs/$(date +%Y.%m.%d_%H.%M.%S)/setup-and-boot-menus -v snipeit:no self-tests/setup-and-boot-menus.robot" 10 | "robot -L TRACE -v config:qemu-selftests -v rte_ip:127.0.0.1 -d ./logs/$(date +%Y.%m.%d_%H.%M.%S)/dasharo-system-features-menus -v snipeit:no self-tests/dasharo-system-features-menus.robot" 11 | "robot -L TRACE -v config:qemu-selftests -v rte_ip:127.0.0.1 -d ./logs/$(date +%Y.%m.%d_%H.%M.%S)/boolean-options -v snipeit:no self-tests/boolean-options.robot" 12 | "robot -L TRACE -v config:qemu-selftests -v rte_ip:127.0.0.1 -d ./logs/$(date +%Y.%m.%d_%H.%M.%S)/numerical-options -v snipeit:no self-tests/numerical-options.robot" 13 | "robot -L TRACE -v config:qemu-selftests -v rte_ip:127.0.0.1 -d ./logs/$(date +%Y.%m.%d_%H.%M.%S)/list-options -v snipeit:no self-tests/list-options.robot" 14 | "robot -L TRACE -v config:qemu-selftests -v rte_ip:127.0.0.1 -d ./logs/$(date +%Y.%m.%d_%H.%M.%S)/self-tests -v snipeit:no self-tests/terminal.robot" 15 | ) 16 | 17 | # Initialize a variable to track overall success 18 | overall_success=0 19 | 20 | # Execute each command and capture the exit codes 21 | for cmd in "${commands[@]}"; do 22 | eval $cmd 23 | exit_code=$? 24 | if [ $exit_code -ne 0 ]; then 25 | overall_success=1 26 | fi 27 | done 28 | 29 | # Exit with the appropriate status 30 | exit $overall_success 31 | -------------------------------------------------------------------------------- /scripts/ci/smoke.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 8 | 9 | source "${SCRIPT_DIR}/../lib/robot.sh" 10 | 11 | # export CONFIG=msi-pro-z690-a-ddr5 12 | # export RTE_IP=192.168.10.188 13 | # 14 | # execute_robot "dasharo-compatibility/custom-boot-menu-key.robot" 15 | # execute_robot "dasharo-compatibility/nvme-support.robot" 16 | # execute_robot "dasharo-security/usb-stack.robot" 17 | 18 | export CONFIG=protectli-vp4670 19 | export RTE_IP=192.168.10.14 20 | 21 | execute_robot "dasharo-compatibility/custom-boot-menu-key.robot" 22 | execute_robot "dasharo-compatibility/nvme-support.robot" 23 | execute_robot "dasharo-security/usb-stack.robot" 24 | -------------------------------------------------------------------------------- /scripts/create-docs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | import os 8 | import re 9 | import sys 10 | 11 | lib_dir = "lib" 12 | output_resource = sys.argv[1] if len(sys.argv) > 1 else "all-keywords.robot" 13 | 14 | # Collect all .robot files 15 | robot_files = ["keywords.robot"] 16 | for root, dirs, files in os.walk(lib_dir): 17 | for file in files: 18 | if file.endswith(".robot"): 19 | robot_files.append(os.path.join(root, file)) 20 | 21 | # Regex pattern to detect keyword definitions 22 | keyword_pattern = re.compile( 23 | r"^(?:(?!Library|Resource|Variables|Documentation)[A-Z][a-z0-9_]+[\ ]+.*)" 24 | ) 25 | 26 | delimiter = "." # Between filename and the keyword 27 | 28 | # Create the combined resource file with prefixed keywords 29 | with open(output_resource, "w", encoding="utf8") as res_file: 30 | 31 | for robot_file in robot_files: 32 | file_prefix = os.path.splitext(os.path.basename(robot_file))[0] + delimiter 33 | index_offset = 0 34 | 35 | with open(robot_file, "r", encoding="utf8") as read_file: 36 | for line in read_file: 37 | if re.match(keyword_pattern, line): 38 | res_file.write(file_prefix + line) 39 | else: 40 | res_file.write(line) 41 | -------------------------------------------------------------------------------- /scripts/create-docs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | TEMP_DIR=$(mktemp -d) 8 | FILE_NAME="$TEMP_DIR/all-keywords.robot" 9 | 10 | python3 scripts/create-docs.py $FILE_NAME 11 | 12 | libdoc "$TEMP_DIR/all-keywords.robot" "$TEMP_DIR/all-keywords.html" >/dev/null 2>&1 13 | 14 | if [ $? -ne 0 ]; then 15 | echo "libdoc command failed" 16 | exit 1 17 | fi 18 | 19 | cp "$TEMP_DIR/all-keywords.html" ./docs/index.html 20 | 21 | rm "$TEMP_DIR/all-keywords.robot" 22 | rm "$TEMP_DIR/all-keywords.html" 23 | rmdir "$TEMP_DIR" 24 | 25 | echo "Documentation generated and saved as ./docs/index.html" 26 | -------------------------------------------------------------------------------- /scripts/lib/mappings.json: -------------------------------------------------------------------------------- 1 | { 2 | "options": { 3 | "CONFIG_MAINBOARD_POWER_FAILURE_STATE": "DEFAULT_POWER_STATE_AFTER_FAIL", 4 | "CONFIG_VBOOT": "VERIFIED_BOOT_SUPPORT", 5 | "CONFIG_TPM": "TPM_SUPPORTED_VERSION", 6 | "CONFIG_EDK2_SECURE_BOOT_SUPPORT": "SECURE_BOOT_SUPPORT", 7 | "CONFIG_EDK2_IPXE_OPTION_NAME": "IPXE_BOOT_ENTRY", 8 | "CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME": "DMIDECODE_PRODUCT_NAME", 9 | "CONFIG_SYSTEM_TYPE_LAPTOP": "OPTIONS_LIB" 10 | }, 11 | "values": { 12 | "DEFAULT_POWER_STATE_AFTER_FAIL": { 13 | "0": "Powered Off", 14 | "1": "Powered On", 15 | "2": "The state at the moment of power failure" 16 | }, 17 | "OPTIONS_LIB": { 18 | "y": "dcu", 19 | "n": "uefi" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /scripts/refactoring-state.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | kwds_to_remove=( 8 | "Select Option From List" 9 | "Read Option List Contents" 10 | "Get Relative Menu Position" 11 | "Check If Tianocore Setting Is Enabled In Current Menu" 12 | "Change To Next Option In Setting" 13 | "Check If Submenu Exists Tianocore" 14 | "Get Menu Reference Tianocore" 15 | "Enter Submenu In Tianocore" 16 | "Change Numeric Value Of Setting" 17 | "Enter Dasharo Submenu Snapshot" 18 | "iPXE DTS" 19 | "Launch To DTS Shell" 20 | "Check IPXE Appears Only Once" 21 | "IPXE Dhcp" 22 | "RteCtrl Power On" 23 | "RteCtrl Power Off" 24 | "RteCtrl Relay" 25 | "Get RTE Relay State" 26 | "Sonoff API Setup" 27 | "Sonoff Power Off" 28 | "Sonoff Power On" 29 | "Get Sonoff State" 30 | "RTE REST APU Setup" 31 | "RTE REST APU Setup" 32 | "RteCtrl Get GPIO State" 33 | "Check That USB Devices Are Detected" 34 | "Switch To Root User In Ubuntu Server" 35 | "Get Slot Count" 36 | "Get USB Slot Count" 37 | "Get All USB" 38 | "Enable Option In USB Configuration Submenu" 39 | "Disable Option In USB Configuration Submenu" 40 | "Enable Option In Submenu" 41 | "Disable Option In Submenu" 42 | "Get Intel ME Mode State" 43 | "Power Cycle Off" 44 | "Rte Relay" 45 | "Rte Relay Set" 46 | "Coldboot Via RTE Relay" 47 | "Download To Host Cache" 48 | "Download ISO And Mount As USB" 49 | "Upload And Mount DTS Flash ISO" 50 | "Prepare Required Files For Qemu" 51 | "Get Coreboot Tools From Cloud" 52 | "Get Cbmem From Cloud" 53 | "Get Flashrom From Cloud" 54 | "Get Cbfstool From Cloud" 55 | ) 56 | 57 | echo "Keywords that should not be used, but are still used:" 58 | find . -type f -name "*.robot" | while IFS= read -r file; do 59 | for kwd in "${kwds_to_remove[@]}"; do 60 | grep -i -n -H "$kwd" "$file" 61 | done 62 | done 63 | 64 | vars_to_remove=( 65 | "PIKVM_IP" 66 | "DL_CACHE_DIR" 67 | "USB_TYPE-A_DEVICES_DETECTION_SUPPORT" 68 | ) 69 | 70 | echo "Global variables that should not be used, but are still used:" 71 | find . -type f -name "*.robot" | while IFS= read -r file; do 72 | for var in "${vars_to_remove[@]}"; do 73 | grep -n -H "$var" "$file" 74 | done 75 | done 76 | 77 | resources_to_remove=( 78 | "dl-cache.robot" 79 | "pikvm_comm.robot" 80 | ) 81 | 82 | echo "Resources that should not be used, but are still used:" 83 | find . -type f -name "*.robot" | while IFS= read -r file; do 84 | for resource in "${resources_to_remove[@]}"; do 85 | grep -n -H "$resource" "$file" 86 | done 87 | done 88 | -------------------------------------------------------------------------------- /scripts/regression-qemu.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 8 | source "${SCRIPT_DIR}/lib/robot.sh" 9 | 10 | export RTE_IP=127.0.0.1 11 | export CONFIG="qemu" 12 | export SNIPEIT_NO="no" 13 | 14 | compatibility_tests=( 15 | "dasharo-compatibility/custom-boot-menu-key.robot" 16 | "dasharo-compatibility/uefi-shell.robot" 17 | "dasharo-compatibility/network-boot.robot" 18 | "dasharo-compatibility/dmidecode.robot" 19 | # FIXME: unsafe to enable https://github.com/Dasharo/dasharo-issues/issues/887 20 | #"dasharo-compatibility/reset-to-defaults.robot" 21 | ) 22 | 23 | security_tests=( 24 | "dasharo-security/network-stack.robot" 25 | "dasharo-security/secure-boot.robot" 26 | "dasharo-security/measured-boot.robot" 27 | "dasharo-security/uefi-password.robot" 28 | ) 29 | 30 | # Compatibility tests 31 | for test in "${compatibility_tests[@]}"; do 32 | execute_robot "$test" 33 | done 34 | 35 | # Security tests 36 | for test in "${security_tests[@]}"; do 37 | execute_robot "$test" 38 | done 39 | -------------------------------------------------------------------------------- /scripts/regression.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 8 | source "${SCRIPT_DIR}/lib/robot.sh" 9 | 10 | # FW_FILE and DEVICE_IP are required for full regression 11 | check_env_variable "FW_FILE" 12 | check_env_variable "DEVICE_IP" 13 | 14 | if [ ! -f "$FW_FILE" ]; then 15 | echo "Error: Environment variable FW_FILE doesn't point to a file." 16 | exit 1 17 | fi 18 | 19 | _REGRESSION_RUN="True" 20 | export _REGRESSION_RUN 21 | 22 | check_test_station_variables 23 | 24 | if [ -z "$NO_SETUP" ]; then 25 | execute_robot "util/basic-platform-setup.robot" "${@}" 26 | fi 27 | 28 | execute_robot "dasharo-compatibility" "${@}" 29 | execute_robot "dasharo-security" "${@}" 30 | execute_robot "dasharo-performance" "${@}" 31 | -------------------------------------------------------------------------------- /scripts/rename-keyword.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | usage() { 8 | echo "This scripts renames keywords across the project from \"old_name\" to\"new_name\"" 9 | echo "Usage: $0 old_name new_name" 10 | } 11 | 12 | if [ "$#" -ne 2 ]; then 13 | echo "Error: Both old and new keyword names are required." 14 | usage 15 | exit 1 16 | fi 17 | 18 | old_name="$1" 19 | new_name="$2" 20 | 21 | # See: https://robotidy.readthedocs.io/en/stable/transformers/RenameKeywords.html#replace-pattern 22 | robotidy --transform RenameKeywords \ 23 | --verbose \ 24 | -c "RenameKeywords:replace_pattern=(?i)^${old_name}\$:replace_to=${new_name}" . 25 | -------------------------------------------------------------------------------- /scripts/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 8 | source "${SCRIPT_DIR}/lib/robot.sh" 9 | 10 | print_help() { 11 | echo "Usage: $0 (test_file | directory_path)... [-- arbitrary robot args...]" 12 | echo 13 | echo "This script is used to execute OSFV Robot Framework tests." 14 | echo "You can specify either a single test or a whole directory of tests." 15 | echo 16 | echo "It expects at least RTE_IP and CONFIG environmental variables to be set" 17 | echo 18 | echo "The logs will be saved under logs directory, sorted by platform and date." 19 | echo "to ensure they are not overwritten by further invocations." 20 | echo 21 | echo "Examples:" 22 | echo " Execute a single test:" 23 | echo " $0 dasharo-compatibility/custom-boot-menu-key.robot" 24 | echo " Execute a whole set of tests:" 25 | echo " $0 dasharo-compatibility" 26 | echo 27 | } 28 | 29 | if [ "$#" -eq 0 ] || [ ! -e "$1" ]; then 30 | print_help 31 | exit 1 32 | fi 33 | 34 | execute_robot "$@" 35 | -------------------------------------------------------------------------------- /scripts/stats.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # SPDX-FileCopyrightText: 2024 3mdeb 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | 7 | from robot.model import SuiteVisitor 8 | from robot.running import TestSuiteBuilder 9 | 10 | 11 | class TestCasesFinder(SuiteVisitor): 12 | def __init__(self): 13 | self.tests = [] 14 | 15 | def visit_test(self, test): 16 | self.tests.append(test) 17 | 18 | 19 | def get_test_cases_from_dir(directory): 20 | builder = TestSuiteBuilder() 21 | testsuite = builder.build(directory) 22 | finder = TestCasesFinder() 23 | testsuite.visit(finder) 24 | 25 | list_of_tests = finder.tests 26 | number_of_tests = len(list_of_tests) 27 | 28 | return number_of_tests, list_of_tests 29 | 30 | 31 | dirs = [ 32 | "dasharo-compatibility/", 33 | "dasharo-security/", 34 | "dasharo-stability/", 35 | "dasharo-performance/", 36 | "self-tests/", 37 | ] 38 | 39 | for directory in dirs: 40 | number_of_tests, list_of_tests = get_test_cases_from_dir(directory) 41 | print(f"Number of test cases in {directory}: {number_of_tests}\n") 42 | 43 | print("Test case names:\n") 44 | for test in list_of_tests: 45 | print(test.name) 46 | 47 | 48 | # Chatgpt graph source code 49 | # # Create the bar chart with numbers on the bars 50 | # plt.figure(figsize=(10, 6)) 51 | # bars = plt.bar(modules, test_counts, color=['blue', 'green', 'red', 'purple', 'orange']) 52 | # 53 | # # Add titles and labels 54 | # plt.title('Number of Tests in Modules') 55 | # plt.xlabel('Modules') 56 | # plt.ylabel('Number of Tests') 57 | # 58 | # # Add text labels on the bars 59 | # for bar in bars: 60 | # height = bar.get_height() 61 | # plt.text( 62 | # bar.get_x() + bar.get_width() / 2, height - 10, 63 | # f'{height}', ha='center', va='bottom', color='white', fontsize=10 64 | # ) 65 | # 66 | # # Display the graph 67 | # plt.xticks(rotation=45, ha="right") 68 | # plt.tight_layout() 69 | # plt.show() 70 | -------------------------------------------------------------------------------- /self-tests/dcu.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library Process 5 | Library String 6 | Library Telnet timeout=30 seconds connection_timeout=120 seconds 7 | Library SSHLibrary timeout=90 seconds 8 | Library RequestsLibrary 9 | Library FakerLibrary 10 | # TODO: maybe have a single file to include if we need to include the same 11 | # stuff in all test cases 12 | Resource ../variables.robot 13 | Resource ../keywords.robot 14 | Resource ../keys.robot 15 | 16 | # TODO: 17 | # - document which setup/teardown keywords to use and what are they doing 18 | # - go threough them and make sure they are doing what the name suggest (not 19 | # exactly the case right now) 20 | Suite Setup Run Keyword 21 | ... Prepare Test Suite 22 | Suite Teardown Run Keyword 23 | ... Log Out And Close Connection 24 | 25 | 26 | *** Test Cases *** 27 | Boot System Or From Connected Disk 28 | Skip If '${OPTIONS_LIB}' != 'options-lib_dcu' DCU not supported 29 | 30 | Power On 31 | 32 | Dcu.Boot System Or From Connected Disk ${ENV_ID_WINDOWS_11} 33 | Dcu.Login To Windows Via SSH ${DEVICE_OS_USERNAME} ${DEVICE_OS_PASSWORD} 34 | 35 | Power On 36 | Dcu.Boot System Or From Connected Disk ${OS_UBUNTU} 37 | 38 | Login To Linux 39 | Switch To Root User 40 | -------------------------------------------------------------------------------- /self-tests/numerical-options.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation This suite verifies the correct operation of keywords 3 | ... getting and setting state of numerical options. 4 | 5 | Library Collections 6 | Library OperatingSystem 7 | Library Process 8 | Library String 9 | Library Telnet timeout=30 seconds connection_timeout=120 seconds 10 | Library SSHLibrary timeout=90 seconds 11 | Library RequestsLibrary 12 | # TODO: maybe have a single file to include if we need to include the same 13 | # stuff in all test cases 14 | Resource ../variables.robot 15 | Resource ../keywords.robot 16 | Resource ../keys.robot 17 | 18 | # TODO: 19 | # - document which setup/teardown keywords to use and what are they doing 20 | # - go threough them and make sure they are doing what the name suggest (not 21 | # exactly the case right now) 22 | Suite Setup Run Keyword 23 | ... Prepare Test Suite 24 | Suite Teardown Run Keyword 25 | ... Log Out And Close Connection 26 | 27 | 28 | *** Test Cases *** 29 | Set numerical option 30 | [Documentation] Checks whether the numerical option can be set. 31 | Skip If not ${DASHARO_CHIPSET_MENU_SUPPORT} 32 | Power On 33 | ${setup_menu}= Enter Setup Menu Tianocore And Return Construction 34 | ${boot_manager}= Enter Submenu From Snapshot And Return Construction 35 | ... ${setup_menu} 36 | ... Boot Maintenance Manager 37 | Set Option State ${boot_manager} Auto Boot Time-out 5 38 | Save Changes And Reset 39 | 40 | ${setup_menu}= Enter Setup Menu Tianocore And Return Construction 41 | ${boot_manager}= Enter Submenu From Snapshot And Return Construction 42 | ... ${setup_menu} 43 | ... Boot Maintenance Manager 44 | Set Option State ${boot_manager} Auto Boot Time-out 5 45 | ${state}= Get Option State ${boot_manager} Auto Boot Time-out 46 | Log ${state} 47 | Should Be Equal As Integers ${state} 5 48 | -------------------------------------------------------------------------------- /self-tests/os-boot.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation This suite verifies the correct operation of keywords 3 | ... getting and setting state of boolean options. 4 | 5 | Library Collections 6 | Library OperatingSystem 7 | Library Process 8 | Library String 9 | Library Telnet timeout=30 seconds connection_timeout=120 seconds 10 | Library SSHLibrary timeout=90 seconds 11 | Library RequestsLibrary 12 | # TODO: maybe have a single file to include if we need to include the same 13 | # stuff in all test cases 14 | Resource ../variables.robot 15 | Resource ../keywords.robot 16 | Resource ../keys.robot 17 | 18 | # TODO: 19 | # - document which setup/teardown keywords to use and what are they doing 20 | # - go threough them and make sure they are doing what the name suggest (not 21 | # exactly the case right now) 22 | Suite Setup Run Keyword 23 | ... Prepare Test Suite 24 | Suite Teardown Run Keyword 25 | ... Log Out And Close Connection 26 | 27 | 28 | *** Test Cases *** 29 | BOT001.001 Boot To Ubuntu Multiple Times 30 | [Documentation] This test verifies if the DUT can boot to Ubuntu multiple times in a row. 31 | Depends On ${TESTS_IN_UBUNTU_SUPPORT} 32 | FOR ${i} IN RANGE 5 33 | ${index}= Evaluate ${i} + 1 34 | Log To Console Iteration: ${index} 35 | Power On 36 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 37 | Login To Linux 38 | Switch To Root User 39 | END 40 | 41 | BOT002.001 Boot To Windows Multiple Times 42 | [Documentation] This test verifies if the DUT can boot to Windows multiple times in a row. 43 | Depends On ${TESTS_IN_WINDOWS_SUPPORT} 44 | FOR ${i} IN RANGE 5 45 | ${index}= Evaluate ${i} + 1 46 | Log To Console Iteration: ${index} 47 | Power On 48 | Login To Windows 49 | ${out}= Execute Command In Terminal ls 50 | END 51 | 52 | BOT003.001 Boot To Ubuntu Then Boot To Windows 53 | [Documentation] This test verifies if the DUT can boot to multiple OS one after another multiple times. 54 | Depends On ${TESTS_IN_UBUNTU_SUPPORT} 55 | Depends On ${TESTS_IN_WINDOWS_SUPPORT} 56 | FOR ${i} IN RANGE 5 57 | ${index}= Evaluate ${i} + 1 58 | Log To Console Iteration: ${index} 59 | Power On 60 | Boot System Or From Connected Disk ${ENV_ID_UBUNTU} 61 | Login To Linux 62 | Switch To Root User 63 | Power On 64 | Login To Windows 65 | Execute Command In Terminal ls 66 | END 67 | -------------------------------------------------------------------------------- /self-tests/scrolling-boot-manager.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation This suite verifies the correct operation of keywords 3 | ... reading out the boot manager when populated with multiple 4 | ... entries and must be scroleld through 5 | 6 | Library Collections 7 | Library OperatingSystem 8 | Library Process 9 | Library String 10 | Library Telnet timeout=30 seconds connection_timeout=120 seconds 11 | Library SSHLibrary timeout=90 seconds 12 | Library RequestsLibrary 13 | # TODO: maybe have a single file to include if we need to include the same 14 | # stuff in all test cases 15 | Resource ../variables.robot 16 | Resource ../keywords.robot 17 | Resource ../keys.robot 18 | 19 | # TODO: 20 | # - document which setup/teardown keywords to use and what are they doing 21 | # - go threough them and make sure they are doing what the name suggest (not 22 | # exactly the case right now) 23 | Suite Setup Run Keyword 24 | ... Prepare Test Suite 25 | Suite Teardown Run Keyword 26 | ... Log Out And Close Connection 27 | 28 | 29 | *** Test Cases *** 30 | Enter Boot Menu Tianocore 31 | [Documentation] Test Enter Boot Menu kwd 32 | Prepare EFI Partition With System Files 33 | Power On 34 | ${boot_menu}= Enter Boot Menu Tianocore And Return Construction 35 | ${no_entries}= Get Length ${boot_menu} 36 | Should Be True ${no_entries} > 11 37 | -------------------------------------------------------------------------------- /self-tests/terminal.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Documentation This suite verifies the correct operation of keywords 3 | ... entering and parsing UEFI shell commands 4 | 5 | Library Collections 6 | Library OperatingSystem 7 | Library Process 8 | Library String 9 | Library Telnet timeout=30 seconds connection_timeout=120 seconds 10 | Library SSHLibrary timeout=90 seconds 11 | Library RequestsLibrary 12 | # TODO: maybe have a single file to include if we need to include the same 13 | # stuff in all test cases 14 | Resource ../variables.robot 15 | Resource ../keywords.robot 16 | Resource ../keys.robot 17 | 18 | # TODO: 19 | # - document which setup/teardown keywords to use and what are they doing 20 | # - go threough them and make sure they are doing what the name suggest (not 21 | # exactly the case right now) 22 | Suite Setup Run Keyword 23 | ... Prepare Test Suite 24 | Suite Teardown Run Keyword 25 | ... Log Out And Close Connection 26 | 27 | 28 | *** Test Cases *** 29 | Execute Command In Terminal over SSH (Windows) 30 | [Documentation] Test Execute Command In Terminal keyword over SSH. This is related 31 | ... to bug: https://github.com/Dasharo/open-source-firmware-validation/issues/355 32 | ... when a command was run multiple times, every time it produced different outputs. 33 | ... Usually containing parts of previously run command. 34 | 35 | Skip If not ${TESTS_IN_WINDOWS_SUPPORT} Execute Command In Terminal over SSH (Windows) not supported 36 | Power On 37 | Login To Windows 38 | Set Test Variable ${COMMAND} Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' } 39 | ${out1}= Execute Command In Terminal ${COMMAND} 40 | ${out2}= Execute Command In Terminal ${COMMAND} 41 | Should Be Equal As Strings ${out1} ${out2} 42 | Should Not Contain ${out1} ${COMMAND} 43 | Should Not Contain ${out2} ${COMMAND} 44 | 45 | Set Test Variable ${COMMAND} ls 46 | ${out1}= Execute Command In Terminal ${COMMAND} 47 | ${out2}= Execute Command In Terminal ${COMMAND} 48 | Should Be Equal As Strings ${out1} ${out2} 49 | Should Not Contain ${out1} ${COMMAND} 50 | Should Not Contain ${out2} ${COMMAND} 51 | 52 | Set Test Variable ${COMMAND} driverquery 53 | ${out1}= Execute Command In Terminal ${COMMAND} 54 | ${out2}= Execute Command In Terminal ${COMMAND} 55 | Should Be Equal As Strings ${out1} ${out2} 56 | Should Not Contain ${out1} ${COMMAND} 57 | Should Not Contain ${out2} ${COMMAND} 58 | -------------------------------------------------------------------------------- /stress-test-windows.ps1: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 3mdeb 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | $numCores = 4 6 | 7 | foreach ($loopnumber in 1..$numCores){ 8 | Start-Job -ScriptBlock{ 9 | $result = 1 10 | foreach ($number in 1..40000000){ 11 | $result = $result * $number 12 | } 13 | } 14 | } 15 | 16 | Wait-Job * 17 | Clear-Host 18 | Receive-Job * 19 | Remove-Job * 20 | -------------------------------------------------------------------------------- /trenchboot/README.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # TrenchBoot tests 8 | 9 | These are the tests of [TrenchBoot] functionality meant to be used with 10 | [meta-trenchboot] distribution. 11 | 12 | The tests check sanitity of the environment with and without the DRTM. 13 | 14 | [TrenchBoot]: https://trenchboot.org/ 15 | [meta-trenchboot]: https://github.com/3mdeb/meta-trenchboot 16 | 17 | ## Example usage 18 | 19 | From the root of the repository. 20 | 21 | ### With UEFI firmware on APU2 22 | 23 | ```bash 24 | CONFIG=pcengines-apu2 RTE_IP=192.168.10.172 SNIPEIT_NO=1 scripts/run.sh trenchboot 25 | ``` 26 | 27 | ### With SeaBIOS firmware on APU2 28 | 29 | ```bash 30 | CONFIG=pcengines-apu2 RTE_IP=192.168.10.172 SNIPEIT_NO=1 scripts/run.sh trenchboot -- -v SEABIOS_BOOT_DEVICE:2 31 | ``` 32 | 33 | Here `SEABIOS_BOOT_DEVICE` specifies a device to boot from via SeaBIOS boot 34 | menu. It should correspond to the drive with the [meta-trenchboot] image. 35 | -------------------------------------------------------------------------------- /zarhus-base/00_flash_and_verify.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library OperatingSystem 4 | Library String 5 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 6 | Library SSHLibrary timeout=90 seconds 7 | Library RequestsLibrary 8 | Resource ../../variables.robot 9 | Resource ../../keywords.robot 10 | Resource ../lib/sd-wire.robot 11 | Resource ../lib/linux.robot 12 | 13 | Suite Setup Prepare Test Suite 14 | Suite Teardown Log Out And Close Connection 15 | 16 | 17 | *** Test Cases *** 18 | Flash platform and verify 19 | [Documentation] This test flashes the DUT connected to the RTE through 20 | ... the SD Wire, then attempts to log into it over serial to see whether 21 | ... it works. 22 | Variable Should Exist ${DUT_PASSWORD} 23 | Variable Should Exist ${FILE_BMAP} 24 | Variable Should Exist ${FILE_GZ} 25 | Flash SD Card Via SD Wire ${FILE_BMAP} ${FILE_GZ} ${SD_WIRE_SERIAL1} 26 | Serial Root Login Linux ${DUT_PASSWORD} 27 | ${version}= Get Linux Version ID 28 | ${dir} ${file_gz}= Split Path ${FILE_GZ} 29 | Should Contain ${file_gz} ${version} 30 | -------------------------------------------------------------------------------- /zarhus-base/01_base_os.robot: -------------------------------------------------------------------------------- 1 | *** Settings *** 2 | Library Collections 3 | Library String 4 | Library Telnet timeout=20 seconds connection_timeout=120 seconds 5 | Library SSHLibrary timeout=90 seconds 6 | Library RequestsLibrary 7 | Resource ../../variables.robot 8 | Resource ../../keywords.robot 9 | Resource ../lib/sd-wire.robot 10 | Resource ../lib/linux.robot 11 | 12 | Suite Setup Prepare Test Suite 13 | Suite Teardown Log Out And Close Connection 14 | 15 | 16 | *** Test Cases *** 17 | Y003.1 Platform boots 18 | [Documentation] This test verifies booting of the device. 19 | Variable Should Exist ${DUT_PASSWORD} 20 | Power Cycle On 21 | Serial Root Login Linux ${DUT_PASSWORD} 22 | 23 | Y003.2 Basic Packages are installed 24 | [Documentation] checks whether tar, time and chronyc utilities exist. 25 | Get Utility Version tar 26 | Get Utility Version time 27 | Get Utility Version chronyc 28 | 29 | Y003.3 USB devices are visible 30 | [Documentation] check whether we can see a USB stick that's plugged in. 31 | ... Also checks whether we mount/umount it and write/read. 32 | ${partition}= Telnet.Execute Command 33 | ... dmesg | grep -F "USB Mass Storage device detected" --context=10 | grep 'sd[^[:space:]]' | tail -1 | awk '{gsub(/[\\[\\]]/, "", $5); print $5}' 34 | ${partition}= Get Line ${partition} 0 35 | Telnet.Execute Command mount /dev/${partition}1 /mnt 36 | Telnet.Execute Command echo hi > /mnt/something.txt 37 | Telnet.Execute Command umount /dev/${partition}* 38 | Telnet.Execute Command mount /dev/${partition}1 /mnt 39 | ${output}= Telnet.Execute Command cat /mnt/something.txt 40 | ${output}= Get Line ${output} 0 41 | Should Be Equal As Strings ${output} hi 42 | Telnet.Execute Command rm /mnt/something.txt 43 | Telnet.Execute Command umount /dev/${partition}* 44 | 45 | Y003.4 Ethernet connection is supported 46 | [Documentation] tests whether we have an internet connection 47 | Check Internet Connection On Linux 48 | --------------------------------------------------------------------------------