Skip to content

Commit

Permalink
Merge pull request #584 from betrusted-io/fix-test
Browse files Browse the repository at this point in the history
fix broken factory test
  • Loading branch information
bunnie authored Sep 23, 2024
2 parents 32c5bad + f248be9 commit 5fb60a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions services/shellchat/src/cmds/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ use std::sync::Arc;
#[cfg(feature = "extra-tests")]
use std::time::Instant;

use String;
use base64::encode;
use codec::*;
use num_traits::*;
use xous::{Message, MessageEnvelope};
use String;

use crate::oqc_test::OqcOp;
use crate::{CommonEnv, ShellCmdApi};
Expand Down Expand Up @@ -174,8 +174,8 @@ impl<'a> ShellCmdApi<'a> for Test {
"frob" => {
const N: u32 = 10;
const M: usize = if cfg!(miri) { 10000 } else { 100000 };
use std::sync::mpsc::channel;
use std::sync::RwLock;
use std::sync::mpsc::channel;
use std::thread;

use rand::Rng;
Expand Down Expand Up @@ -372,9 +372,9 @@ impl<'a> ShellCmdApi<'a> for Test {
}
const ROUNDS: usize = 16; // pump a bunch of data to trigger another trng buffer refill, resetting the stats
for _ in 0..ROUNDS {
let mut buf: [u32; 1024] = [0; 1024];
let mut buf: [u32; 1020] = [0; 1020];
env.trng.fill_buf(&mut buf).unwrap();
log::debug!("pump samples: {:x}, {:x}, {:x}", buf[0], buf[512], buf[1023]); // prevent the pump values from being optimized out
log::debug!("pump samples: {:x}, {:x}, {:x}", buf[0], buf[512], buf[1019]); // prevent the pump values from being optimized out
}
ht = env.trng.get_health_tests().unwrap();
}
Expand Down

0 comments on commit 5fb60a4

Please sign in to comment.