Rich Trott
5d2b846d11
test: assert tmp and fixture dirs different
...
PR-URL: https://github.com/nodejs/io.js/pull/2015
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-22 12:00:05 -07:00
Michaël Zasso
a4f4909f3d
module: fix stat with long paths on Windows
...
PR-URL: https://github.com/nodejs/io.js/pull/2013
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-22 22:03:31 +10:00
Rich Trott
b0990ef45d
test: confirm symlink
...
PR-URL: https://github.com/nodejs/io.js/pull/2014
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-20 15:18:39 -07:00
Rich Trott
3ba4f71fc4
test: check result as early as possible
...
PR-URL: https://github.com/nodejs/io.js/pull/2007
Reviewed-By: Rod Vagg <rod@vagg.org >
2015-06-19 22:34:54 -07:00
James Hartig
061342a500
net: Defer reading until listeners could be added
...
Defer reading until user-land has a chance to add listeners. This
allows the TLS wrapper to listen for _tlsError and trigger a
clientError event if the socket already has data that could trigger.
Fixes: https://github.com/nodejs/io.js/issues/1114
PR-URL: https://github.com/nodejs/io.js/pull/1496
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com >
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
2015-06-17 14:49:02 -07:00
Rich Trott
0abcf44d6b
test: add Buffer slice UTF-8 test
...
PR-URL: https://github.com/nodejs/io.js/pull/1989
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-17 13:02:56 -06:00
Rich Trott
88c1831ff4
test: tmpdir creation failures should fail tests
...
tmpdir creation only happens for tests that need it. So failure to
refresh the temporary directory should result in a failed test.
PR-URL: https://github.com/nodejs/io.js/pull/1976
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-06-16 17:19:19 -07:00
Brendan Ashworth
d5637e67c9
buffer: fix cyclic dependency with util
...
PR-URL: https://github.com/nodejs/io.js/pull/1988
Fixes: https://github.com/nodejs/io.js/issues/1987
Reviewed-By: Roman Reiss <me@silverwind.io >
2015-06-16 16:07:18 -07:00
Michaël Zasso
671e64ac73
module: allow long paths for require on Windows
...
https://github.com/nodejs/io.js/pull/1801 introduced internal fs methods
to speed up require. The methods do not call path._makeLong like their
counterpart from the fs module. This brings back the old behaviour.
Fixes: https://github.com/nodejs/io.js/issues/1990
Fixes: https://github.com/nodejs/io.js/issues/1980
Fixes: https://github.com/nodejs/io.js/issues/1849
PR-URL: https://github.com/nodejs/io.js/pull/1991/files
Reviewed-By: Bert Belder <bertbelder@gmail.com >
2015-06-16 13:25:55 -07:00
Santiago Gimeno
52a822d944
test: fix test-cluster-worker-disconnect
...
- Just let the process exit gracefully after the worker is disconnected.
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
PR-URL: https://github.com/nodejs/io.js/pull/1919
Fixes: https://github.com/nodejs/io.js/issues/1757
2015-06-16 12:34:23 -07:00
Shigeki Ohtsu
3beb880716
crypto: add cert check to CNNIC Whitelist
...
When client connect to the server with certification issued by either
CNNIC Root CA or CNNIC EV Root CA, check hash of server
certification in the list of CNNICHashWhitelist.inc. If it's not,
CERT_REVOKED error returns.
See for details in
https://blog.mozilla.org/security/2015/04/02/distrusting-new-cnnic-certificates/
PR-URL: https://github.com/nodejs/io.js/pull/1895
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-16 23:26:29 +09:00
Michaël Zasso
3806d875d3
zlib: prevent uncaught exception in zlibBuffer
...
If the accumulation of data for the final Buffer is greater than
kMaxLength it will throw an un-catchable RangeError. Instead now pass
the generated error to the callback.
PR-URL: https://github.com/nodejs/io.js/pull/1811
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-15 15:43:08 -06:00
Roman Reiss
fb8811d95e
lib,test: fix whitespace issues
...
PR-URL: https://github.com/nodejs/io.js/pull/1971
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-15 16:37:37 +02:00
Rich Trott
7c79490bfb
test: only refresh tmpDir for tests that need it
...
Expose `common.refreshTmpDir()` and only call it
for tests that use common.tmpDir or common.PIPE.
A positive side effect is the removal of a code
smell where child processes were detected by the
presence of `.send()`. Now each process can decide
for itself if it needs to refresh tmpDir.
PR-URL: https://github.com/nodejs/io.js/pull/1954
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
2015-06-13 22:27:17 -07:00
Rich Trott
88d7904c0b
test: remove test repetition
...
Remove loops executing the same tests multiple times.
PR-URL: https://github.com/nodejs/io.js/pull/1874
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-13 18:32:28 -07:00
Rich Trott
8ea6844d26
test: add test for failed save in REPL
...
PR-URL: https://github.com/nodejs/io.js/pull/1818
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com >
2015-06-12 19:16:16 -07:00
Jeremiah Senkpiel
d9e250295b
Revert "readline: allow tabs in input"
...
This reverts commit 4b3d493c4b .
PR-URL: https://github.com/nodejs/io.js/pull/1961
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com >
2015-06-12 15:33:11 -07:00
Vladimir Kurchatkin
a251657058
node: mark promises as handled as soon as possible
...
Fixes: https://github.com/nodejs/io.js/issues/1912
PR-URL: https://github.com/nodejs/io.js/pull/1952
Reviewed-By: Domenic Denicola <d@domenic.me >
Reviewed-By: Petka Antonov <petka_antonov@hotmail.com >
2015-06-13 00:24:24 +03:00
Sam Roberts
03ce84dfa1
test: fix cluster-worker-wait-server-close races
...
Wait for data to arrive from worker before doing a disconnect. Without
this, whether the disconnect arrives at the worker before the master
accepts and forwards the connection descriptor to the worker is a race.
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
Reviewed-By: Rod Vagg <rod@vagg.org >
PR-URL: https://github.com/nodejs/io.js/pull/1953
Fixes: https://github.com/nodejs/io.js/issues/1933
Fixes: https://github.com/nodejs/io.js/pull/1400
2015-06-12 12:56:40 -07:00
Rich Trott
a6b8ee19b8
test: create temp dir in common.js
...
Move creation of temporary directories for tests
out of the Python harness and into common.js. This
allows all tests to be run reliably outside of the
Python wrapper.
PR-URL: https://github.com/nodejs/io.js/pull/1877
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-06-12 10:27:29 +10:00
Roman Reiss
6e4d30286d
tools: enable/add additional eslint rules
...
Enables the following rules:
- no-undef: Valuable rule to error on usage of undefined variables
- require-buffer: Custom rule that forbids usage of the global Buffer
inside lib/ because of REPL issues.
PR-URL: https://github.com/nodejs/io.js/pull/1794
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-11 20:27:35 +02:00
Roman Reiss
ff8202c6f4
test: fix undeclared variable access
...
Fixes all cases of undeclared variable access as uncovered by the
no-undef rule of eslint.
PR-URL: https://github.com/nodejs/io.js/pull/1794
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-11 20:22:51 +02:00
Oleg Elifantiev
9c0a1b8cfc
cluster: wait on servers closing before disconnect
...
Before this, cluster behaves not the way it is documented. When
disconnect is triggered, worker must wait for every server is closed
before doing disconnect actually.
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
PR-URL: https://github.com/nodejs/io.js/pull/1400
Fixes: https://github.com/nodejs/io.js/issues/1305
2015-06-09 10:41:38 -07:00
Rich Trott
d9ddd7d345
test: remove TODO comment
...
The comment suggests adding randomness to the test suite.
PR-URL: https://github.com/nodejs/io.js/pull/1820
Reviewed-By: Johan Bergström <bugs@bergstroem.nu >
2015-06-08 20:19:32 -07:00
Brian White
38d1afc24d
crypto: add getCurves() to get supported ECs
...
PR-URL: https://github.com/nodejs/io.js/pull/1914
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-08 12:35:41 -04:00
Rich Trott
4b3d493c4b
readline: allow tabs in input
...
If tab completion is not being used, allow user to enter tab
characters.
PR-URL: https://github.com/nodejs/io.js/pull/1761
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
2015-06-06 13:11:19 -07:00
cjihrig
6e78e5feaa
os: add homedir()
...
os.homedir() calls libuv's uv_os_homedir() to retrieve the current
user's home directory.
PR-URL: https://github.com/nodejs/io.js/pull/1791
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Rod Vagg <rod@vagg.org >
2015-06-05 22:58:14 -04:00
Jackson Tian
81029c639a
debugger: improve ESRCH error message
...
When using `iojs debug -p <pid>` with an invalid pid, the debugger
printed an internal error message because it wasn't smart enough
to figure out that the target process didn't exist. Now it is.
PR-URL: https://github.com/nodejs/io.js/pull/1863
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com >
2015-06-05 05:54:19 +02:00
Yosuke Furukawa
353e26e3c7
fs: Add string encoding option for Stream method
...
Add string encoding option for fs.createReadStream and
fs.createWriteStream. and check argument type more strictly
PR-URL: https://github.com/nodejs/io.js/pull/1845
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-06-05 10:30:32 +09:00
Fedor Indutny
75930bb38c
tls: prevent use-after-free
...
* Destroy `SSL*` and friends on a next tick to make sure that we are not
doing it in one of the OpenSSL callbacks
* Add more checks to the C++ methods that might be invoked during
destructor's pending queue cleanup
Fix: https://github.com/joyent/node/issues/8780
Fix: https://github.com/iojs/io.js/issues/1696
PR-URL: https://github.com/nodejs/io.js/pull/1702
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-04 23:38:26 +02:00
Fedor Indutny
5795e835a1
tls: emit errors on close whilst async action
...
When loading session, OCSP response, SNI, always check that the
`self._handle` is present. If it is not - the socket was closed - and we
should emit the error instead of throwing an uncaught exception.
Fix: https://github.com/joyent/node/issues/8780
Fix: https://github.com/iojs/io.js/issues/1696
PR-URL: https://github.com/nodejs/io.js/pull/1702
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-04 23:38:06 +02:00
Rich Trott
6537fd4b55
test: remove TODO
...
It's not clear what additional tests are wanted.
The current malformed URL test seems adequate.
PR-URL: https://github.com/nodejs/io.js/pull/1875
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2015-06-04 11:38:57 +10:00
Santiago Gimeno
a804026c9b
test: fix broken FreeBSD test
...
Fixes net-server-max-connections-close-makes-more-available
Handles connection 'error' event so the test ends.
PR-URL: https://github.com/nodejs/io.js/pull/1881
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
2015-06-03 13:38:03 -07:00
Evan Lucas
43a82f8a71
test: fix test-sync-io-option
...
This test was failing occasionally both locally and on CI. Switched
from using spawn to execFile for a more reliable test.
Fixes: https://github.com/nodejs/io.js/issues/1837
PR-URL: https://github.com/nodejs/io.js/pull/1840
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-03 13:23:25 -05:00
Shigeki Ohtsu
4ed25f664d
test: add -no_rand_screen for tls-server-verify
...
This improves the performance of openssl s_client on Windows and
gains several seconds to finish test-tls-server-verify.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:23 +02:00
Shigeki Ohtsu
4cf323d23d
test: kill child in tls-server-verify for speed up
...
For better performance of the test, the parent kills child processes
so as not to wait them to be ended.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:21 +02:00
João Reis
e6ccdcc1fe
test: improve console output of tls-server-verify
...
When running in parallel, it is not easy to identify what server and
client failed when the test fails. This adds identifiers to all lines
of console output.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:20 +02:00
João Reis
975e5956f0
test: run tls-server-verify servers in parallel
...
Different servers must use different ports. Since we can count only on
common.PORT and common.PORT+1, run only 2 servers in parallel.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:19 +02:00
João Reis
b18604ba2c
test: running tls-server-verify clients in parallel
...
OpenSSL s_client introduces some delay on Windows. With all clients
running sequentially, this delay is big enough to break CI. This fix runs
the clients in parallel (unless the test includes renegotiation),
reducing the total run time.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-03 19:11:17 +02:00
Rod Vagg
f78c722df5
test: remove hardwired references to 'iojs'
...
PR-URL: https://github.com/nodejs/io.js/pull/1882
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Roman Reiss <me@silverwind.io >
2015-06-03 16:53:05 +02:00
Rich Trott
bd99e8de8e
test: more test coverage for maxConnections
...
If the server is not accepting connections because maxConnections
is exceeded, the server should start accepting connections again
when a connection closes.
PR-URL: https://github.com/nodejs/io.js/pull/1855
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
2015-06-02 21:01:21 -07:00
Yosuke Furukawa
8357c5084b
fs: set encoding on fs.createWriteStream
...
Enable encoding option on fs.createWriteStream.
PR-URL: https://github.com/nodejs/io.js/pull/1844
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-06-03 03:01:35 +09:00
Santiago Gimeno
b9267189a5
test: fix test-child-process-stdout-flush-exit
...
Make sure all the stdout data is available before
performing the assertions.
Fixes: https://github.com/nodejs/io.js/issues/944
PR-URL: https://github.com/nodejs/io.js/pull/1868
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-06-02 19:25:22 +02:00
Yosuke Furukawa
d20f018dcf
test: loosen condition to detect infinite loop
...
PR-URL: https://github.com/nodejs/io.js/pull/1857
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-06-03 01:46:23 +09:00
Ben Noordhuis
e0e96acc6f
test: remove smalloc add-on test
...
The smalloc module is about to be deprecated and removed. Remove the
add-on test now so it's not forgotten about in the upcoming purge.
PR-URL: https://github.com/nodejs/io.js/pull/1835
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-06-01 23:17:52 +02:00
Rich Trott
8704c58fc4
test: remove unneeded comment task
...
PR-URL: https://github.com/nodejs/io.js/pull/1858
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-06-01 13:08:53 -07:00
Evan Lucas
5b6f575c1f
Revert "src: add getopt option parser"
...
This reverts commit c0e7bf2d8c .
There are a few edge cases that can cause a crash
and need to be properly handled.
PR-URL: https://github.com/nodejs/io.js/pull/1862
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-01 11:25:32 -05:00
Evan Lucas
c0e7bf2d8c
src: add getopt option parser
...
Options have been moved into the NodeOptions class.
A new global, node_options now exists and is used
to access the options after the command line arguments
have been parsed.
PR-URL: https://github.com/nodejs/io.js/pull/1804
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2015-06-01 08:39:06 -05:00
Rich Trott
8059393934
test: check error type from net.Server.listen()
...
This change eliminates an unnecessary setTimeout() in the test.
PR-URL: https://github.com/nodejs/io.js/pull/1821
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com >
2015-05-30 18:24:36 +02:00
Ali Ijaz Sheikh
5759722cfa
src: fix module search path for preload modules
...
When the preload module is not a abs/relative path, we should use
the standard search mechanism of looking into the node_modules folders
outwards. The current working directory is deemed to be the 'requiring
module', i.e. parent. The search path starts from cwd outwards.
Fixes: https://github.com/nodejs/io.js/issues/1803
PR-URL: https://github.com/nodejs/io.js/pull/1812
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-05-30 10:36:09 -04:00