Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Sync to nodejs/master (2016-05-20) #73

Merged
merged 77 commits into from
May 25, 2016

Conversation

kunalspathak
Copy link
Member

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines

linebreak-style rule of Jslint is disabled. See nodejs/node#6912 for more details.

Affected core subsystem(s)

test, tools

Description of change

Sync to nodejs/master as of (2016-05-20) at 62376d9

Fishrock123 and others added 30 commits May 12, 2016 16:43
The tap skipping output is so prevalent yet obscure in nature that we
ought to move it into it's own function in test/common.js

PR-URL: nodejs/node#6697
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
regress/regress-crbug-514081 allocates a 2G block of memory
and if there  are multiple variants running at the
same time this can lead to crashes, OOM kills or
the OS failing to allocate memory.  This patch
limits us to running a single variant of the test

Fixes: nodejs/node#6340
PR-URL: nodejs/node#6678
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
adds 2 new tests for streams3 cork behavior, cork then uncork and cork then end

PR-URL: nodejs/node#6493

Reviewed-By: James M Snell <jasnell@gmail.com>
test-debugger-repl-term had incorrect expected output and so was
failing. It was likely dependent on previous bugs in the debugger.
The fixture file has been modified so that the output is as expected.

PR-URL: nodejs/node#6682
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
PR-URL: nodejs/node#6684
Ref: nodejs/node#6578
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs/node#6685
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
The line number checks in test-debugger-repl-break-in-module were
checking for line numbers that exceed the total number of lines in the
files that were being inspected. Change the checks to match the actual
files.

PR-URL: nodejs/node#6686
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Using O_SYNC with O_RDONLY is basically a noop.

Closes: nodejs/node#6730
PR-URL: nodejs/node#6732
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Previously, the example was checking for error by strict equality to
null. The error could be undefined though which would fail that check.

PR-URL: nodejs/node#6660
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
I often want to run a test many times to see if a failure
can be recreated and I believe this is a common
use case.  We even have this job in the CI
https://ci.nodejs.org/job/node-stress-single-test/configure
but often you want to run it on a specific machine.

This patch adds the --repeat option so that
you can repeat the selected set of tests a
number of times. Given existing options
in test.py this will allow you to run
one or more tests for the number of
repeats specified. For example:

tools/test.py -j8 --repeat 1000 parallel/test-process-exec-argv

runs the test-process-exec-argv test 1000 times,
running 8 copies in parallel

tools/test.py --repeat 2

would run the entire test suite twice.

PR-URL: nodejs/node#6700
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
`make binary` attempts to auto detect DESTCPU if not set, but was
assuming being on an Intel architecture.

PR-URL: nodejs/node#6310
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: nodejs/node#5958
Fixes: nodejs/node#5954
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Refs: nodejs/node#6508
PR-URL: nodejs/node#6707
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#6688
Ref: nodejs/node#6578
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Add the `--preserve-symlinks` flag. This makes the changes added
in #5950 conditional. By default the old behavior is used. With
the flag set, symlinks are preserved, switching to the new
behavior. This should be considered to be a temporary solution
until we figure out how to solve the symlinked peer dependency
problem in a more general way that does not break everything
else.

Additional test cases are included.

PR-URL: nodejs/node#6537
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Until now, the docs stated that `process.noDeprecation` could be set
at runtime, but before any modules were loaded. That was not true,
because `lib/internal/util.js` was loaded during the process startup
process, so setting the flag at runtime was pointless.

Minimal test case:

    process.noDeprecation = true;
    process.EventEmitter;

This patch moves checking `process.noDeprecation` to the place where
it was actually used.

PR-URL: nodejs/node#6683
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The current makefile runs both `cctest` and `build-addons` in parallel
under the assumption that both rely on `all`. Unfortunately
`build-addons` does not rely on all, and there is an edge case where
by it is possible to call `build-addons` while compilation is still
happening.

This patch takes the simplest route by forcing `build-addons` and
`cctest` to run in sequence like the other test targets. This ensures
that `build-addons` will never be run during compilation.

It would be possible to modify `build-addons` to rely on `all` but it
would be a much more aggressive change to the MAKEFILE for a fairly
minor perf bump, as cctest is so fast.

PR-URL: nodejs/node#6723
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Print test name as (for example) "parallel/test-assert".  Tests that are
scraped from the addons documentation are all named test.js, making it
hard to decipher what test is running when only the filename is printed.

Fixes: nodejs/node#6651
PR-URL: nodejs/node#6653
Reviewed-By: James M Snell <jasnell@gmail.com>
Use `close` event rather than `exit` event to make sure all output has
been received before checking assertions.

PR-URL: nodejs/node#6728
Fixes: nodejs/node#6722
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Replace `assert.equal()` with `assert.strictEqual()` throughout
`addon/make-callback-recurse/test.js`.

PR-URL: nodejs/node#6704
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Replace lightly-used services file parsing in favor of
confirming one of a small number of allowable values in service name
lookup tests.

In nodejs/node-v0.x-archive#8047, it was
decided that this sort of service file parsing was superior to
hardcoding acceptable values, but I'm not convinced:

* No guarantee that the host uses /etc/services before, e.g., nscd.
* Increases complexity of tests without guaranteeing robustness.

I think that simply checking against a small set of expected values
may be a better solution. Ideally, there would also be a unit test that
used a test double for the appropriate `cares` function and confirms
that it is called with the correct parameters, but now we're getting way
ahead of ourselves.

PR-URL: nodejs/node#6709
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
`/bin/sh` does not exist on Android but `/system/bin/sh` does.

PR-URL: nodejs/node#6745
Refs: nodejs/node#6733
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Moved the sidebar to a fixed position and moved the main column to the
page's body, which results in back/forward navigation through hash
links and search highlight working again.

Fixes: nodejs/node#6637
Fixes: nodejs/node#6751
Based on: nodejs/node#5716
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Update the error stack printed in the default callback
example in the fs doc, matching the latest lib/fs.js.
Truncates the stack to make it easier to update in the future.

PR-URL: nodejs/node#6617
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Adjust style in doctool tests to conform with predominant style of the
rest of the project. The biggest changes are:

* Replace string concatenation with `path.join()`
* Remove unnecessary quotes from property names

PR-URL: nodejs/node#6719
Reviewed-By: James M Snell <jasnell@gmail.com>
The custom linting rule for argument alignment in multi-line function
calls previously ignored template strings in an effort to avoid false
positives. This isn't really necessary. Enforce for template strings and
adjust whitespace in three tests to abide. (Insert "The test abides"
joke of your choosing here.)

PR-URL: nodejs/node#6720
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: nodejs/node#6741
Ref: nodejs/node#6578
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
The debugger needs to be active now before one is allowed to query the
list of scripts.  Replace the example with one that works without
installing a debug event listener first.

Fixes: nodejs/node#4862
PR-URL: nodejs/node#6757
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Prevent util.inspect of throwing on date object with invalid date value.
It changed to output result of toString method call.

PR-URL: nodejs/node#6504
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
`readline.emitKeypressEvents` needs `stream` to be in raw mode.

PR-URL: nodejs/node#6628
Fixes: nodejs/node#6626
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
mscdex and others added 21 commits May 18, 2016 02:12
PR-URL: nodejs/node#6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Make sure that `catch-stdout-error` has written data before the
destination process exits.

Fixes: nodejs/node#6791
PR-URL: nodejs/node#6808
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
In 5d38d54, an additional property in node_config.cc was added
whose definition depends on having the local `env` variable declared,
which in turn depended on `NODE_HAVE_I18N_SUPPORT` being defined.

Moving `env = ...` out of the `#ifdef` block allows building via
`./configure --without-intl` again.

PR-URL: nodejs/node#6820
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The test is currently flaky and CI provides no real information because
the test times out rather than failing on an assertion. Add logging to
gather more information about the failure.

Refs: nodejs/node#6754
PR-URL: nodejs/node#6769
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Remove port increment by `1337` which appears to sometimes result in a
port that is already in use. There is no reason not to use
`common.PORT`.

PR-URL: nodejs/node#6769
Fixes: nodejs/node#6754
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Since I was doing the necessary git archaeology anyway, I took the time
to add YAML information to the docs about when `addMembership()` and
`dropMembership()` first appeared in their current forms.

PR-URL: nodejs/node#6753
Ref: nodejs/node#6578
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The only tests for `addMembership()` and `dropMembership()` (from the
`dgram` module) were in `test/internet` which means they almost never
get run. This adds checks in `test/parallel`.

PR-URL: nodejs/node#6753
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
On OSX it's possible that the fd is replaced, so use the proper libuv
API to get the correct fd.

PR-URL: nodejs/node#6753
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#6805
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fix `options` usage on `lib/_http_agent.js` for the Legacy API.

Fixes: nodejs/node#5051
PR-URL: nodejs/node#5190
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Since debugger::Agent's interface is not exported, third party embedders
will have linking errors if they call Environment's destructor directly.

PR-URL: nodejs/node#3098
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fixes: nodejs/node#6765
PR-URL: nodejs/node#6809
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This makes it so you can see why the check fails if it does.

Typically that sort of thing can happen if you are modifying
bootstrapping or `process`.

PR-URL: nodejs/node#6786
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Git logs print my full name Robert Jefe Lindstaedt.
When I did #6389 I forgot simply forgot it.

PR-URL: nodejs/node#6880
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Updates the dns module documentation to include documentation on
the resolveNaptr method, and also adds the option NAPTR to the
list of valid values for rrtype in dns.resolve(hostname[, rrtype],
callback).

PR-URL: nodejs/node#6586
Fixes: nodejs/node#6507
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Replace booleans with `common.mustCall()`, migrate from `var` to
`const`, and apply minor formatting changes.

PR-URL: nodejs/node#6756
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
General improvements to vm module documentation

PR-URL: nodejs/node#6827
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
In preparation for a lint rule to flag `__defineGetter__`, refactor the
one remaining instance in the code base.

PR-URL: nodejs/node#6774
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node#6774
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Refs: nodejs/node#6768
Reduce unnecessarily verbose paragraph to a sentence.

PR-URL: nodejs/node#6801
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Commit 2b1c01c ("build: refactor pkg-config for shared libraries")
from May 2015 introduced python 2.7-specific code.

It mainly affects people building on old RHEL platforms where the system
python is 2.6.  Seemingly a dying breed because the issue went unnoticed
(or at least unreported) for a whole year.

Fixes: nodejs/node#6711
PR-URL: nodejs/node#6874
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@kunalspathak
Copy link
Member Author

//cc : @nodejs/node-chakracore

@@ -5,6 +5,12 @@ var spawn = require('child_process').spawn;

var script = common.fixturesDir + '/empty.js';

if (common.isChakraEngine) {
console.log('1..0 # Skipped: This test is disabled for chakra engine ' +
'because debugger support is not implemented yet.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be aligned with the string from the previous line, right? Does the linter allow this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, jslint didn't complain about this.

@jianchun
Copy link

linebreaks to be unix style i.e. LR by default.`

nit: commit message typo, LR should be LF

@jianchun
Copy link

LGTM

Sync nodejs/master (2016-05-20) at 62376d9

PR-URL: nodejs#73
Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
Disable debugger unit test from running in node-chakracore.

PR-URL: nodejs#73
Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
Recently linebreak-style rule was added in jslint which expects
linebreaks to be unix style i.e. `LF` by default. However windows
has linebreak `CRLF` (`git config auto.crlf=true`) causing this rule
to fail for all `*.js` files present in repo. I have disabled the rule
for now and opened nodejs/node#6912 to get the right rule
for windows user.

PR-URL: nodejs#73
Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
@kunalspathak kunalspathak merged commit 8d11795 into nodejs:chakracore-master May 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.