!!! WARNING !!!
This repository is in the process of migration and multiple major reworks. If
you do not know what you are doing, consider not using it until at least
v0.5.0
is released. When this is scheduled, link to such a milestone will
appear here.
!!! WARNING !!!
The following repository contains set of tests and other features to conduct Dasharo firmware validation procedures.
Dasharo OSFV consists of following modules:
dasharo-compatibility
,dasharo-security
,dasharo-performance
,dasharo-stability
.In addition, keep in mind that due to the approach to generating release files,
for the raptor-CS talos2
platform dedicated mechanism for testing environment
and running tests have been implemented.
Manufacturer | Platform | Firmware | $CONFIG |
---|---|---|---|
NovaCustom | NV41MZ | Dasharo | novacustom-nv41mz |
NovaCustom | NV41MB | Dasharo | novacustom-nv41mb |
NovaCustom | NS50MU | Dasharo | novacustom-ns50mu |
NovaCustom | NS70MU | Dasharo | movacustom-ns70mu |
NovaCustom | NV41PZ | Dasharo | novacustom-nv41pz |
NovaCustom | NS50PU | Dasharo | novacustom-ns50pu |
NovaCustom | NS70PU | Dasharo | novacustom-ns70pu |
MSI | PRO Z690 A WIFI DDR4 | Dasharo | msi-pro-z690-a-wifi-ddr4 |
MSI | PRO Z690 A DDR5 | Dasharo | msi-pro-z690-a-ddr5 |
Protectli | V1210 | Dasharo | protectli-v1210 |
Protectli | V1410 | Dasharo | protectli-v1410 |
Protectli | V1610 | Dasharo | protectli-v1610 |
Protectli | VP2410 | Dasharo | protectli-vp2410 |
Protectli | VP2420 | Dasharo | protectli-vp2420 |
Protectli | VP4630 | Dasharo | protectli-vp4630 |
Protectli | VP4650 | Dasharo | protectli-vp4650 |
Protectli | VP4670 | Dasharo | protectli-vp4670 |
Raptor-CS | TalosII | Dasharo | raptor-cs_talos2 |
Raspberry Pi | RaspberryPi 3B | Yocto | rpi-3b |
QEMU | Q35 | Dasharo (UEFI) | qemu |
git clone https://github.com/Dasharo/open-source-firmware-validation
cd open-source-firmware-validation
git submodule update --init --checkout
python3 -m virtualenv venv
source venv/bin/activate
pip install -U -r requirements-openbmc.txt
pip install -r requirements.txt
source venv/bin/activate
NOTE:
keywords.robot
requires osfv_cli to be installed on the host system. Go through these steps to configure the scripts
When running tests on Dasharo platforms use the following commands:
robot -L TRACE -v rte_ip:$RTE_IP -v config:$CONFIG -v device_ip:$DEVICE_IP \
-t $TEST_CASE_ID $TEST_MODULE/$TEST_SUITE
robot -L TRACE -v rte_ip:$RTE_IP -v config:$CONFIG -v device_ip:$DEVICE_IP \
$TEST_MODULE/$TEST_SUITE
robot -L TRACE -v rte_ip:$RTE_IP -v config:$CONFIG -v device_ip:$DEVICE_IP \
$TEST_MODULE
Parameters should be defined as follows:
platform-configs
directory for
available configurations.dasharo-compatibility
),uefi-shell.robot
),CBP001.001*
).
Note that after test case ID asterisk should be added, if you do not wish
to provide the full test name here.You can also run tests with -v snipeit:no
in order to skip checking whether
the platform is available on snipeit. By default, this is enabled.
When running tests on Talos2 platform use the following commands:
WARNING The support state of this platform in the main
branch may vary.
We should have a single documentation for all platforms. This effort is tracked in
this issue.
robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \
-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \
-t $TEST_CASE_ID $TEST_MODULE/$TEST_SUITE
robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \
-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \
$TEST_MODULE/$TEST_SUITE
robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \
-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \
./$TEST_MODULE
Parameters should be defined as follows:
192.168.20.9
),dasharo-compatibility
),coreboot-base-port
),CBP001.001
).
Note that after test case ID asterisk should be added. This is necessary due
to the construction of the flag -t
(or --test
)You can also run tests with -v snipeit:no
in order to skip checking whether
the platform is available on snipeit.
Make sure to proceed with Getting started section first.
Many of the test and keywords can be tested in emulation environment. This can greatly increase the development speed:
Following script assume that you have OVMF_CODE.fd
and OVMF_VARS.fd
in you
current working directory. If those binaries will not be found script will
download latest release of Dasharo (UEFI) for QEMU Q35.
If you want to use script in development workflow, most likely you have already built
Dasharo (UEFI) for QEMU Q35 according to
this instruction.
In that case you would like to provide directory with Dasharo (UEFI) binaries as
environment variable (DIR
).
You may also decide to not use graphics user interface for QEMU. In that case
choose mode nographic
. If you run QEMU on a remote machine you may consider
to use mode vnc
with default port for graphical output being 5900
.
Dasharo (UEFI) in QEMU can be started with:
./scripts/ci/qemu-run.sh graphic firmware
In this mode, a graphical QEMU window would popup, so you can observe the test flow, or control it manually. The actual testing will happen over serial, which is exposed via telnet. For more modes and options, please refer to the script's help text.
You may also build customized Dasharo firmware for QEMU (e.g. with some Dasharo options enabled or disabled). In such a case, please refer to:
Refer to the latest releases to see which test have been proven to work on QEMU so far.
You may also refer to the ./scripts/ci/qemu-self-test.sh
, where we aim to
keep testing common keywords, to ensure of their correct operation.
pre-commit install
A list of guidelines we shall follow during transition to improve the quality
of this repository. We start with getting rid of duplicated keywords, reducing
the size of keywords.robot
file, and improving their overall quality.
There are other areas of interest that we will look into in the next steps and add as guidelines:
pre-commit
locally. All pre-commit and other CI checks
must pass of course, prior requesting for review. Please check the status of
checks in your PR. If the failure is questionable, provide your arguments
for that, rather than silently ignoring this fact.keywords.robot
will be accepted
lib/
directorykeywords.robot
, you should create a new
module under lib/
keywords.module
and
move related keywords there as well, if suitableRead From Terminal Until Prompt
Read From Terminal Until
Read From Terminal
Usage of other keywords is prohibited. Whenever you modify a test/keyword,
you should rework it to use one of the above.Execute Command In Terminal
Write Into Terminal
Write Bare Into Terminal
Usage of other keywords is prohibited. Whenever you modify a test/keyword,
you should rework it to use one of the above.
You should use Execute Command In Terminal
unless you have a very good
reason not to. Thanks to that, your keyword will not leave floating output
in buffer to be received by another keywords, not expecting that.[Documentation]
section.