DebugConsole: update test_mlexecute for kata-ml-coordinator changes

Change-Id: I02dbbe01b623d39b5e49bee15e620efebfea5fe1
GitOrigin-RevId: df14aecfcde1e0ed0fda7a615e670f8777873c5e
This commit is contained in:
Sam Leffler
2022-05-13 17:33:41 +00:00
parent 6729689f1b
commit 876c7148e7
2 changed files with 11 additions and 9 deletions

View File

@@ -21,6 +21,7 @@ hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
kata-io = { path = "../kata-io" } kata-io = { path = "../kata-io" }
kata-line-reader = { path = "../kata-line-reader" } kata-line-reader = { path = "../kata-line-reader" }
kata-memory-interface = { path = "../../MemoryManager/kata-memory-interface" } kata-memory-interface = { path = "../../MemoryManager/kata-memory-interface" }
kata-ml-interface = { path = "../../MlCoordinator/kata-ml-interface" }
kata-proc-interface = { path = "../../ProcessManager/kata-proc-interface" } kata-proc-interface = { path = "../../ProcessManager/kata-proc-interface" }
kata-os-common = { path = "../../kata-os-common" } kata-os-common = { path = "../../kata-os-common" }
kata-security-interface = { path = "../../SecurityCoordinator/kata-security-interface" } kata-security-interface = { path = "../../SecurityCoordinator/kata-security-interface" }

View File

@@ -12,6 +12,7 @@ use log;
use kata_io as io; use kata_io as io;
use kata_line_reader::LineReader; use kata_line_reader::LineReader;
use kata_memory_interface::*; use kata_memory_interface::*;
use kata_ml_interface::kata_mlcoord_execute;
use kata_os_common::sel4_sys; use kata_os_common::sel4_sys;
use kata_os_common::slot_allocator; use kata_os_common::slot_allocator;
use kata_proc_interface::kata_pkg_mgmt_install; use kata_proc_interface::kata_pkg_mgmt_install;
@@ -144,7 +145,7 @@ fn dispatch_command(cmdline: &str, input: &mut dyn io::BufRead, output: &mut dyn
"test_alloc" => test_alloc_command(output), "test_alloc" => test_alloc_command(output),
"test_alloc_error" => test_alloc_error_command(output), "test_alloc_error" => test_alloc_error_command(output),
"test_bootinfo" => test_bootinfo_command(output), "test_bootinfo" => test_bootinfo_command(output),
"test_mlexecute" => test_mlexecute_command(), "test_mlexecute" => test_mlexecute_command(&mut args, output),
"test_mlcontinuous" => test_mlcontinuous_command(&mut args), "test_mlcontinuous" => test_mlcontinuous_command(&mut args),
"test_obj_alloc" => test_obj_alloc_command(output), "test_obj_alloc" => test_obj_alloc_command(output),
"test_panic" => test_panic_command(), "test_panic" => test_panic_command(),
@@ -577,14 +578,14 @@ fn test_panic_command() -> Result<(), CommandError> {
} }
/// Implements a command that runs an ML execution. /// Implements a command that runs an ML execution.
fn test_mlexecute_command() -> Result<(), CommandError> { fn test_mlexecute_command(
extern "C" { args: &mut dyn Iterator<Item = &str>,
fn mlcoord_execute(); _output: &mut dyn io::Write,
} ) -> Result<(), CommandError> {
unsafe { let bundle_id = args.next().ok_or(CommandError::BadArgs)?;
mlcoord_execute(); let model_id = args.next().ok_or(CommandError::BadArgs)?;
} kata_mlcoord_execute(bundle_id, model_id)
Ok(()) .map_err(|_| CommandError::IO)
} }
/// Implements a command that sets whether the ml execution is continuous. /// Implements a command that sets whether the ml execution is continuous.