node/test/node-api
Daniel Bevenius 1fc4d43a32 src: skip test_fatal/test_threads for Debug builds
Currently test/node-api/test_fatal/test_threads.js fails for a Debug
build with the following error:
 1: 0x101e3f8 node::DumpBacktrace(_IO_FILE*) [/node/out/Debug/node]
 2: 0x11c31ed  [/node/out/Debug/node]
 3: 0x11c320d  [/node/out/Debug/node]
 4: 0x2ba4448 V8_Fatal(char const*, int, char const*, ...) [/node/out/Debug/node]
 5: 0x2ba4473  [/node/out/Debug/node]
 6: 0x139e049 v8::internal::Isolate::Current() [/node/out/Debug/node]
 7: 0x11025ee node::OnFatalError(char const*, char const*) [/node/out/Debug/node]
 8: 0x1102564 node::FatalError(char const*, char const*) [/node/out/Debug/node]
 9: 0x10add1d napi_open_callback_scope [/node/out/Debug/node]
10: 0x7f05664211dc  [/node/test/node-api/test_fatal/build/Debug/test_fatal.node]
11: 0x7f056608e4e2  [/usr/lib64/libpthread.so.0]
12: 0x7f0565fbd6c3 clone [/usr/lib64/libc.so.6]

node:assert:412
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert.ok(p.status === 134 || p.signal === 'SIGABRT')

    at Object.<anonymous> (/node/test/node-api/test_fatal/test_threads.js:21:8)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '=='
}

This is caused by a call to Isolate::GetCurrent() when the calling
thread has not initialized V8. We are working suggestion to add a method
to V8 which allows a check/get without any checks but in the mean time
this change should allow debug builds to pass the test suit.

PR-URL: https://github.com/nodejs/node/pull/38805
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2910630
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-06-08 07:57:01 +02:00
..
1_hello_world test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_async test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
test_async_cleanup_hook node-api: define version 8 2021-03-10 16:31:16 -05:00
test_async_context test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_buffer test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_callback_scope test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_cleanup_hook
test_env_teardown_gc node-api: stop ref gc during environment teardown 2021-03-18 20:40:59 -07:00
test_exception test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_fatal src: skip test_fatal/test_threads for Debug builds 2021-06-08 07:57:01 +02:00
test_fatal_exception test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_general node-api: allow retrieval of add-on file name 2021-02-09 23:34:30 -08:00
test_instance_data test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_make_callback test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_make_callback_recurse test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_null_init
test_policy test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
test_threadsafe_function node-api: faster threadsafe_function 2021-05-04 18:39:28 -07:00
test_uv_loop test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_worker_buffer_callback test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_worker_terminate test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_worker_terminate_finalization test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
.gitignore
node-api.status
testcfg.py