@@ -19,22 +19,24 @@ fn main() {
19
19
. run_fail ( )
20
20
. stderr_utf8 ( ) ;
21
21
diff ( ) . expected_file ( "cannot_open_fd.stderr" ) . actual_text ( "actual" , out) . run ( ) ;
22
- // FIXME(Oneirical): Find how to use file descriptor "3" with run-make-support
23
- // and pipe /dev/null into it.
24
- // Original lines:
25
- //
26
- // bash -c 'echo "fn main() {}" | makeflags="--jobserver-auth=3,3" $(rustc) - 3</dev/null' \
27
- // 2>&1 | diff not_a_pipe.stderr -
22
+
23
+ let out = rustc ( )
24
+ . stdin ( "fn main() {}" )
25
+ . input ( "-" )
26
+ . env ( "MAKEFLAGS" , "--jobserver-auth=3,3" )
27
+ . set_aux_fd ( 3 , std:: fs:: File :: open ( "/dev/null" ) . unwrap ( ) )
28
+ . run ( )
29
+ . stderr_utf8 ( ) ;
30
+ diff ( ) . expected_file ( "not_a_pipe.stderr" ) . actual_text ( "actual" , out) . run ( ) ;
31
+
28
32
// # this test randomly fails, see https://github.com/rust-lang/rust/issues/110321
29
- // disabled:
30
- // bash -c 'echo "fn main() {}" | makeflags="--jobserver-auth=3,3" $(rustc) - \
31
- // 3< <(cat /dev/null)' 2>&1 | diff poisoned_pipe.stderr -
32
- //
33
+ // let (readpipe, _) = std::pipe::pipe().unwrap();
33
34
// let out = rustc()
34
35
// .stdin("fn main() {}")
35
36
// .input("-")
36
- // .env("MAKEFLAGS", "--jobserver-auth=0,0")
37
+ // .env("MAKEFLAGS", "--jobserver-auth=3,3")
38
+ // .set_fd3(readpipe)
37
39
// .run()
38
40
// .stderr_utf8();
39
- // diff().expected_file("not_a_pipe .stderr").actual_text("actual", out).run();
41
+ // diff().expected_file("poisoned_pipe .stderr").actual_text("actual", out).run();
40
42
}
0 commit comments