Skip to content

Commit 5602322

Browse files
committed
rewrite libtest-thread-limit to rmake
1 parent d4e07d0 commit 5602322

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ run-make/jobserver-error/Makefile
2424
run-make/libs-through-symlinks/Makefile
2525
run-make/libtest-json/Makefile
2626
run-make/libtest-junit/Makefile
27-
run-make/libtest-thread-limit/Makefile
2827
run-make/link-cfg/Makefile
2928
run-make/long-linker-command-lines-cmd-exe/Makefile
3029
run-make/long-linker-command-lines/Makefile

tests/run-make/libtest-thread-limit/Makefile

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// libtest used to panic if it hit the thread limit. This often resulted in spurious test failures
2+
// (thread 'main' panicked at 'called Result::unwrap() on an Err value: Os
3+
// { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }' ...
4+
// error: test failed, to rerun pass '--lib').
5+
// Since the fix in #81546, the test should continue to run synchronously
6+
// if it runs out of threads. Therefore, this test's final execution step
7+
// should succeed without an error.
8+
// See https://github.com/rust-lang/rust/pull/81546
9+
10+
//@ only-linux
11+
// Reason: the `ulimit` utility is used
12+
13+
use run_make_support::{cmd, run, rustc};
14+
15+
fn main() {
16+
rustc().input("test.rs").arg("--test").run();
17+
cmd("ulimit").arg("-p").arg("0").run();
18+
run("test");
19+
}

tests/run-make/macos-deployment-target/rmake.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// See https://github.com/rust-lang/rust/pull/105123
55

66
//@ only-macos
7+
// Reason: this test exercises an OSX-specific issue
78

89
use run_make_support::{cmd, rustc};
910

0 commit comments

Comments
 (0)