@@ -20,7 +20,7 @@ let read_one_byte ~sw r =
2020let test_poll_add () =
2121 Eio_linux. run @@ fun _stdenv ->
2222 Switch. run @@ fun sw ->
23- let r, w = Eio_linux . pipe sw in
23+ let r, w = Eio_unix . pipe sw in
2424 let thread = read_one_byte ~sw r in
2525 Fiber. yield () ;
2626 let w = Option. get (Eio_linux. get_fd_opt w) in
@@ -33,7 +33,7 @@ let test_poll_add () =
3333let test_poll_add_busy () =
3434 Eio_linux. run ~queue_depth: 2 @@ fun _stdenv ->
3535 Switch. run @@ fun sw ->
36- let r, w = Eio_linux . pipe sw in
36+ let r, w = Eio_unix . pipe sw in
3737 let a = read_one_byte ~sw r in
3838 let b = read_one_byte ~sw r in
3939 Fiber. yield () ;
@@ -50,7 +50,7 @@ let test_copy () =
5050 Eio_linux. run ~queue_depth: 3 @@ fun _stdenv ->
5151 Switch. run @@ fun sw ->
5252 let msg = " Hello!" in
53- let from_pipe, to_pipe = Eio_linux . pipe sw in
53+ let from_pipe, to_pipe = Eio_unix . pipe sw in
5454 let buffer = Buffer. create 20 in
5555 Fiber. both
5656 (fun () -> Eio.Flow. copy from_pipe (Eio.Flow. buffer_sink buffer))
@@ -67,8 +67,8 @@ let test_direct_copy () =
6767 Eio_linux. run ~queue_depth: 4 @@ fun _stdenv ->
6868 Switch. run @@ fun sw ->
6969 let msg = " Hello!" in
70- let from_pipe1, to_pipe1 = Eio_linux . pipe sw in
71- let from_pipe2, to_pipe2 = Eio_linux . pipe sw in
70+ let from_pipe1, to_pipe1 = Eio_unix . pipe sw in
71+ let from_pipe2, to_pipe2 = Eio_unix . pipe sw in
7272 let buffer = Buffer. create 20 in
7373 let to_output = Eio.Flow. buffer_sink buffer in
7474 Switch. run (fun sw ->
@@ -85,9 +85,15 @@ let test_direct_copy () =
8585let test_iovec () =
8686 Eio_linux. run ~queue_depth: 4 @@ fun _stdenv ->
8787 Switch. run @@ fun sw ->
88- let from_pipe, to_pipe = Eio_linux. pipe sw in
89- let from_pipe = Eio_linux. get_fd from_pipe in
90- let to_pipe = Eio_linux. get_fd to_pipe in
88+ let from_pipe, to_pipe = Eio_unix. pipe sw in
89+ let from_pipe =
90+ Eio_unix.FD. take from_pipe |>
91+ Eio_linux.FD. of_unix ~sw ~seekable: false ~close_unix: true
92+ in
93+ let to_pipe =
94+ Eio_unix.FD. take to_pipe |>
95+ Eio_linux.FD. of_unix ~sw ~seekable: false ~close_unix: true
96+ in
9197 let message = Cstruct. of_string " Got [ ] and [ ]" in
9298 let rec recv = function
9399 | [] -> ()
0 commit comments