From 5aa511e26cdb8cad0d07eab7f9c7eeabb24c955d Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 7 May 2020 09:00:26 +0200 Subject: [PATCH] test: skip test_threadsafe_function for debug build This comit suggests skipping this test when the build type is Debug. The reason for this is that it currently aborts with the following message: 1: 0xe5ba88 node::DumpBacktrace(_IO_FILE*) [out/Debug/node] 2: 0xfc4e2d [out/Debug/node] 3: 0xfc4e4d [out/Debug/node] 4: 0x288c9e8 V8_Fatal(char const*, int, char const*, ...) [out/Debug/node] 5: 0x288ca13 [out/Debug/node] 6: 0x115ef49 v8::internal::Isolate::Current() [out/Debug/node] 7: 0xec6e1c [out/Debug/node] 8: 0xec9c26 napi_call_threadsafe_function [out/Debug/node] 9: 0x7f3a39de3474 [test/node-api/test_threadsafe_function/build/Debug/binding.node] 10: 0x7f3a39a5a4e2 [/lib64/libpthread.so.0] 11: 0x7f3a399896d3 clone [/lib64/libc.so.6] Illegal instruction (core dumped) This is generated from ThreadSafeFunction::Push and the call to v8::Isolate::GetCurrent() which has a debug mode check (DCHECK) which is causing this to abort if the current thread's Isolate is a null. As far as I know there is nothing like v8::internal::Isolate::TryGetCurrent() exposed with could be used which is the reason for suggesting this test just be skipped. --- test/node-api/test_threadsafe_function/test.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/node-api/test_threadsafe_function/test.js b/test/node-api/test_threadsafe_function/test.js index f5afe225f07624..f3b5700f5a6078 100644 --- a/test/node-api/test_threadsafe_function/test.js +++ b/test/node-api/test_threadsafe_function/test.js @@ -1,6 +1,9 @@ 'use strict'; const common = require('../../common'); +if (process.config.variables.is_debug) { + common.skip('v8::Isolate::GetCurrent() will abort in debug mode'); +} const assert = require('assert'); const binding = require(`./build/${common.buildType}/binding`); const { fork } = require('child_process');