Skip to content

Commit 40a1fb2

Browse files
committed
Haiku
Rationale : POSIX is clear that signal ordering is not guaranteed. On Haiku, SIGKILL is sent at higher priority than SIGUSR1 so it is signaled before. Here the goal is just to test the masking, so i change for SIGUSR2 at same level. Though i am aware there should be a cleaner way to test signal masking, this change gets the signals to be delivered in same order. This solved the FAILED test on Haiku. Signed-off-by: Sylvain78 <[email protected]>
1 parent 784f53c commit 40a1fb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/tests.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ let%test_unit "sigprocmask" =
165165
let prog = Program_lookup.find_prog "sleep" in
166166
let pid = Spawn.spawn ?sigprocmask ~prog ~argv:[ "sleep"; "60" ] () in
167167
Unix.kill pid Sys.sigusr1;
168-
Unix.kill pid Sys.sigkill;
168+
Unix.kill pid Sys.sigusr2;
169169
match Unix.waitpid [] pid with
170170
| _, WSIGNALED signal -> assert (signal = expected_signal)
171171
| _ -> failwith "unexpected"
172172
in
173173
run Sys.sigusr1;
174-
run ~sigprocmask:(SIG_BLOCK, [ Sys.sigusr1 ]) Sys.sigkill)
174+
run ~sigprocmask:(SIG_BLOCK, [ Sys.sigusr1 ]) Sys.sigusr2)
175175
;;
176176

177177
(* This should be at the end to clean up the test environment *)

0 commit comments

Comments
 (0)