Skip to content

Commit 0f65d34

Browse files
committed
skipping test
1 parent f8c9441 commit 0f65d34

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lib_eio_linux/tests/test.ml

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
exception Skip_test of string
2+
let skip _stdenv =
3+
raise (Skip_test "io_uring not available in Docker")
4+
15
open Eio.Std
26

37
module Trace = Eio.Private.Trace
@@ -19,7 +23,7 @@ let read_one_byte ~sw r =
1923
)
2024

2125
let test_poll_add () =
22-
Eio_linux.run @@ fun _stdenv ->
26+
Eio_linux.run ~fallback:skip (fun _stdenv ->
2327
Switch.run @@ fun sw ->
2428
let r, w = Eio_unix.pipe sw in
2529
let thread = read_one_byte ~sw r in
@@ -32,10 +36,10 @@ let test_poll_add () =
3236
assert (sent = 1);
3337
let result = Promise.await_exn thread in
3438
Alcotest.(check string) "Received data" "!" result
35-
39+
)
3640
let test_poll_add_busy () =
37-
Eio_linux.run ~queue_depth:2 @@ fun _stdenv ->
38-
Switch.run @@ fun sw ->
41+
Eio_linux.run ~queue_depth:2 ~fallback:skip (fun _stdenv ->
42+
Switch.run @@ fun sw ->
3943
let r, w = Eio_unix.pipe sw in
4044
let a = read_one_byte ~sw r in
4145
let b = read_one_byte ~sw r in
@@ -50,7 +54,7 @@ let test_poll_add_busy () =
5054
Alcotest.(check string) "Received data" "!" a;
5155
let b = Promise.await_exn b in
5256
Alcotest.(check string) "Received data" "!" b
53-
57+
)
5458
(* Write a string to a pipe and read it out again. *)
5559
let test_copy () =
5660
Eio_linux.run ~queue_depth:3 @@ fun _stdenv ->
@@ -259,4 +263,4 @@ let () =
259263
test_case "signal_race" `Quick test_signal_race;
260264
test_case "alloc-fixed-or-wait" `Quick test_alloc_fixed_or_wait;
261265
];
262-
]
266+
]

0 commit comments

Comments
 (0)