Skip to content

Commit

Permalink
Merge #1737
Browse files Browse the repository at this point in the history
1737: Fix the test_acct test r=rtzoeller a=asomers

It has never actually executed its command, so the only reason that it
ever worked is that on most systems there are usually processes starting
and exiting all the time.

Co-authored-by: Alan Somers <asomers@gmail.com>
  • Loading branch information
bors[bot] and asomers authored Jun 9, 2022
2 parents 5dedbc7 + c8a9cf3 commit 649430f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/test_unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,10 @@ fn test_acct() {
acct::enable(path).unwrap();

loop {
Command::new("echo").arg("Hello world");
Command::new("echo")
.arg("Hello world")
.output()
.unwrap();
let len = fs::metadata(path).unwrap().len();
if len > 0 { break; }
thread::sleep(time::Duration::from_millis(10));
Expand Down

0 comments on commit 649430f

Please sign in to comment.