From dd1e35f9c021493c203b5a8d820017b574273d8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 29 Mar 2024 20:31:37 +0100 Subject: [PATCH] run_crash_test(): better error message when we get a none-ice --- src/tools/compiletest/src/runtest.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index ae140962e40..da305aff953 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -368,7 +368,8 @@ impl<'test> TestCx<'test> { // if a test does not crash, consider it an error match proc_res.status.code() { Some(101) => (), - _ => self.fatal("expected ICE"), + Some(other) => self.fatal(&format!("expected exit code 101, got: {}", other)), + e => self.fatal(&format!("expected ICE, got '{:?}'", e)), } } @@ -2320,6 +2321,9 @@ impl<'test> TestCx<'test> { } let (Output { status, stdout, stderr }, truncated) = self.read2_abbreviated(child); + eprintln!("{:?}", status); + eprintln!("{}", String::from_utf8_lossy(&stdout).into_owned()); + eprintln!("{}", String::from_utf8_lossy(&stdout).into_owned()); let result = ProcRes { status,