-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Several tests fail with --disable-jemalloc #35017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just tried this (with
|
One way out would be to extend
Another option is being able to detect whether
Also curious why there isn't a non-jemalloc build that exercises these failing The first option is easy to implement, but just for this? diff --git a/src/test/compile-fail/allocator-dylib-is-system.rs b/src/test/compile-fail/allocator-dylib-is-system.rs
index 4c576de..1a48ccd 100644
--- a/src/test/compile-fail/allocator-dylib-is-system.rs
+++ b/src/test/compile-fail/allocator-dylib-is-system.rs
@@ -12,7 +12,7 @@
// aux-build:allocator-dylib.rs
// aux-build:allocator1.rs
// no-prefer-dynamic
-// error-pattern: cannot link together two allocators
+// error-pattern: cannot link together two allocators|can't find crate for `alloc_jemalloc`
// Verify that the allocator for statically linked dynamic libraries is the
// system allocator. Do this by linking in jemalloc and making sure that we get
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 1ec0838..e7e8f53 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -987,20 +987,23 @@ actual:\n\
}
let mut next_err_idx = 0;
let mut next_err_pat = self.props.error_patterns[next_err_idx].trim();
- let mut done = false;
+ let mut next_or_pats: Vec<&str> = next_err_pat.split('|').collect();
+
for line in output_to_check.lines() {
- if line.contains(next_err_pat) {
- debug!("found error pattern {}", next_err_pat);
- next_err_idx += 1;
- if next_err_idx == self.props.error_patterns.len() {
- debug!("found all error patterns");
- done = true;
+ for pat in next_or_pats.clone().iter() {
+ if line.contains(pat) {
+ debug!("found error pattern {}", next_err_pat);
+ next_err_idx += 1;
+ if next_err_idx == self.props.error_patterns.len() {
+ debug!("found all error patterns");
+ return;
+ }
+ next_err_pat = self.props.error_patterns[next_err_idx].trim();
+ next_or_pats = next_err_pat.split('|').collect();
break;
}
- next_err_pat = self.props.error_patterns[next_err_idx].trim();
}
}
- if done { return; }
let missing_patterns = &self.props.error_patterns[next_err_idx..];
if missing_patterns.len() == 1 { |
This is highly likely to be fixed as part of #42313, not tested though. |
Those 3 tests still fail for me with |
The allocator tests are now different, but they all pass even with
|
I currently can't run a full
make check
when using--disable-jemalloc
, because there are a few tests that assume they have multiple allocators to play with. Those I found were:src/test/compile-fail/allocator-dylib-is-system.rs
src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs
src/test/run-pass/allocator-default.rs
All three of these are at least conditional on
target_os = "linux"
or"macos"
, but having linux without jemalloc gets a quick failure.The text was updated successfully, but these errors were encountered: