From addf680cbd9167eccbf8518039e53a10b3b68dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Sat, 20 Mar 2021 00:00:00 +0000 Subject: [PATCH 1/2] Use a single codegen unit to reduce non-determinism in srcloc.rs test When building with multiple codegen units the test case can fail with only a subset of all errors. Use a single codegen unit as a workaround. --- src/test/ui/asm/srcloc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ui/asm/srcloc.rs b/src/test/ui/asm/srcloc.rs index 1477e3dd5665c..7262064e7bbee 100644 --- a/src/test/ui/asm/srcloc.rs +++ b/src/test/ui/asm/srcloc.rs @@ -1,7 +1,7 @@ // no-system-llvm // only-x86_64 // build-fail - +// compile-flags: -Ccodegen-units=1 #![feature(asm)] // Checks that inline asm errors are mapped to the correct line in the source code. From 3d64f8d475d701a36971cb416e49b80449988f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Mon, 8 Mar 2021 00:00:00 +0000 Subject: [PATCH 2/2] Join test thread to make assertion effective in sym.rs test case --- src/test/ui/asm/sym.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ui/asm/sym.rs b/src/test/ui/asm/sym.rs index 9931697e4129c..d5c03a7d567ba 100644 --- a/src/test/ui/asm/sym.rs +++ b/src/test/ui/asm/sym.rs @@ -76,5 +76,5 @@ fn main() { std::thread::spawn(|| { assert_eq!(static_addr!(S1), &S1 as *const u32); assert_eq!(static_tls_addr!(S2), &S2 as *const u32); - }); + }).join().unwrap(); }