This folder contains Intel TDX tests.
-
The tests must be executed a host that has been setup properly for Intel TDX.
-
Tox must be installed along with python3:
$ sudo apt install tox
$ sudo apt install python3
-
You must specify a path to the guest image with
TDXTEST_GUEST_IMG
environment variable. This is for both pytest and checkbox tests. -
The guest image must enable ssh server with password-based authentication for
root
user. The root user password must be123456
Go to the tests
folder.
- Run sanity tests to check the host setup:
$ sudo -E tox -e test_host
- Run guest tests:
$ sudo -E tox -e test_guest
- Run boot tests:
$ sudo -E tox -e test_boot
- Run perf tests:
$ sudo -E tox -e test_perf
- Run quote tests:
$ sudo -E tox -e test_quote
- Run stress tests:
$ sudo -E tox -e test_stress
- Run all tests:
Please note that the performance tests can take a long time (order of magnitude of a few hours per pytest.test_perf_benchmark
) to run.
$ sudo -E tox -e test_all
To list tests without running:
sudo -E tox -e collect_tests -- EXPRESSION
EXPRESSION
is the expression provided to the argument -k
of pytest
.
For more details on its format, you can refer to pytest
help page.
For example:
sudo -E tox -e collect_tests -- 'test_guest or test_stress'
To run tests matching an expression:
sudo -E tox -e test_specify -- EXPRESSION
Go to the tests
folder.
$ snapcraft
$ sudo snap install ./checkbox-tdx_1.0.0_amd64.snap --dangerous --classic
- Run sanity tests to check the host setup:
$ checkbox-tdx.test-runner-automated-host
- Run guest tests:
$ checkbox-tdx.test-runner-automated-guest
- Run boot tests:
$ checkbox-tdx.test-runner-automated-boot
- Run perf tests:
$ checkbox-tdx.test-runner-automated-perf
- Run quote tests:
$ checkbox-tdx.test-runner-automated-quote
- Run stress tests:
$ checkbox-tdx.test-runner-automated-stress
- Run all tests:
Please note that the performance tests can take a long time to run.
$ checkbox-tdx.test-runner-automated
For sanity and functionality test cases of Intel TDX, please see this wiki.