diff options
| author | Vincent Stehlé <[email protected]> | 2026-03-09 17:36:38 +0100 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2026-03-14 08:10:26 +0100 |
| commit | 41be502c1c4ac5d2732e9ae278480b9c73405e49 (patch) | |
| tree | 9f0bc434c50b1edbbdc77068caeca64f7ce7d8ac | |
| parent | cf61db3ca8a381855a7893034d2ba36d702ddc6c (diff) | |
test/py: add ECPT tests
Add a couple of EFI Conformance Profiles Table (ECPT) tests, which exercise
the "efidebug ecpt" command.
Signed-off-by: Vincent Stehlé <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
| -rw-r--r-- | test/py/tests/test_efi_ecpt.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/py/tests/test_efi_ecpt.py b/test/py/tests/test_efi_ecpt.py new file mode 100644 index 00000000000..632a6b90bad --- /dev/null +++ b/test/py/tests/test_efi_ecpt.py @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +""" Unit test for the EFI Conformance Profiles Table (ECPT) +""" + +import pytest + + [email protected]('cmd_efidebug') [email protected]('efi_ecpt') +def test_efi_ecpt(ubman) -> None: + """ Unit test for the ECPT + This test assumes nothing about the ECPT contents, it just checks that the + ECPT table is there and that the efidebug ecpt command does not fail. + + Args: + ubman -- U-Boot console + """ + response = ubman.run_command('efidebug tables') + assert ('36122546-f7e7-4c8f-bd9b-eb8525b50c0b ' + 'EFI Conformance Profiles Table') in response + + response = ubman.run_command('efidebug ecpt') + assert 'Unknown command' not in response + assert 'Configure UEFI environment' not in response + assert 'Usage:' not in response + assert 'table missing' not in response + + [email protected]('cmd_efidebug') [email protected]('efi_ecpt') [email protected]('efi_ebbr_2_1_conformance') +def test_efi_ecpt_ebbr_2_1(ubman) -> None: + """ Unit test for the ECPT, with EBBR 2.1 profile + This test uses the efidebug ecpt command to dump the ECPT and check that + the EBBR 2.1 conformance profile is there. + + Args: + ubman -- U-Boot console + """ + response = ubman.run_command('efidebug ecpt') + assert ('cce33c35-74ac-4087-bce7-8b29b02eeb27 ' + 'EFI EBBR 2.1 Conformance Profile') in response |
