From 40771c9103ee1176e96502d3451d4fa95086ab19 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 11 Dec 2023 22:02:32 +0100 Subject: [PATCH] Disable flaky test on Cygwin (#202) Unclear why sending a SIGQUIT signal sometimes works and sometimes doesn't but it's probably some kind of race condition in Cygwin's emulation layer. Fixes: https://github.com/quickjs-ng/quickjs/issues/184 --- tests/test_std.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_std.js b/tests/test_std.js index 41babd4..1b2378c 100644 --- a/tests/test_std.js +++ b/tests/test_std.js @@ -2,6 +2,7 @@ import * as std from "std"; import * as os from "os"; const isWin = os.platform === 'win32'; +const isCygwin = os.platform === 'cygwin'; function assert(actual, expected, message) { if (arguments.length == 1) @@ -246,7 +247,11 @@ function test_os_exec() os.kill(pid, os.SIGTERM); [ret, status] = os.waitpid(pid, 0); assert(ret, pid); - assert(status & 0x7f, os.SIGTERM); + // Flaky on cygwin for unclear reasons, see + // https://github.com/quickjs-ng/quickjs/issues/184 + if (!isCygwin) { + assert(status & 0x7f, os.SIGTERM); + } } function test_timer()