diff --git a/services/shellchat/Cargo.toml b/services/shellchat/Cargo.toml index dd3c4e345..deffa8d3f 100644 --- a/services/shellchat/Cargo.toml +++ b/services/shellchat/Cargo.toml @@ -145,6 +145,7 @@ shellperf = [ ] # this also needs the project-wide "perfcounter" feature to be selected. shellchat is the exclusive manager of the performance counter, do not use with e.g. "vaultperf" feature extra-tests = [] mass-storage = [] +rand-api = [] locktests = [ ] # for debugging some specific `std` tests cherry-picked out of the test suite default = [] # "debugprint" diff --git a/services/shellchat/src/cmds/trng_cmd.rs b/services/shellchat/src/cmds/trng_cmd.rs index ca6f6fd59..160d545c3 100644 --- a/services/shellchat/src/cmds/trng_cmd.rs +++ b/services/shellchat/src/cmds/trng_cmd.rs @@ -81,8 +81,9 @@ impl<'a> ShellCmdApi<'a> for TrngCmd { } write!(ret, "Pumped {}x1k values out of the engine", ROUNDS).unwrap(); } - // rand_core API tests - commented out because they only need to be run once, basically. - /* + // rand_core API tests - not included by default because it only needs to be run whenever + // the rand API is updated + #[cfg(feature = "rand-api")] "api" => { // the purpose of these tests is to check the edge-case code because // the trng fetch is u32, but rand_core allows u8 @@ -143,7 +144,7 @@ impl<'a> ShellCmdApi<'a> for TrngCmd { let mut test4100 = [0u8; 4100]; OsRng.fill_bytes(&mut test4100); log::info!("test 4100: {:?}", &test4100[4092..]); - } */ + } "errs" => { write!(ret, "TRNG error stats: {:?}", env.trng.get_error_stats().unwrap()).unwrap(); }