Skip to content

Commit

Permalink
skipping test
Browse files Browse the repository at this point in the history
  • Loading branch information
create2000 committed Nov 3, 2024
1 parent f8c9441 commit 0f65d34
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib_eio_linux/tests/test.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
exception Skip_test of string
let skip _stdenv =
raise (Skip_test "io_uring not available in Docker")

open Eio.Std

module Trace = Eio.Private.Trace
Expand All @@ -19,7 +23,7 @@ let read_one_byte ~sw r =
)

let test_poll_add () =
Eio_linux.run @@ fun _stdenv ->
Eio_linux.run ~fallback:skip (fun _stdenv ->
Switch.run @@ fun sw ->
let r, w = Eio_unix.pipe sw in
let thread = read_one_byte ~sw r in
Expand All @@ -32,10 +36,10 @@ let test_poll_add () =
assert (sent = 1);
let result = Promise.await_exn thread in
Alcotest.(check string) "Received data" "!" result

)
let test_poll_add_busy () =
Eio_linux.run ~queue_depth:2 @@ fun _stdenv ->
Switch.run @@ fun sw ->
Eio_linux.run ~queue_depth:2 ~fallback:skip (fun _stdenv ->
Switch.run @@ fun sw ->
let r, w = Eio_unix.pipe sw in
let a = read_one_byte ~sw r in
let b = read_one_byte ~sw r in
Expand All @@ -50,7 +54,7 @@ let test_poll_add_busy () =
Alcotest.(check string) "Received data" "!" a;
let b = Promise.await_exn b in
Alcotest.(check string) "Received data" "!" b

)
(* Write a string to a pipe and read it out again. *)
let test_copy () =
Eio_linux.run ~queue_depth:3 @@ fun _stdenv ->
Expand Down Expand Up @@ -259,4 +263,4 @@ let () =
test_case "signal_race" `Quick test_signal_race;
test_case "alloc-fixed-or-wait" `Quick test_alloc_fixed_or_wait;
];
]
]

0 comments on commit 0f65d34

Please sign in to comment.