mirror of
https://gitee.com/openharmony/third_party_rust_nix
synced 2024-11-27 17:41:12 +00:00
Merge #1737
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:
commit
649430f990
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user