From 1071a3d301fe60e514549df79735fecf888de337 Mon Sep 17 00:00:00 2001 From: Ruben Hakobyan Date: Sun, 7 Jun 2026 14:52:42 -0700 Subject: [PATCH] test_infra: improve guest MemTotal assertion message validate_memory() asserts that the guest's reported MemTotal exceeds the expected size, but on failure printed nothing about either value. Include both the actual and expected figures in the panic message so a failing run is self-explanatory. Assisted-by: Claude:Opus-4.8 Signed-off-by: Ruben Hakobyan --- test_infra/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test_infra/src/lib.rs b/test_infra/src/lib.rs index ca33efeb4..063509547 100644 --- a/test_infra/src/lib.rs +++ b/test_infra/src/lib.rs @@ -1804,7 +1804,11 @@ impl Guest { .or_else(|| self.get_expected_memory()) .unwrap_or_default(); - assert!(self.get_total_memory().unwrap_or_default() > memory); + let total = self.get_total_memory().unwrap_or_default(); + assert!( + total > memory, + "guest MemTotal {total} kB is not greater than expected {memory} kB" + ); } }