Skip to content

Commit 5637e21

Browse files
committed
Add Skipping feature
1 parent 121fa05 commit 5637e21

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

lib_eio_linux/tests/test.ml

+13-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ let skip _stdenv =
44

55
open Eio.Std
66

7+
let skip_io_uring msg =
8+
Eio.traceln "Skipping test: %s" msg;
9+
Alcotest.skip ()
10+
11+
let handle_fallback = function
12+
| `Msg msg ->
13+
Eio.traceln "Fallback triggered with message: %s" msg;
14+
skip_io_uring msg
15+
16+
717
module Trace = Eio.Private.Trace
818

919
let () =
@@ -23,7 +33,7 @@ let read_one_byte ~sw r =
2333
)
2434

2535
let test_poll_add () =
26-
Eio_linux.run ~fallback:skip (fun _stdenv ->
36+
Eio_linux.run @@ fun _stdenv ->
2737
Switch.run @@ fun sw ->
2838
let r, w = Eio_unix.pipe sw in
2939
let thread = read_one_byte ~sw r in
@@ -38,8 +48,8 @@ let test_poll_add () =
3848
Alcotest.(check string) "Received data" "!" result
3949
)
4050
let test_poll_add_busy () =
41-
Eio_linux.run ~queue_depth:2 ~fallback:skip (fun _stdenv ->
42-
Switch.run @@ fun sw ->
51+
Eio_linux.run ~queue_depth:2 @@ fun _stdenv ->
52+
Switch.run @@ fun sw ->
4353
let r, w = Eio_unix.pipe sw in
4454
let a = read_one_byte ~sw r in
4555
let b = read_one_byte ~sw r in

0 commit comments

Comments
 (0)