diff --git a/kernel/src/arch/hosted/mod.rs b/kernel/src/arch/hosted/mod.rs index b5d1dfe35..096903fdf 100644 --- a/kernel/src/arch/hosted/mod.rs +++ b/kernel/src/arch/hosted/mod.rs @@ -65,7 +65,7 @@ pub fn set_send_addr(send_addr: Sender) { #[cfg(not(test))] use core::sync::atomic::{AtomicU64, Ordering}; #[cfg(not(test))] -static LOCAL_RNG_STATE: AtomicU64 = AtomicU64::new(xous_kernel::TESTING_RNG_SEED); +static LOCAL_RNG_STATE: AtomicU64 = AtomicU64::new(xous_kernel::TESTING_RNG_SEED + 2); #[cfg(not(test))] fn generate_pid_key() -> [u8; 16] { diff --git a/kernel/src/test.rs b/kernel/src/test.rs index 5fab9b856..2cd550778 100644 --- a/kernel/src/test.rs +++ b/kernel/src/test.rs @@ -17,7 +17,7 @@ static GLOBAL: &StatsAlloc = &INSTRUMENTED_SYSTEM; const SERVER_SPEC: &str = "127.0.0.1:0"; use core::sync::atomic::{AtomicU64, Ordering}; -static RNG_LOCAL_STATE: AtomicU64 = AtomicU64::new(xous::TESTING_RNG_SEED); +static RNG_LOCAL_STATE: AtomicU64 = AtomicU64::new(xous::TESTING_RNG_SEED + 1); fn start_kernel(server_spec: &str) -> JoinHandle<()> { assert!( diff --git a/services/pddb/src/tests.rs b/services/pddb/src/tests.rs index 598ce9fb0..b01d82829 100644 --- a/services/pddb/src/tests.rs +++ b/services/pddb/src/tests.rs @@ -7,7 +7,7 @@ use std::collections::BTreeSet; const UPPER_BOUND: usize = 9000; const LOWER_BOUND: usize = 12; // needs to be big enough to compute murmur3 hash + hold checksum -static RNG_LOCAL_STATE: AtomicU64 = AtomicU64::new(xous::TESTING_RNG_SEED); +static RNG_LOCAL_STATE: AtomicU64 = AtomicU64::new(xous::TESTING_RNG_SEED + 3); fn gen_key(dictname: &str, keynum: usize, lower_size_bound: usize, upper_size_bound: usize) -> (String, Vec::) { let mut rng = ChaCha8Rng::seed_from_u64(RNG_LOCAL_STATE.load(Ordering::SeqCst)); diff --git a/services/spinor/src/lib.rs b/services/spinor/src/lib.rs index 810574ca8..f8c11953a 100644 --- a/services/spinor/src/lib.rs +++ b/services/spinor/src/lib.rs @@ -328,7 +328,7 @@ impl Drop for Spinor { use core::sync::atomic::AtomicU64; #[cfg(test)] -static TEST_RNG_STATE: AtomicU64 = AtomicU64::new(xous::TESTING_RNG_SEED); +static TEST_RNG_STATE: AtomicU64 = AtomicU64::new(xous::TESTING_RNG_SEED + 4); // run with `cargo test -- --nocapture --test-threads=1`: // --nocapture to see the print output (while debugging) diff --git a/xous-rs/src/definitions.rs b/xous-rs/src/definitions.rs index 167ffa677..6db721827 100644 --- a/xous-rs/src/definitions.rs +++ b/xous-rs/src/definitions.rs @@ -40,7 +40,7 @@ pub const PDDB_LOC: u32 = 0x0100_0000; // PDDB start pub const PDDB_LEN: u32 = EC_REGION_LOC - PDDB_LOC; #[cfg(all(any(windows, unix), not(feature = "processes-as-threads")))] -pub const TESTING_RNG_SEED: u64 = 0; +pub const TESTING_RNG_SEED: u64 = 0; // 2 "works" pub mod exceptions; pub use exceptions::*;