From fc325cdd237fe2d53e8a3c03202ed5bbbcb9fc8d Mon Sep 17 00:00:00 2001 From: Junichi Uekawa Date: Tue, 27 Jul 2021 11:16:44 +0900 Subject: [PATCH] integration_tests: Show error message passed down instead. Might help a bit more when things stop working. BUG=None TEST=./integration_tests/run # and observe the error message. thread 'boot_test_suspend_resume' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidFd', integration_tests/tests/fixture.rs:176:24 becomes thread 'boot_test_suspend_resume' panicked at 'failed to initiailize syslog: guess of fd for syslog connection was invalid', integration_tests/tests/fixture.rs:177:13 Change-Id: Ife82b9e430d416a40cefced258e7f9bdc589bf73 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3055551 Reviewed-by: Keiichi Watanabe Reviewed-by: Daniel Verkamp Tested-by: kokoro Commit-Queue: Junichi Uekawa --- integration_tests/tests/fixture.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration_tests/tests/fixture.rs b/integration_tests/tests/fixture.rs index 42a1604f6a..c1b762db7f 100644 --- a/integration_tests/tests/fixture.rs +++ b/integration_tests/tests/fixture.rs @@ -173,7 +173,9 @@ impl TestVm { /// Downloads prebuilts if needed. fn initialize_once() { - syslog::init().unwrap(); + if let Err(e) = syslog::init() { + panic!("failed to initiailize syslog: {}", e); + } // It's possible the prebuilts downloaded by crosvm-9999.ebuild differ // from the version that crosvm was compiled for.