Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix flaky test-repl #36415

Merged
merged 1 commit into from
Dec 9, 2020
Merged

test: fix flaky test-repl #36415

merged 1 commit into from
Dec 9, 2020

Conversation

Trott
Copy link
Member

@Trott Trott commented Dec 6, 2020

The timeout is insufficient in CI (failures on Raspberry Pi) and I can
reproduce locally (on macOS) with
tools/test.py -j 96 --repeat 192 test-repl.

Increase timeout drastically as it only is useful in an error
condition.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@Trott Trott added the flaky-test Issues and PRs related to the tests with unstable failures on the CI. label Dec 6, 2020
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 6, 2020
@Trott
Copy link
Member Author

Trott commented Dec 6, 2020

Refs: https://ci.nodejs.org/job/node-test-binary-arm-12+/8619/RUN_SUBSET=0,label=pi3-docker/console

00:15:59 not ok 515 parallel/test-repl
00:15:59   ---
00:15:59   duration_ms: 6.654
00:15:59   severity: fail
00:15:59   exitcode: 1
00:15:59   stack: |-
00:15:59     out: ""
00:15:59     in: ""
00:15:59     out: "message"
00:15:59     in: "'Read, Eval, Print Loop'"
00:15:59     out: "invoke_me(987)"
00:15:59     in: "'invoked 987'"
00:15:59     out: "a = 12345"
00:15:59     in: "12345"
00:15:59     out: "{a:1}"
00:15:59     in: "{ a: 1 }"
00:15:59     out: "throw new Error('test error');"
00:15:59     in: "Uncaught Error: test error"
00:15:59     out: "throw { foo: 'bar' };"
00:15:59     in: "Uncaught { foo: 'bar' }"
00:15:59     out: "function test_func() {"
00:15:59     in: "... "
00:15:59     out: ".break"
00:15:59     in: ""
00:15:59     out: "eval(\"function test_func() {\")"
00:15:59     in: "Uncaught SyntaxError: Unexpected end of input"
00:15:59     out: "`io.js"
00:15:59     in: "... "
00:15:59     out: ".break"
00:15:59     in: ""
00:15:59     out: "`io.js ${\"1.0\""
00:15:59     in: "... "
00:15:59     out: "+ \".2\"}`"
00:15:59     in: "'io.js 1.0.2'"
00:15:59     out: "`io.js ${"
00:15:59     in: "... "
00:15:59     out: "\"1.0\" + \".2\"}`"
00:15:59     in: "'io.js 1.0.2'"
00:15:59     out: "(\"a\""
00:15:59     in: "... "
00:15:59     out: ".charAt(0))"
00:15:59     in: "'a'"
00:15:59     out: ".1234"
00:15:59     in: "0.1234"
00:15:59     out: ".1+.1"
00:15:59     in: "0.2"
00:15:59     out: "JSON.parse('{\"valid\": \"json\"}');"
00:15:59     in: "{ valid: 'json' }"
00:15:59     out: "JSON.parse('{invalid: \\'json\\'}');"
00:15:59     in: "Uncaught SyntaxError: Unexpected token i in JSON at position 1"
00:15:59     out: "JSON.parse('066');"
00:15:59     in: "Uncaught SyntaxError: Unexpected number in JSON at position 1"
00:15:59     out: "JSON.parse('{');"
00:15:59     in: "Uncaught SyntaxError: Unexpected end of JSON input"
00:15:59     out: "/(/;"
00:15:59     in: "Uncaught SyntaxError: Invalid regular expression: /(/: Unterminated group"
00:15:59     out: "new RegExp(\"foo\", \"wrong modifier\");"
00:15:59     in: "Uncaught SyntaxError: Invalid flags supplied to RegExp constructor 'wrong modifier'"
00:15:59     out: "(function() { \"use strict\"; return 0755; })()"
00:15:59     in: "(function() { \"use strict\"; return 0755; })()"
00:15:59     in: "                                   ^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Octal literals are not allowed in strict mode."
00:15:59     out: "(function(a, a, b) { \"use strict\"; return a + b + c; })()"
00:15:59     in: "(function(a, a, b) { \"use strict\"; return a + b + c; })()"
00:15:59     in: "             ^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Duplicate parameter name not allowed in this context"
00:15:59     out: "(function() { \"use strict\"; with (this) {} })()"
00:15:59     in: "(function() { \"use strict\"; with (this) {} })()"
00:15:59     in: "                            ^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Strict mode code may not include a with statement"
00:15:59     out: "(function() { \"use strict\"; var x; delete x; })()"
00:15:59     in: "(function() { \"use strict\"; var x; delete x; })()"
00:15:59     in: "                                          ^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Delete of an unqualified identifier in strict mode."
00:15:59     out: "(function() { \"use strict\"; eval = 17; })()"
00:15:59     in: "(function() { \"use strict\"; eval = 17; })()"
00:15:59     in: "                            ^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Unexpected eval or arguments in strict mode"
00:15:59     out: "(function() { \"use strict\"; if (true) function f() { } })()"
00:15:59     in: "(function() { \"use strict\"; if (true) function f() { } })()"
00:15:59     in: "                                      ^^^^^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught:"
00:15:59     in: "SyntaxError: In strict mode code, functions can only be declared at top level or inside a block."
00:15:59     out: "function blah() { return 1; }"
00:15:59     in: "undefined"
00:15:59     out: "blah()"
00:15:59     in: "1"
00:15:59     out: "var I = [1,2,3,function() {}]; I.pop()"
00:15:59     in: "[Function (anonymous)]"
00:15:59     out: "{ a: "
00:15:59     in: "... "
00:15:59     out: "1 }"
00:15:59     in: "{ a: 1 }"
00:15:59     out: "{ \"a\": "
00:15:59     in: "... "
00:15:59     out: "1 }"
00:15:59     in: "{ a: 1 }"
00:15:59     out: "class Foo { #private = true "
00:15:59     in: "... "
00:15:59     out: "num = 123456789n"
00:15:59     in: "... "
00:15:59     out: "static foo = \"bar\" }"
00:15:59     in: "undefined"
00:15:59     out: "(function() {"
00:15:59     in: "... "
00:15:59     out: "// blah"
00:15:59     in: "... "
00:15:59     out: "return 1n;"
00:15:59     in: "... "
00:15:59     out: "})()"
00:15:59     in: "1n"
00:15:59     out: "function f(){}; f(f(1,"
00:15:59     in: "... "
00:15:59     out: "2)"
00:15:59     in: "... "
00:15:59     out: ")"
00:15:59     in: "undefined"
00:15:59     out: "npm install foobar"
00:15:59     in: "npm should be run outside of the Node.js REPL, in your normal shell."
00:15:59     in: "(Press Ctrl+D to exit.)"
00:15:59     out: "(function() {\n\nreturn 1;\n})()"
00:15:59     in: "... ... ... 1"
00:15:59     out: "{\n\na: 1\n}"
00:15:59     in: "... ... ... { a: 1 }"
00:15:59     out: "url.format(\"http://google.com\")"
00:15:59     in: "'http://google.com/'"
00:15:59     out: "var path = 42; path"
00:15:59     in: "42"
00:15:59     out: ".invalid_repl_command"
00:15:59     in: "Invalid REPL keyword"
00:15:59     out: ".toString"
00:15:59     in: "Invalid REPL keyword"
00:15:59     out: "[] \\"
00:15:59     in: "[] \\"
00:15:59     in: "   ^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Invalid or unexpected token"
00:15:59     out: "'the\\\nfourth\\\neye'"
00:15:59     in: "... ... 'thefourtheye'"
00:15:59     out: "  \t    .break  \t  "
00:15:59     in: ""
00:15:59     out: "'the \\\n   fourth\t\t\\\n  eye  '"
00:15:59     in: "... ... 'the    fourth\\t\\t  eye  '"
00:15:59     out: "'the \\\n   fourth' +  '\t\t\\\n  eye  '"
00:15:59     in: "... ... 'the    fourth\\t\\t  eye  '"
00:15:59     out: "'\\\n.break"
00:15:59     in: "... node via Unix socket> "
00:15:59     out: "'thefourth\\\n.help\neye'"
00:15:59     in: "... .break   Sometimes you get stuck, this gets you out"
00:15:59     in: ".clear   Alias for .break"
00:15:59     in: ".exit    Exit the REPL"
00:15:59     in: ".help    Print this help message"
00:15:59     in: ".load    Load JS from a file into the REPL session"
00:15:59     in: ".save    Save all evaluated commands in this REPL session to a file"
00:15:59     in: ""
00:15:59     in: "Press Ctrl+C to abort current expression, Ctrl+D to exit the REPL"
00:15:59     in: "... 'thefourtheye'"
00:15:59     out: "{ a: 1 }.a"
00:15:59     in: "1"
00:15:59     out: "{ a: 1 }.a;"
00:15:59     in: "{ a: 1 }.a;"
00:15:59     in: "        ^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Unexpected token '.'"
00:15:59     out: "{ a: 1 }[\"a\"] === 1"
00:15:59     in: "true"
00:15:59     out: "{ a: 1 }[\"a\"] === 1;"
00:15:59     in: "false"
00:15:59     out: "\n\r\n\r\n"
00:15:59     in: ""
00:15:59     out: "'the\\\n\\\nfourtheye'\n"
00:15:59     in: "... ... 'thefourtheye'"
00:15:59     out: "/(.)(.)(.)(.)(.)(.)(.)(.)(.)/.test('123456789')\n"
00:15:59     in: "true"
00:15:59     out: "RegExp.$1\nRegExp.$2\nRegExp.$3\nRegExp.$4\nRegExp.$5\nRegExp.$6\nRegExp.$7\nRegExp.$8\nRegExp.$9\n"
00:15:59     in: "'1'"
00:15:59     in: "'2'"
00:15:59     in: "'3'"
00:15:59     in: "'4'"
00:15:59     in: "'5'"
00:15:59     in: "'6'"
00:15:59     in: "'7'"
00:15:59     in: "'8'"
00:15:59     in: "'9'"
00:15:59     out: "function x() {\nreturn '\\n';\n }"
00:15:59     in: "... ... undefined"
00:15:59     out: "function x() {\nreturn '\\\\';\n }"
00:15:59     in: "... ... undefined"
00:15:59     out: "function x() {\n//'\n }"
00:15:59     in: "... ... undefined"
00:15:59     out: "function x() {\n//\"\n }"
00:15:59     in: "... ... undefined"
00:15:59     out: "function x() {//'\n }"
00:15:59     in: "... undefined"
00:15:59     out: "function x() {//\"\n }"
00:15:59     in: "... undefined"
00:15:59     out: "function x() {\nvar i = \"'\";\n }"
00:15:59     in: "... ... undefined"
00:15:59     out: "function x(/*optional*/) {}"
00:15:59     in: "undefined"
00:15:59     out: "function x(/* // 5 */) {}"
00:15:59     in: "undefined"
00:15:59     out: "// /* 5 */"
00:15:59     in: "undefined"
00:15:59     out: "\"//\""
00:15:59     in: "'//'"
00:15:59     out: "\"data /*with*/ comment\""
00:15:59     in: "'data /*with*/ comment'"
00:15:59     out: "function x(/*fn's optional params*/) {}"
00:15:59     in: "undefined"
00:15:59     out: "/* '\n\"\n'\"'\n*/"
00:15:59     in: "... ... ... undefined"
00:15:59     out: "require(\"internal/repl\")"
00:15:59     in: "Uncaught Error: Cannot find module 'internal/repl'"
00:15:59     in: "Require stack:"
00:15:59     in: "- <repl>"
00:15:59     in: "    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)"
00:15:59     in: "    at Function.Module._load (node:internal/modules/cjs/loader:769:27)"
00:15:59     in: "    at Module.require (node:internal/modules/cjs/loader:997:19)"
00:15:59     in: "    at require (node:internal/modules/cjs/helpers:92:18) {"
00:15:59     in: "  code: 'MODULE_NOT_FOUND',"
00:15:59     in: "  requireStack: [ '<repl>' ]"
00:15:59     in: "}"
00:15:59     out: "function x(s) {\nreturn s.replace(/'/,'');\n}"
00:15:59     in: "... ... undefined"
00:15:59     out: "function x(s) {\nreturn s.replace(/'/,'');\n}"
00:15:59     in: "... ... undefined"
00:15:59     out: "function x(s) {\nreturn s.replace(/\"/,\"\");\n}"
00:15:59     in: "... ... undefined"
00:15:59     out: "function x(s) {\nreturn s.replace(/.*/,\"\");\n}"
00:15:59     in: "... ... undefined"
00:15:59     out: "{ var x = 4; }"
00:15:59     in: "undefined"
00:15:59     out: "a = 3.5e"
00:15:59     in: "a = 3.5e"
00:15:59     in: "    ^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Invalid or unexpected token"
00:15:59     out: "function name(){ return \"node\"; };name()"
00:15:59     in: "'node'"
00:15:59     out: "function name(){ return \"nodejs\"; };name()"
00:15:59     in: "'nodejs'"
00:15:59     out: "a = 3.5e"
00:15:59     in: "a = 3.5e"
00:15:59     in: "    ^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Invalid or unexpected token"
00:15:59     out: "a = 3.5e"
00:15:59     in: "a = 3.5e"
00:15:59     in: "    ^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Invalid or unexpected token"
00:15:59     out: "function* foo() {}; foo().next();"
00:15:59     in: "{ value: undefined, done: true }"
00:15:59     out: "function *foo() {}; foo().next();"
00:15:59     in: "{ value: undefined, done: true }"
00:15:59     out: "function*foo() {}; foo().next();"
00:15:59     in: "{ value: undefined, done: true }"
00:15:59     out: "function * foo() {}; foo().next()"
00:15:59     in: "{ value: undefined, done: true }"
00:15:59     out: "function foo() {\nvar bar = 1 / 1; // \"/\"\n}"
00:15:59     in: "... ... undefined"
00:15:59     out: "(function() {\nreturn /foo/ / /bar/;\n}())"
00:15:59     in: "... ... NaN"
00:15:59     out: "(function() {\nif (false) {} /bar\"/;\n}())"
00:15:59     in: "... ... undefined"
00:15:59     out: "new Proxy({x:42}, {get(){throw null}});"
00:15:59     in: "Proxy [ { x: 42 }, { get: [Function: get] } ]"
00:15:59     out: "repl.writer.options.showProxy = false, new Proxy({x:42}, {});"
00:15:59     in: "{ x: 42 }"
00:15:59     out: "`foo \n`"
00:15:59     in: "... 'foo \\n'"
00:15:59     out: " \t  \n"
00:15:59     in: "undefined"
00:15:59     out: "...[]"
00:15:59     in: "...[]"
00:15:59     in: "^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Unexpected token '...'"
00:15:59     out: ".break"
00:15:59     in: ""
00:15:59     out: "console.log(\"Missing comma in arg list\" process.version)"
00:15:59     in: "console.log(\"Missing comma in arg list\" process.version)"
00:15:59     in: "            ^^^^^^^^^^^^^^^^^^^^^^^^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: missing ) after argument list"
00:15:59     out: "x = {\nfield\n{"
00:15:59     in: "... ... {"
00:15:59     in: "^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Unexpected token '{'"
00:15:59     out: "(2 + 3))"
00:15:59     in: "(2 + 3))"
00:15:59     in: "       ^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Unexpected token ')'"
00:15:59     out: "if (typeof process === \"object\"); {"
00:15:59     in: "... "
00:15:59     out: "console.log(\"process is defined\");"
00:15:59     in: "... "
00:15:59     out: "} else {"
00:15:59     in: "} else {"
00:15:59     in: "  ^^^^"
00:15:59     in: ""
00:15:59     in: "Uncaught SyntaxError: Unexpected token 'else'"
00:15:59     out: "console"
00:15:59     in: "Object [console] {"
00:15:59     in: "  log: [Function: log],"
00:15:59     in: "  warn: [Function: warn],"
00:15:59     in: "  dir: [Function: dir],"
00:15:59     in: "  time: [Function: time],"
00:15:59     in: "  timeEnd: [Function: timeEnd],"
00:15:59     in: "  timeLog: [Function: timeLog],"
00:15:59     in: "  trace: [Function: trace],"
00:15:59     in: "  assert: [Function: assert],"
00:15:59     in: "  clear: [Function: clear],"
00:15:59     in: "  count: [Function: count],"
00:15:59     in: "  countReset: [Function: countReset],"
00:15:59     in: "  group: [Function: group],"
00:15:59     in: "  groupEnd: [Function: groupEnd],"
00:15:59     in: "  table: [Function: table],"
00:15:59     in: "  debug: [Function: debug],"
00:15:59     in: "  info: [Function: info],"
00:15:59     in: "  dirxml: [Function: dirxml],"
00:15:59     in: "  error: [Function: error],"
00:15:59     in: "  groupCollapsed: [Function: groupCollapsed],"
00:15:59     in: "  Console: [Function: Console],"
00:15:59     in: "  profile: [Function: profile],"
00:15:59     in: "  profileEnd: [Function: profileEnd],"
00:15:59     in: "  timeStamp: [Function: timeStamp],"
00:15:59     in: "  context: [Function: context]"
00:15:59     in: "}"
00:15:59     out: "ref = 1"
00:15:59     in: "Uncaught ReferenceError: ref is not defined"
00:15:59     out: ""
00:15:59     /home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-repl.js:928
00:15:59           reject(new Error(msg));
00:15:59                  ^
00:15:59     
00:15:59     Error: The REPL did not reply as expected for:
00:15:59     
00:15:59     ''
00:15:59         at Timeout._onTimeout (/home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-repl.js:928:14)
00:15:59         at listOnTimeout (node:internal/timers:556:17)
00:15:59         at processTimers (node:internal/timers:499:7)
00:15:59   ...

@Trott Trott added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 6, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 6, 2020
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

The timeout is insufficient in CI (failures on Raspberry Pi) and I can
reproduce locally (on macOS) with
`tools/test.py -j 96 --repeat 192 test-repl`.

Increase timeout drastically as it only is useful in an error
condition.

PR-URL: nodejs#36415
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott Trott merged commit 9a51082 into nodejs:master Dec 9, 2020
@Trott
Copy link
Member Author

Trott commented Dec 9, 2020

Landed in 9a51082

@Trott Trott deleted the fix-test-repl branch December 9, 2020 13:17
Trott added a commit that referenced this pull request Dec 9, 2020
The timeout is insufficient in CI (failures on Raspberry Pi) and I can
reproduce locally (on macOS) with
`tools/test.py -j 96 --repeat 192 test-repl`.

Increase timeout drastically as it only is useful in an error
condition.

PR-URL: #36415
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
Member Author

Trott commented Dec 9, 2020

Landed in 9a51082

Re-Landed in 9b23777 due to a force push to fix an unrelated issue.

targos pushed a commit that referenced this pull request Dec 21, 2020
The timeout is insufficient in CI (failures on Raspberry Pi) and I can
reproduce locally (on macOS) with
`tools/test.py -j 96 --repeat 192 test-repl`.

Increase timeout drastically as it only is useful in an error
condition.

PR-URL: #36415
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request May 1, 2021
The timeout is insufficient in CI (failures on Raspberry Pi) and I can
reproduce locally (on macOS) with
`tools/test.py -j 96 --repeat 192 test-repl`.

Increase timeout drastically as it only is useful in an error
condition.

PR-URL: #36415
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@danielleadams danielleadams mentioned this pull request May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants