From a45f473683fc8cc565b03967fa259acb8777a267 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 10 Jun 2019 15:00:14 +0100 Subject: [PATCH] tests: Loosen memory check requirements With slide variations in the kernel the memory size checks can fail so round down the testing numbers to the nearest multiple of 1000 to make the tests more stable. Signed-off-by: Rob Bradford --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 91ae9f37f..7549ca1f2 100755 --- a/src/main.rs +++ b/src/main.rs @@ -232,8 +232,7 @@ mod tests { thread::sleep(std::time::Duration::new(10, 0)); aver_eq!(tb, get_cpu_count(), 1); - aver_eq!(tb, get_total_memory(), 496_400); - + aver!(tb, get_total_memory() > 496_000); aver!(tb, get_entropy() >= 1000); ssh_command("sudo reboot"); @@ -284,7 +283,7 @@ mod tests { thread::sleep(std::time::Duration::new(10, 0)); - aver!(tb, get_total_memory() > 5_063_800); + aver!(tb, get_total_memory() > 5_063_000); ssh_command("sudo reboot"); thread::sleep(std::time::Duration::new(10, 0));