node/test/cctest
Tobias Nießen 3492320fdd
test: check that sysconf returns a positive value
Static analysis insists that sysconf(_SC_PAGE_SIZE) might return a
negative integer (even though it never will). This was supposed to be
handled by the existing check EXPECT_GE(page, static_cast<int>(N)).
I assume that static analysis does not consider this sufficient because
static_cast<int>(N) could be negative or zero if N exceeds INT_MAX (even
though it never will).

To resolve this (theoretical) problem, explicitly check that the return
value is positive and then cast it to a size_t.

PR-URL: https://github.com/nodejs/node/pull/44666
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2022-09-25 10:30:37 +00:00
..
node_test_fixture.cc tools,test: fix V8 initialization order 2022-04-12 22:10:37 +02:00
node_test_fixture.h tools,test: fix V8 initialization order 2022-04-12 22:10:37 +02:00
test_aliased_buffer.cc
test_base64.cc
test_base_object_ptr.cc
test_crypto_clienthello.cc test: check that sysconf returns a positive value 2022-09-25 10:30:37 +00:00
test_environment.cc src: expose environment RequestInterrupt api 2022-09-01 17:01:00 +08:00
test_inspector_socket_server.cc test: fix coverity warning in test 2022-07-12 15:50:56 -04:00
test_inspector_socket.cc src: fix IPv4 non routable validation 2022-09-23 12:32:45 -03:00
test_js_native_api_v8.cc test: fix typo in test_js_native_api_v8 2022-01-19 01:01:05 +01:00
test_json_utils.cc src: fix json utils escapes for U+000B 2022-06-14 11:56:00 +08:00
test_linked_binding.cc src: fix multiple AddLinkedBinding() calls 2021-06-14 13:30:50 +02:00
test_node_api.cc node-api: cctest on v8impl::Reference 2021-07-05 13:55:51 +08:00
test_node_crypto.cc
test_node_postmortem_metadata.cc test: fix DebugSymbolsTest.ReqWrapList on PPC64LE 2022-09-06 10:06:42 +02:00
test_per_process.cc src: disambiguate terms used to refer to builtins and addons 2022-08-09 01:36:49 +08:00
test_platform.cc
test_report.cc report: expose report public native apis 2022-08-24 17:02:26 +00:00
test_sockaddr.cc
test_traced_value.cc
test_url.cc
test_util.cc