From b67fa3ec81c7e26091f49dec3c57b154a24a86ef Mon Sep 17 00:00:00 2001 From: kevinaboos Date: Tue, 19 Sep 2023 17:50:30 +0000 Subject: [PATCH] Add automated QEMU-based testing to CI (#1041) * Added `qemu_test` application that automatically runs all tests and returns a specific exit code from QEMU based on test output. * Added a `test` Make target that enables and runs `qemu_test`. * Added a CI workflow that runs the `test` target * Changed `test_mlx5`, `test_ixgbe`, and `test_block_io` to return an exit code of 0 if the required devices aren't connected. * Changed `test_identity_mapping`, `test_aligned_page_allocation`, and `test_filerw` to fail rather than print if they encounter an error. * Renamed `tls_test` to `test_tls` so it is detected by `qemu_test`. * Changed `test_channel` and `test_tls` to run all tests rather than specifying specific tests in the arguments. * Renamed `test_serial_echo` to `serial_echo` because it isn't really a test with defined success and failure conditions. * Changed `test_task_cancel` to always return 0, because task cancellation is not yet implemented in the mainline. * Skip `test_channel`, as it currently does not work. Signed-off-by: Klimenty Tsoutsman 7a8d64aa3aecdae5ed1231ebf46adcceede62713 --- doc/first_application/fn.start.html | 2 +- doc/first_application/index.html | 2 +- doc/src/first_application/lib.rs.html | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/first_application/fn.start.html b/doc/first_application/fn.start.html index b98898fe93..cb3c2c0515 100644 --- a/doc/first_application/fn.start.html +++ b/doc/first_application/fn.start.html @@ -1,4 +1,4 @@ -start in first_application - Rust

Function first_application::start

source ·
pub fn start() -> Result<(), &'static str>
Expand description

Starts the first applications that run in Theseus +start in first_application - Rust

Function first_application::start

source ·
pub fn start() -> Result<(), &'static str>
Expand description

Starts the first applications that run in Theseus by creating a new “default” application namespace and spawning the first application Task(s).

Currently this only spawns a shell (terminal), diff --git a/doc/first_application/index.html b/doc/first_application/index.html index 00948771ac..b1edef203e 100644 --- a/doc/first_application/index.html +++ b/doc/first_application/index.html @@ -1,4 +1,4 @@ -first_application - Rust

Expand description

This crate contains a simple routine to start the first application (or set of applications).

+first_application - Rust
Expand description

This crate contains a simple routine to start the first application (or set of applications).

This should be invoked at or towards the end of the kernel initialization procedure.

Important Dependency Note

In general, Theseus kernel crates cannot depend on application crates. diff --git a/doc/src/first_application/lib.rs.html b/doc/src/first_application/lib.rs.html index 3e770e064f..b1c040ac46 100644 --- a/doc/src/first_application/lib.rs.html +++ b/doc/src/first_application/lib.rs.html @@ -57,6 +57,7 @@ 57 58 59 +60

//! This crate contains a simple routine to start the first application (or set of applications). 
 //! 
 //! This should be invoked at or towards the end of the kernel initialization procedure. 
@@ -87,7 +88,8 @@
 
 /// See the crate-level docs and this crate's `Cargo.toml` for more.
 const FIRST_APPLICATION_CRATE_NAME: &str = {
-    #[cfg(target_arch = "x86_64")] { "shell-" }
+    #[cfg(all(target_arch = "x86_64", feature = "qemu_test"))] { "qemu_test-" }
+    #[cfg(all(target_arch = "x86_64", not(feature = "qemu_test")))] { "shell-" }
     #[cfg(target_arch = "aarch64")] { "hello-" }
 };