[tests] Verify ability to sleep the CPU

The self-test suite does not currently ever attempt to sleep the CPU.
This is an operation that may fail (e.g. by attempting to execute a
privileged instruction while running as a Linux userspace binary, or
by halting the CPU with all interrupts disabled).

Add a trivial self-test to exercise the ability to sleep the CPU
without crashing or halting forever.

Inspired-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2023-01-31 10:17:57 +00:00
parent 3bcd0d3271
commit 66a2ff442d
2 changed files with 54 additions and 0 deletions

View File

@@ -80,3 +80,4 @@ REQUIRE_OBJECT ( acpi_test );
REQUIRE_OBJECT ( hmac_test );
REQUIRE_OBJECT ( dhe_test );
REQUIRE_OBJECT ( gcm_test );
REQUIRE_OBJECT ( nap_test );