Rich Trott
03dbef2ac2
test: minimal repl eval option test
...
Fixes: https://github.com/nodejs/node/issues/3544
PR-URL: https://github.com/nodejs/node/pull/5192
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
179b811312
tools: add recommended linting rules
...
This change adds ESLint rules that meet two criteria:
* recommended by ESLint
* require no code changes
These rules are:
* `no-func-assign`: Disallow overwriting a function that was written
as a function declaration.
* `no-negated-in-lhs`: Disallow negated left operand of `in` operator.
It prevents `if(!a in b)` when `if(!(a in b))` is intended.
* `no-obj-calls`: Disallow global object function calls. It prevents
errors like `JSON()` and `Math()`.
to exercise the code in tests or whatever, it can sneak in.
* `use-isnan`: Prevents errors like `if (foo == NaN)`
* `no-octal`: Disallows confusing constructs like `var num = 071;`
* `no-delete-var`: Delete works on properties, not variables. Disallows
`delete foo`.
PR-URL: https://github.com/nodejs/node/pull/5188
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2016-03-02 14:01:11 -08:00
Michael Dawson
e24f49a6d9
test: disable fs watch tests for AIX
...
fs watch currently needs special configuration on AIX and we
want to improve under https://github.com/nodejs/node/issues/5085 .
Tests are disabled so CI can be green and we can spot other
regressions until this work is complete.
test-async-wrap-check-providers does not aim to test fs watch
but part of the test uses it so that part has been skipped for
AIX
PR-URL: https://github.com/nodejs/node/pull/5187
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-03-02 14:01:11 -08:00
Noah Rose
ec4d6b942f
doc: clarify exceptions during uncaughtException
...
PR-URL: https://github.com/nodejs/node/pull/5180
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Santiago Gimeno
972c06389c
test: fix child-process-fork-regr-gh-2847 again
...
Windows is still sometimes failing with ECONNRESET. Bring back the
handling of this error as was initially introduced in PR #4442 .
PR-URL: https://github.com/nodejs/node/pull/5179
Reviewed-By: Rich Trott <rtrott@gmail.com >
Fixes: https://github.com/nodejs/node/issues/3635
2016-03-02 14:01:11 -08:00
Mikeal Rogers
c4d1e3de2b
doc: update DCO to v1.1
...
PR-URL: https://github.com/nodejs/node/pull/5170
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
8b99e2d97f
test: fix flaky test-http-regr-gh-2928
...
Fix flaky test-http-regr-gh-2928 that has been failing on Raspberry Pi
devices in CI.
Fixes: https://github.com/nodejs/node/issues/4830
PR-URL: https://github.com/nodejs/node/pull/5154
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rod Vagg <r@va.gg >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-03-02 14:01:11 -08:00
Rich Trott
19517c16c8
tools: remove excessive comments from .eslintrc
...
The comments make the config hard to scan. They do not provide any
information that isn't in the documentation links referred to in
comments (that are not being removed here).
Additionally, all rule config sections are alphabetically ordered for
easier scanning etc.
PR-URL: https://github.com/nodejs/node/pull/5151
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Shigeki Ohtsu
ed6d47b944
test: enable to work pkcs12 test in FIPS mode
...
The pfx file created by pkcs12 command of openssl causes an error in
FIPS mode because its certificate is encrypted with RC2 by default.
Adding `-descert` option resolves the error.
Fix: https://github.com/nodejs/node/pull/5144
Fix: https://github.com/nodejs/node/pull/5109
PR-URL: https://github.com/nodejs/node/pull/5150
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
731767cfb2
test: remove unneeded common.indirectInstanceOf()
...
PR-URL: https://github.com/nodejs/node/pull/5149
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-03-02 14:01:11 -08:00
Fedor Indutny
0383d661b6
test: disable gh-5100 test when in FIPS mode
...
This is a follow-up fix for half-broken test in 23196fe , and an attempt
to recover some dignity after breaking CI.
PR-URL: https://github.com/nodejs/node/pull/5144
Reviewed-By: Rich Trott <rtrott@gmail.com >
2016-03-02 14:01:11 -08:00
Jackson Tian
fc50bbfa1a
tools: enable no-proto rule for linter
...
Enable `no-proto` in `.eslintrc`.
Use `Object.setPrototypeOf()` and `Object.getPrototypeOf()`
instead of.
PR-URL: https://github.com/nodejs/node/pull/5140
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
8727d7ac66
tools: disallow mixed spaces and tabs for indents
...
Enable eslint rule disallowing mixing tabs and spaces for indentation.
Modify the one file that had been mixing tabs and spaces.
PR-URL: https://github.com/nodejs/node/pull/5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Rich Trott
89bea6afea
tools: alphabetize eslint stylistic issues section
...
Rearrange the style rules in .eslintrc to be in alphabetical order.
This has two benefits:
It means the rules appear in the same order as they do in the ESLint
documentation, easing cross-referencing.
It also means that it is much easier to determine with visual inspection
if a rule is set or not.
https://github.com/nodejs/node/pull/5135
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Rich Trott
e3aa9b65bf
test: fix flaky test-dgram-pingpong
...
There is no guarantee UDP messages will be received. Accommodate the
occasional dropped message.
This is a functionality test, not a performance benchmark. Speed up the
test by not sending 1500 messages across three ports.
Fixes: https://github.com/nodejs/node/issues/4526
PR-URL: https://github.com/nodejs/node/pull/5125
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Santiago Gimeno
c3c9dbee75
test: fix child-process-fork-regr-gh-2847
...
The test would sometimes time out on some platforms. Take the initial
version of the test and instead of sending 100 handles, just send 2.
It still fails when run with the code before the change was introduced
and passes afterwards.
Remove test from parallel.status.
PR-URL: https://github.com/nodejs/node/pull/5121
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Fixes: https://github.com/nodejs/node/issues/3635
2016-03-02 14:01:11 -08:00
Rich Trott
47269c2625
doc: fix dgram doc indentation
...
PR-URL: https://github.com/nodejs/node/pull/5118
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Rich Trott
8d12e56e42
tools: lint for empty character classes in regex
...
Enable linting rule to forbid empty character classes in regular
expressions. See http://eslint.org/docs/rules/no-empty-character-class
Organize "Possible Error" rules in .eslintrc in alphabetical order to
match eslint documentation.
PR-URL: https://github.com/nodejs/node/pull/5115
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
bfb45270ad
doc: fix typo in dgram doc
...
Remove stray square brackets from dgram documentation.
PR-URL: https://github.com/nodejs/node/pull/5114
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2016-03-02 14:01:11 -08:00
Fedor Indutny
b3050a5c2f
crypto: fix memory leak in LoadPKCS12
...
`sk_X509_pop_free` should be used instead of `sk_X509_free` to free all
items in queue too, not just the queue itself.
PR-URL: https://github.com/nodejs/node/pull/5109
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2016-03-02 14:01:11 -08:00
Fedor Indutny
689e1faaf1
crypto: add pfx certs as CA certs too
...
According to documentation all certificates specified in `pfx` option
should be treated as a CA certificates too. While it doesn't seem to be
logically correct to me, we can't afford to break API stability at this
point.
Fix : #5100
PR-URL: https://github.com/nodejs/node/pull/5109
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2016-03-02 14:01:11 -08:00
Michael Dawson
875a6d02ae
test: don't run test-tick-processor.js on Aix
...
Currently the test-tick-processor functionality in V8
depends on addresses being smaller than a full 64 bits. Aix supports
the full 64 bits and the result is that it does not process the
addresses correctly and runs of out memory.
Disabling until we get a fix upstreamed into V8.
PR-URL: https://github.com/nodejs/node/pull/5093
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
9eac7faa18
test: mark flaky tests on Raspberry Pi
...
A few tests have started failing on Raspberry Pi devices in CI.
https://ci.nodejs.org/job/node-test-binary-arm/943/
PR-URL: https://github.com/nodejs/node/pull/5082
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Ref: https://github.com/nodejs/node/issues/4830
Ref: https://github.com/nodejs/node/issues/3635
Ref: https://github.com/nodejs/node/issues/4526
2016-03-02 14:01:11 -08:00
Jackson Tian
a1e0710cb1
src: clean up usage of __proto__
...
Prefer using Object.setPrototypeOf() instead.
PR-URL: https://github.com/nodejs/node/pull/5069
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Timothy Gu
029b8e809b
doc: fix link in cluster documentation
...
PR-URL: https://github.com/nodejs/node/pull/5068
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
2f7b606065
tools: lint for spacing around unary operators
...
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like:
i ++ // use `i++` instead
typeof(foo) // use `typeof foo` or `typeof (foo)` instead
Ref: https://github.com/nodejs/node/pull/4772#discussion_r51732299
PR-URL: https://github.com/nodejs/node/pull/5063
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
4b09dc5cac
tools: enable no-redeclare rule for linter
...
PR-URL: https://github.com/nodejs/node/pull/5047
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
9cd623fcab
tools: fix redeclared vars in doc/json.js
...
PR-URL: https://github.com/nodejs/node/pull/5047
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Gibson Fahnestock
5590c366c5
deps: backport 8d00c2c from v8 upstream
...
Original commit message:
```
Stop profiler on isolate teardown if still running
If the profiler is started via the API and not stopped, V8 will
intermittently crash during isolate teardown.
The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
if cpu_profiler_ still exists.
https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo
TEST= Run in debug mode, if you start a profile and don't stop it,
this assert should fail:
Fatal error in ../src/profiler/cpu-profiler.cc, line 414
Check failed: !is_profiling_.
Review URL: https://codereview.chromium.org/1526253005
Cr-Commit-Position: refs/heads/master@{#32953}
```
PR-URL: https://github.com/nodejs/node/pull/5024
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Prayag Verma
0217cb5497
doc: fix minor typo in process doc
...
Remove extra `be`
PR-URL: https://github.com/nodejs/node/pull/5018
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Prayag Verma
51f69294cd
doc: fix typo in Readme.md
...
Spelling mistake - `begining` > `beginning`
PR-URL: https://github.com/nodejs/node/pull/5017
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Brian White
c985acb692
test: fix inconsistent styling in test-url
...
PR-URL: https://github.com/nodejs/node/pull/5014
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Alexander Makarenko
bd7d9e0828
doc: minor improvement in OS docs
...
Add links to `process.arch` and `process.platform`.
PR-URL: https://github.com/nodejs/node/pull/5006
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-03-02 14:01:11 -08:00
Alexander Makarenko
f2b930d0a4
doc: improve styling consistency in VM docs
...
Improve functions styling. Connect sections with links.
PR-URL: https://github.com/nodejs/node/pull/5005
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Alexander Makarenko
368afcb8cb
doc: minor improvement to HTTPS doc
...
Add link to Buffer page.
PR-URL: https://github.com/nodejs/node/pull/5002
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Chris Dickinson <chris@neversaw.us >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
bdcafd0aa2
test: fix redeclared vars in sequential tests
...
PR-URL: https://github.com/nodejs/node/pull/4999
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
888be773c6
test: pummel test fixes
...
This fixes some variable redeclarations in pummel tests and, in the
process, gets `test-stream-pipe-multi.js` to run again. It had been
failing to run.
PR-URL: https://github.com/nodejs/node/pull/4998
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
6a0fad210c
test: fix redeclared vars in test-vm-*
...
PR-URL: https://github.com/nodejs/node/pull/4997
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
5545dafdc3
test: fix redeclared vars in test-url
...
PR-URL: https://github.com/nodejs/node/pull/4993
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
42346c13e1
dgram: scope redeclared variables
...
A few variables in `lib/dgram.js` are redeclared with `var` in a scope
where they have already been declared. These instances can be scoped
more narrowly with `const`, so that's what this change does.
PR-URL: https://github.com/nodejs/node/pull/4940
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
a0f72bdc9e
test: fix redeclared test-util-* vars
...
PR-URL: https://github.com/nodejs/node/pull/4994
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
3733c032fc
test: fix variable redeclarations
...
I'm a fan of small changesets, but even I'm getting a little annoyed at
me for opening all these PRs weeding out variable redeclarations. So I'm
bundling a bunch of small changes here.
PR-URL: https://github.com/nodejs/node/pull/4992
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
6c2d902c3d
test: fix redeclared test-path vars
...
PR-URL: https://github.com/nodejs/node/pull/4991
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
54a40142cd
test: fix var redeclarations in test-os
...
PR-URL: https://github.com/nodejs/node/pull/4990
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
52335f0100
test: fix test-net-* variable redeclarations
...
PR-URL: https://github.com/nodejs/node/pull/4989
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
a0f3ccf8f9
test: fix redeclared test-intl var
...
PR-URL: https://github.com/nodejs/node/pull/4988
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
ecce231c58
test: fix redeclared test-http-* vars
...
PR-URL: https://github.com/nodejs/node/pull/4987
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
befe3108f8
test: fix redeclared test-event-emitter-* vars
...
PR-URL: https://github.com/nodejs/node/pull/4985
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Rich Trott
11828c7dfa
test: remove redeclared var in test-domain
...
PR-URL: https://github.com/nodejs/node/pull/4984
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-02 14:01:11 -08:00
Fedor Indutny
51941a1aa5
https: evict cached sessions on error
...
Instead of using the same session over and over, evict it when the
socket emits error. This could be used as a mitigation of #3692 , until
OpenSSL fix will be merged/released.
See: https://github.com/nodejs/node/issues/3692
PR-URL: https://github.com/nodejs/node/pull/4982
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2016-03-02 14:01:11 -08:00