projects
/
gps-watch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ec91a7
)
test: Make Logger test's pipe non-blocking.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Sat, 11 Jan 2020 10:33:22 +0000
(11:33 +0100)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Sun, 12 Jan 2020 12:03:49 +0000
(13:03 +0100)
There are cases where we need to verify that the pipe is empty.
test/logger_test.rs
patch
|
blob
|
history
diff --git
a/test/logger_test.rs
b/test/logger_test.rs
index 93568bb3f85ea00f7fe7bbfd4b032d448bbd27b0..2bb507fc2d7070c4f3e6d5f7f77acfbbfff35171 100644
(file)
--- a/
test/logger_test.rs
+++ b/
test/logger_test.rs
@@
-80,10
+80,12
@@
impl Pipe {
unsafe {
extern {
- fn pipe
(pipefd: *mut
i32) -> i32;
+ fn pipe
2(pipefd: *mut i32, flags:
i32) -> i32;
}
- pipe(pipe_fd.as_mut_ptr());
+ const O_NONBLOCK : i32 = 0x800;
+
+ pipe2(pipe_fd.as_mut_ptr(), O_NONBLOCK);
}
Pipe {