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>
This commit is contained in:
bors[bot] 2022-06-09 03:29:21 +00:00 committed by GitHub
commit 649430f990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));