From c085ef1cdfe10474df944e0e096f8ad7cca1cf2e Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Tue, 5 Apr 2016 19:08:01 +0200 Subject: [PATCH] test: move some test from sequential to parallel The only test with modifications is `test-stdin-child-proc` that was passing when it should not because the exit code of the child process was not being checked. --- .../test-buffer-bad-overload.js | 0 test/{sequential => parallel}/test-debug-args.js | 0 .../test-force-repl-with-eval.js | 0 test/{sequential => parallel}/test-force-repl.js | 0 test/{sequential => parallel}/test-net-localport.js | 0 .../test-regress-GH-1531.js | 0 .../test-regress-GH-1899.js | 0 .../test-regress-GH-4948.js | 0 .../{sequential => parallel}/test-regress-GH-746.js | 0 .../test-socket-write-after-fin-error.js | 0 .../test-socket-write-after-fin.js | 0 test/parallel/test-stdin-child-proc.js | 13 +++++++++++++ .../test-stdin-pipe-resume.js | 0 .../test-stdin-script-child.js | 0 ...st-stdout-cannot-be-closed-child-process-pipe.js | 0 .../{sequential => parallel}/test-stdout-to-file.js | 0 test/{sequential => parallel}/test-sync-fileread.js | 0 .../test-vm-syntax-error-stderr.js | 0 .../test-zerolengthbufferbug.js | 0 test/sequential/test-stdin-child-proc.js | 8 -------- 20 files changed, 13 insertions(+), 8 deletions(-) rename test/{sequential => parallel}/test-buffer-bad-overload.js (100%) rename test/{sequential => parallel}/test-debug-args.js (100%) rename test/{sequential => parallel}/test-force-repl-with-eval.js (100%) rename test/{sequential => parallel}/test-force-repl.js (100%) rename test/{sequential => parallel}/test-net-localport.js (100%) rename test/{sequential => parallel}/test-regress-GH-1531.js (100%) rename test/{sequential => parallel}/test-regress-GH-1899.js (100%) rename test/{sequential => parallel}/test-regress-GH-4948.js (100%) rename test/{sequential => parallel}/test-regress-GH-746.js (100%) rename test/{sequential => parallel}/test-socket-write-after-fin-error.js (100%) rename test/{sequential => parallel}/test-socket-write-after-fin.js (100%) create mode 100644 test/parallel/test-stdin-child-proc.js rename test/{sequential => parallel}/test-stdin-pipe-resume.js (100%) rename test/{sequential => parallel}/test-stdin-script-child.js (100%) rename test/{sequential => parallel}/test-stdout-cannot-be-closed-child-process-pipe.js (100%) rename test/{sequential => parallel}/test-stdout-to-file.js (100%) rename test/{sequential => parallel}/test-sync-fileread.js (100%) rename test/{sequential => parallel}/test-vm-syntax-error-stderr.js (100%) rename test/{sequential => parallel}/test-zerolengthbufferbug.js (100%) delete mode 100644 test/sequential/test-stdin-child-proc.js diff --git a/test/sequential/test-buffer-bad-overload.js b/test/parallel/test-buffer-bad-overload.js similarity index 100% rename from test/sequential/test-buffer-bad-overload.js rename to test/parallel/test-buffer-bad-overload.js diff --git a/test/sequential/test-debug-args.js b/test/parallel/test-debug-args.js similarity index 100% rename from test/sequential/test-debug-args.js rename to test/parallel/test-debug-args.js diff --git a/test/sequential/test-force-repl-with-eval.js b/test/parallel/test-force-repl-with-eval.js similarity index 100% rename from test/sequential/test-force-repl-with-eval.js rename to test/parallel/test-force-repl-with-eval.js diff --git a/test/sequential/test-force-repl.js b/test/parallel/test-force-repl.js similarity index 100% rename from test/sequential/test-force-repl.js rename to test/parallel/test-force-repl.js diff --git a/test/sequential/test-net-localport.js b/test/parallel/test-net-localport.js similarity index 100% rename from test/sequential/test-net-localport.js rename to test/parallel/test-net-localport.js diff --git a/test/sequential/test-regress-GH-1531.js b/test/parallel/test-regress-GH-1531.js similarity index 100% rename from test/sequential/test-regress-GH-1531.js rename to test/parallel/test-regress-GH-1531.js diff --git a/test/sequential/test-regress-GH-1899.js b/test/parallel/test-regress-GH-1899.js similarity index 100% rename from test/sequential/test-regress-GH-1899.js rename to test/parallel/test-regress-GH-1899.js diff --git a/test/sequential/test-regress-GH-4948.js b/test/parallel/test-regress-GH-4948.js similarity index 100% rename from test/sequential/test-regress-GH-4948.js rename to test/parallel/test-regress-GH-4948.js diff --git a/test/sequential/test-regress-GH-746.js b/test/parallel/test-regress-GH-746.js similarity index 100% rename from test/sequential/test-regress-GH-746.js rename to test/parallel/test-regress-GH-746.js diff --git a/test/sequential/test-socket-write-after-fin-error.js b/test/parallel/test-socket-write-after-fin-error.js similarity index 100% rename from test/sequential/test-socket-write-after-fin-error.js rename to test/parallel/test-socket-write-after-fin-error.js diff --git a/test/sequential/test-socket-write-after-fin.js b/test/parallel/test-socket-write-after-fin.js similarity index 100% rename from test/sequential/test-socket-write-after-fin.js rename to test/parallel/test-socket-write-after-fin.js diff --git a/test/parallel/test-stdin-child-proc.js b/test/parallel/test-stdin-child-proc.js new file mode 100644 index 00000000000000..35ae0c99d3c8ff --- /dev/null +++ b/test/parallel/test-stdin-child-proc.js @@ -0,0 +1,13 @@ +'use strict'; +// This tests that pausing and resuming stdin does not hang and timeout +// when done in a child process. See test/parallel/test-stdin-pause-resume.js +const common = require('../common'); +const assert = require('assert'); +const child_process = require('child_process'); +const path = require('path'); +const cp = child_process.spawn(process.execPath, + [path.resolve(__dirname, 'test-stdin-pause-resume.js')]); + +cp.on('exit', common.mustCall((code) => { + assert.equal(code, 0); +})); diff --git a/test/sequential/test-stdin-pipe-resume.js b/test/parallel/test-stdin-pipe-resume.js similarity index 100% rename from test/sequential/test-stdin-pipe-resume.js rename to test/parallel/test-stdin-pipe-resume.js diff --git a/test/sequential/test-stdin-script-child.js b/test/parallel/test-stdin-script-child.js similarity index 100% rename from test/sequential/test-stdin-script-child.js rename to test/parallel/test-stdin-script-child.js diff --git a/test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js b/test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js similarity index 100% rename from test/sequential/test-stdout-cannot-be-closed-child-process-pipe.js rename to test/parallel/test-stdout-cannot-be-closed-child-process-pipe.js diff --git a/test/sequential/test-stdout-to-file.js b/test/parallel/test-stdout-to-file.js similarity index 100% rename from test/sequential/test-stdout-to-file.js rename to test/parallel/test-stdout-to-file.js diff --git a/test/sequential/test-sync-fileread.js b/test/parallel/test-sync-fileread.js similarity index 100% rename from test/sequential/test-sync-fileread.js rename to test/parallel/test-sync-fileread.js diff --git a/test/sequential/test-vm-syntax-error-stderr.js b/test/parallel/test-vm-syntax-error-stderr.js similarity index 100% rename from test/sequential/test-vm-syntax-error-stderr.js rename to test/parallel/test-vm-syntax-error-stderr.js diff --git a/test/sequential/test-zerolengthbufferbug.js b/test/parallel/test-zerolengthbufferbug.js similarity index 100% rename from test/sequential/test-zerolengthbufferbug.js rename to test/parallel/test-zerolengthbufferbug.js diff --git a/test/sequential/test-stdin-child-proc.js b/test/sequential/test-stdin-child-proc.js deleted file mode 100644 index 0189e94d5d4c8c..00000000000000 --- a/test/sequential/test-stdin-child-proc.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -// This tests that pausing and resuming stdin does not hang and timeout -// when done in a child process. See test/simple/test-stdin-pause-resume.js -require('../common'); -var child_process = require('child_process'); -var path = require('path'); -child_process.spawn(process.execPath, - [path.resolve(__dirname, 'test-stdin-pause-resume.js')]);