Commit Graph

23 Commits (8975748527a82d2dcfd6168ada30359f39de91ba)

Author SHA1 Message Date
Michaël Zasso 05cb16dc1a
test: simplify ASan build checks
Always use `process.config.variables.asan`.
This removes the need for a special ASAN env var.

PR-URL: https://github.com/nodejs/node/pull/52430
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
2024-04-11 07:29:27 +00:00
Rich Trott 5d559f4a74 test: enable no-empty ESLint rule
PR-URL: https://github.com/nodejs/node/pull/41831
Refs: https://eslint.org/docs/rules/no-empty
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-05 12:58:32 +00:00
Rich Trott 213ae4f4c6 test: skip test-vm-memleak in ASAN
ASAN increases memory usage, which in turn messes up the memory leak
test. Skip the test on ASAN.

PR-URL: https://github.com/nodejs/node/pull/34289
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-04-10 15:17:51 -07:00
Rich Trott a0492ba391
test: fix test-vm-memleak for high baseline platforms
test-vm-memleak always fails on AIX in CI because the test checks that
total memory consumption is less than 64 Mb, but AIX uses over 100 Mb
just as a baseline. So instead, let's compare the memory consumption to
the baseline and make sure it is within 32 Mb.

PR-URL: https://github.com/nodejs/node/pull/38062
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ash Cripps <acripps@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-04-06 09:23:31 -07:00
Rich Trott 4f387c25cb test: fix flaky test-vm-memleak
Force garbage collection so that the memory leak is more easily
differentiated from ordinary not-garbage-collected memory.

Refs: https://github.com/nodejs/node/pull/34289

PR-URL: https://github.com/nodejs/node/pull/38054
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-04-04 22:01:26 -07:00
Rich Trott 13ac5fbc57 test: improve assertion message for test-vm-memleak
The test is unreliable in CI. It might be helpful to get an exact read
of `rss` so this adds that to the assertion message.

PR-URL: https://github.com/nodejs/node/pull/37034
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-01-25 11:25:47 -08:00
Pooja D P 2ceb44120b
test: use faster variant for rss in test-vm-memleak.js
PR-URL: https://github.com/nodejs/node/pull/36769
Refs: https://github.com/nodejs/node/pull/34291
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-11 11:35:12 -08:00
Rich Trott a8db32a504 test: simplify test-vm-memleak
PR-URL: https://github.com/nodejs/node/pull/34881
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2020-08-25 06:54:24 -07:00
Rich Trott 2d2a812645 test: remove unneeded flag check in test-vm-memleak
The `common` module checks that necessary flags are being used, so a
check in the test itself is no longer necessary.

PR-URL: https://github.com/nodejs/node/pull/34528
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-07-30 12:54:07 -07:00
cjihrig a74b4a062f
test: remove unused catch bindings
PR-URL: https://github.com/nodejs/node/pull/24079
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-11-06 10:59:18 -05:00
sreepurnajasti e08cf1d230
test: improve to use template string
PR-URL: https://github.com/nodejs/node/pull/18097
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-01-17 08:50:02 +08:00
Vse Mozhet Byt 4f87522244 doc, lib, test: do not re-require needlessly
PR-URL: https://github.com/nodejs/node/pull/14244
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
2017-07-21 20:40:52 +03:00
James M Snell 98e54b0bd4 meta: restore original copyright header
A prior io.js era commit inappropriately removed the
original copyright statements from the source. This
restores those in any files still remaining from that
edit.

Ref: https://github.com/nodejs/TSC/issues/174
Ref: https://github.com/nodejs/node/pull/10599
PR-URL: https://github.com/nodejs/node/pull/10155

Note: This PR was required, reviewed-by and approved
by the Node.js Foundation Legal Committee and the TSC.
There is no `Approved-By:` meta data.
2017-03-10 11:23:48 -08:00
Gibson Fahnestock 7a0e462f9f test: use eslint to fix var->const/let
Manually fix issues that eslint --fix couldn't do automatically.

PR-URL: https://github.com/nodejs/node/pull/10685
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2017-01-11 11:43:52 +00:00
cjihrig ff1efa6087 test: use const for all require() calls
PR-URL: https://github.com/nodejs/node/pull/10550
Reviewed-By: Rich Trott <rtrott@gmail.com>
2017-01-02 18:28:18 -05:00
Rich Trott 082cc8d6d8 test: remove unnecessary assignments
common.js needs to be loaded in all tests so that there is checking
for variable leaks and possibly other things. However, it does not
need to be assigned to a variable if nothing in common.js is referred
to elsewhere in the test.

PR-URL: https://github.com/nodejs/node/pull/4408
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-12-26 18:00:02 -08:00
Roman Reiss f29762f4dd test: enable linting for tests
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.

test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.

PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-05-19 21:21:27 +02:00
isaacs 3e1b1dd4a9 Remove excessive copyright/license boilerplate
The copyright and license notice is already in the LICENSE file.  There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
2015-01-12 15:30:28 -08:00
Ben Noordhuis 7e648da834 test: fix bad assumption in pummel/test-vm-memleak
pummel/test-vm-memleak is an old test that assumes the fairly
aggressive heuristics that were common with the old collector.

The current garbage collector has a more laissez-faire attitude.
Put an upper limit on the size of the old space and update the
test's expectations.

PR-URL: https://github.com/iojs/io.js/pull/280
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-01-10 23:45:49 +01:00
Fedor Indutny 59a075e108 contextify: fix ContextifyContext leak
Apparently, context->Global() won't be destroyed if the context itself
isn't marked as weak and independent.

Also, the weakness flag should be cleared once the weak callback is
executed, otherwise we'll get crashes in Debug builds.

fix #6115 and #6201
2013-09-15 00:56:11 +04:00
Colton Baker 87286cc737 Fixed a lot of jslint errors.
Fixes #1831
2011-10-05 18:51:06 -07:00
Ryan Dahl 55048cdf79 Update copyright headers 2011-03-14 17:37:05 -07:00
Ryan Dahl 1f50d711b2 Fix memleak in vm.runInNewContext
Closes GH-704.
2011-02-24 15:46:55 -08:00