0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

16 Commits

Author SHA1 Message Date
James M Snell
4f2e372716 test: add common.noop, default for common.mustCall()
Export a new common.noop no-operation function for general use.
Allow using common.mustCall() without a fn argument to simplify
test cases.

Replace various non-op functions throughout tests with common.noop

PR-URL: https://github.com/nodejs/node/pull/12027
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-03-26 12:47:15 -07:00
Gireesh Punathil
d631af59c0
test: delay child exit in AIX for pseudo-tty tests
The tests in pseudo-tty takes the form of child node writing some data
and exiting, while parent python consume them through pseudo tty
implementations, and validate the result.

While there is no synchronization between child and parent, this works
for most platforms, except AIX, where the child exits even before the
parent could setup the read loop, under race conditions

Fixing the race condition is ideally done through sending ACK messages
to and forth, but involves massive changes and have side effect. The
workaround is to address them in AIX alone, by adding a reasonable
delay.

PR-URL: https://github.com/nodejs/node/pull/11715
Fixes: https://github.com/nodejs/node/issues/7973
Fixes: https://github.com/nodejs/node/issues/9765
Fixes: https://github.com/nodejs/node/issues/11541
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-03-17 12:28:44 +00:00
Ben Schmidt
3c92200d8b
tty: add ref() so process.stdin.ref() etc. work
Also squashed from:
* test: move tty-wrap isrefed test to pseudo-tty/
* test: test tty-wrap handle isrefed properly
* test: improve failure messages in isrefed tests

PR-URL: https://github.com/nodejs/node/pull/7360
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell.gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-02-28 18:44:05 +01:00
Rich Trott
8c68def5ff test: require handler to be run in sigwinch test
Use `common.mustCall()` to guarantee that the wrapped `_refreshSize()`
functions are invoked.

PR-URL: https://github.com/nodejs/node/pull/11068
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
2017-01-31 10:31:21 -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
Michael Dawson
26b8c2127d test: mark test-tty-wrap as flaky for AIX
We have had https://github.com/nodejs/node/issues/9728
open for a while but the frequency of the failures
seems to be such that we should mark it as flaky
while we continue to investigate.

PR-URL: https://github.com/nodejs/node/pull/10618
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-01-05 14:43:32 -05:00
Sarah Meyer
a9b59ff8fb test: add test for SIGWINCH handling by stdio.js
PR-URL: https://github.com/nodejs/node/pull/10063
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-27 21:21:35 -08:00
Anna Henningsen
10929f6cb6
test: fail for missing output files
Instead of ignoring missing `.out` files for message/pseudo-tty tests,
raise an error to indicate that something is not quite right.

Ref: https://github.com/nodejs/node/pull/10037
PR-URL: https://github.com/nodejs/node/pull/10150
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-12-12 16:11:12 +01:00
Jonathan Darling
b8fc9a3c6a
test: add stdin-setrawmode.out file
Adds an accompanying .out file for test/pseudo-tty/stdin-setrawmode.js.
The test was originally merged without this file and an astute
observer found that it was causing an error message. See discussion
at https://github.com/nodejs/node/pull/10037.

PR-URL: https://github.com/nodejs/node/pull/10149
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-09 15:20:51 +01:00
Jonathan Darling
3ae0900142 test: add test for process.stdin.setRawMode()
adds a basic test for process.stdin.setRawMode to ensure that the isRaw
property is properly changed

PR-URL: https://github.com/nodejs/node/pull/10037
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-12-05 14:23:15 -08:00
Michael Dawson
d2149596a5 test: exclude no_interleaved_stdio test for AIX
pseudo-tty/no_interleaved_stdio has hung a few times
in the last couple of days on AIX.  We believe
it is not a Node.js issue but an issue with python
on AIX. Its being investigated under:
https://github.com/nodejs/node/issues/7973.
Excluding this additional test until we can
resolve the python issue.

Fixes https://github.com/nodejs/node/issues/9765
PR-URL: https://github.com/nodejs/node/pull/9772
Reviewed-By: Sam Roberts <sam@strongloop.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2016-11-25 09:15:08 -05:00
Michael Dawson
1ffdbb6f42 test: skip pseudo-tty/no_dropped_stdio test
We had marked it as flaky but in some failures it hangs
and does not seem to timeout, and or is reported as
an error.

Also add prefix to status file as it was missing.

Also fix name of status file in testcfg.py. It
was pointing to message.status instead of
pseudo-tty.status.

PR-URL: https://github.com/nodejs/node/pull/8470
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-09-12 09:51:11 -04:00
Michael Dawson
1ffdee7c86 test: mark pseudo-tty/no_dropped_stdio as flaky
We've determined there is a test issue related to python as
opposed to node, mark as flaky until we can resolve

PR-URL: https://github.com/nodejs/node/pull/8385
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-09-06 10:09:43 -04:00
Jeremiah Senkpiel
aab306679e test: fix old tty tests
test-tty-wrap hasn’t worked since StreamBase was introduced, I think.
test-tty-stdout-end also happens to works with PipeWrap-s.

Refs: https://github.com/nodejs/node/pull/7360
PR-URL: https://github.com/nodejs/node/pull/7613
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-07-11 15:22:09 +02:00
Jeremiah Senkpiel
f3a3888307 test: move parallel/test-tty-* to pseudo-tty/
Refs: https://github.com/nodejs/node/pull/7360
PR-URL: https://github.com/nodejs/node/pull/7613
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-07-11 15:22:09 +02:00
Jeremiah Senkpiel
88804b84ec test: test TTY problems by fakeing a TTY using openpty
Many thanks to thefourtheye and addaleax who helped make the python
bits of this possible.

See https://github.com/nodejs/node/issues/6980 for more info regarding
the related TTY issues.

Refs: https://github.com/nodejs/node/issues/6456
Refs: https://github.com/nodejs/node/pull/6773
Refs: https://github.com/nodejs/node/pull/6816
PR-URL: https://github.com/nodejs/node/pull/6895
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-06-01 18:59:01 -04:00