Title: Test failures with `TERM=dumb` · Issue #28064 · nodejs/node · GitHub
Open Graph Title: Test failures with `TERM=dumb` · Issue #28064 · nodejs/node
X Title: Test failures with `TERM=dumb` · Issue #28064 · nodejs/node
Description: Version: master Platform: Linux/AIX Subsystem: test Some tests, e.g. parallel/test-console-clear, fail when the TERM environment variable is dumb, e.g. on Linux: -bash-4.2$ echo $TERM xterm-256color -bash-4.2$ ./node test/parallel/test-c...
Open Graph Description: Version: master Platform: Linux/AIX Subsystem: test Some tests, e.g. parallel/test-console-clear, fail when the TERM environment variable is dumb, e.g. on Linux: -bash-4.2$ echo $TERM xterm-256colo...
X Description: Version: master Platform: Linux/AIX Subsystem: test Some tests, e.g. parallel/test-console-clear, fail when the TERM environment variable is dumb, e.g. on Linux: -bash-4.2$ echo $TERM xterm-256colo...
Opengraph URL: https://github.com/nodejs/node/issues/28064
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test failures with `TERM=dumb`","articleBody":"\u003c!--\r\nThank you for reporting a possible bug in Node.js.\r\n\r\nPlease fill in as much of the template below as you can.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)\r\nSubsystem: if known, please specify the affected core module name\r\n\r\nIf possible, please provide code that demonstrates the problem, keeping it as\r\nsimple and free of external dependencies as you can.\r\n-->\r\n\r\n* **Version**: master\r\n* **Platform**: Linux/AIX\r\n* **Subsystem**: test\r\n\r\n\u003c!-- Please provide more details below this comment. -->\r\n\r\nSome tests, e.g. parallel/test-console-clear, fail when the `TERM` environment variable is `dumb`, e.g. on Linux:\r\n\r\n```console\r\n-bash-4.2$ echo $TERM\r\nxterm-256color\r\n-bash-4.2$ ./node test/parallel/test-console-clear.js\r\n-bash-4.2$ TERM=dumb ./node test/parallel/test-console-clear.js\r\nassert.js:89\r\n throw new AssertionError(obj);\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n+ actual - expected\r\n\r\n+ ''\r\n- '\\u001b[1;1H\\u001b[0J'\r\n at doTest (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-console-clear.js:17:10)\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-console-clear.js:21:1)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11 {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: '',\r\n expected: '\\u001b[1;1H\\u001b[0J',\r\n operator: 'strictEqual'\r\n}\r\n-bash-4.2$\r\n```\r\n\r\nNoticed on our CI, where tests are failing on one of the AIX executors, test-osuosl-aix61-ppc64_be-2, which has `TERM` set to `dumb` according to Jenkins, e.g. https://ci.nodejs.org/job/node-test-commit-aix/nodes=aix61-ppc64/23627/. (The other two AIX executors have `TERM` set to `xterm` and `screen-256color` and the tests pass on them.)\r\n\r\nI guess there are two issues here:\r\n1. the tests should be tolerant of `TERM=dumb` (either they should pass or at least skip)\r\n1. test-osuosl-aix61-ppc64_be-2 should probably have a different `TERM` setting (cc @nodejs/build-infra @nodejs/platform-aix)\r\n\r\n\u003cdetails>\r\n\u003csummary>The twelve failing tests\u003c/summary>\r\n\r\n```console\r\n-bash-4.2$ echo $TERM\r\nxterm-256color\r\n-bash-4.2$ ./tools/test.py -J parallel\r\n[00:21|% 100|+ 2236|- 0]: Done\r\n-bash-4.2$ TERM=dumb ./tools/test.py -J parallel\r\n=== release test-console-clear ===\r\nPath: parallel/test-console-clear\r\nassert.js:89\r\n throw new AssertionError(obj);\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n+ actual - expected\r\n\r\n+ ''\r\n- '\\u001b[1;1H\\u001b[0J'\r\n at doTest (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-console-clear.js:17:10)\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-console-clear.js:21:1)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11 {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: '',\r\n expected: '\\u001b[1;1H\\u001b[0J',\r\n operator: 'strictEqual'\r\n}\r\nCommand: out/Release/node /home/users/riclau/sandbox/github/nodejs/test/parallel/test-console-clear.js\r\n=== release test-readline-position ===\r\nPath: parallel/test-readline-position\r\nassert.js:89\r\n throw new AssertionError(obj);\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n\r\n3 !== 2\r\n\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline-position.js:40:12)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11 {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: 3,\r\n expected: 2,\r\n operator: 'strictEqual'\r\n}\r\nCommand: out/Release/node --expose-internals /home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline-position.js\r\n=== release test-repl-editor ===\r\nPath: parallel/test-repl-editor\r\nassert.js:89\r\n throw new AssertionError(obj);\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n+ actual - expected\r\n\r\n+ '> .editor\\n// Entering editor mode (^D to finish, ^C to cancel)\\n\\n(To exit, press ^C again or ^D or type .exit)\\n> '\r\n- '\\u001b[1G\\u001b[0J> \\u001b[3G.editor\\n// Entering editor mode (^D to finish, ^C to cancel)\\n\\n(To exit, press ^C again or ^D or type .exit)\\n\\u001b[1G\\u001b[0J> \\u001b[3G'\r\n at run (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-editor.js:42:10)\r\n at Array.forEach (\u003canonymous>)\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-editor.js:74:7)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11 {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: '> .editor\\n// Entering editor mode (^D to finish, ^C to ' +\r\n 'cancel)\\n\\n(To exit, press ^C again or ^D or type .exit)\\n> ',\r\n expected: '\\u001b[1G\\u001b[0J> \\u001b[3G.editor\\n// Entering editor mode (^D to finish, ^C to ' +\r\n 'cancel)\\n\\n(To exit, press ^C again or ^D or type .exit)\\n\\u001b[1G\\u001b[0J> ' +\r\n '\\u001b[3G',\r\n operator: 'strictEqual'\r\n}\r\nCommand: out/Release/node /home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-editor.js\r\n=== release test-readline ===\r\nPath: parallel/test-readline\r\nassert.js:89\r\n throw new AssertionError(obj);\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n\r\n6 !== 0\r\n\r\n at /home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline.js:78:12\r\n at Array.forEach (\u003canonymous>)\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline.js:76:47)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11 {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: 6,\r\n expected: 0,\r\n operator: 'strictEqual'\r\n}\r\nCommand: out/Release/node /home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline.js\r\n=== release test-readline-interface ===\r\nPath: parallel/test-readline-interface\r\nreadline.js:1158\r\n throw err;\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n+ actual - expected\r\n\r\n+ '\\tfo\\to\\t'\r\n- 'foo'\r\n at Interface.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline-interface.js:345:14)\r\n at Interface.emit (events.js:200:13)\r\n at Interface._onLine (readline.js:314:10)\r\n at Interface._line (readline.js:691:8)\r\n at Interface._ttyWriteDumb (readline.js:835:14)\r\n at FakeInput.onkeypress (readline.js:189:10)\r\n at FakeInput.emit (events.js:200:13)\r\n at emitKeys (internal/readline.js:424:14)\r\n at emitKeys.next (\u003canonymous>)\r\n at FakeInput.onData (readline.js:1145:36) {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: '\\tfo\\to\\t',\r\n expected: 'foo',\r\n operator: 'strictEqual'\r\n}\r\nCommand: out/Release/node --expose_internals /home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline-interface.js\r\n=== release test-readline-undefined-columns ===\r\nPath: parallel/test-readline-undefined-columns\r\nassert.js:362\r\n throw err;\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:\r\n\r\n assert(/process\\.std\\b/.test(output))\r\n\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline-undefined-columns.js:38:1)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11 {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: false,\r\n expected: true,\r\n operator: '=='\r\n}\r\nCommand: out/Release/node /home/users/riclau/sandbox/github/nodejs/test/parallel/test-readline-undefined-columns.js\r\n=== release test-repl-history-navigation ===\r\nPath: parallel/test-repl-history-navigation\r\nMismatched runTest function calls. Expected exactly 2, actual 0.\r\n at Object.mustCall (/home/users/riclau/sandbox/github/nodejs/test/common/index.js:340:10)\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-history-navigation.js:76:28)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11\r\nCommand: out/Release/node --expose-internals /home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-history-navigation.js\r\n=== release test-repl-eval-scope ===\r\nPath: parallel/test-repl-eval-scope\r\nMismatched \u003canonymous> function calls. Expected exactly 1, actual 0.\r\n at Object.mustCall (/home/users/riclau/sandbox/github/nodejs/test/common/index.js:340:10)\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-eval-scope.js:10:18)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11\r\nCommand: out/Release/node /home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-eval-scope.js\r\n=== release test-repl-load-multiline ===\r\nPath: parallel/test-repl-load-multiline\r\nassert.js:89\r\n throw new AssertionError(obj);\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n+ actual - expected\r\n\r\n+ '.load /home/users/riclau/sandbox/github/nodejs/test/fixtures/repl-load-multiline.js\\n'\r\n- \".load /home/users/riclau/sandbox/github/nodejs/test/fixtures/repl-load-multiline.js\\nconst getLunch = () =>\\n placeOrder('tacos')\\n .then(eat);\\nconst placeOrder = (order) => Promise.resolve(order);\\nconst eat = (food) => '\u003cnom nom nom>';\\n\\nundefined\\n\"\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-load-multiline.js:38:8)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11 {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: '.load ' +\r\n '/home/users/riclau/sandbox/github/nodejs/test/fixtures/repl-load-multiline.js\\n',\r\n expected: '.load ' +\r\n '/home/users/riclau/sandbox/github/nodejs/test/fixtures/repl-load-multiline.js\\n' +\r\n \"const getLunch = () =>\\n placeOrder('tacos')\\n .then(eat);\\n\" +\r\n 'const placeOrder = (order) => Promise.resolve(order);\\nconst eat ' +\r\n \"= (food) => '\u003cnom nom nom>';\\n\\nundefined\\n\",\r\n operator: 'strictEqual'\r\n}\r\nCommand: out/Release/node /home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-load-multiline.js\r\n=== release test-repl-persistent-history ===\r\nPath: parallel/test-repl-persistent-history\r\nMismatched runTest function calls. Expected exactly 10, actual 0.\r\n at Object.mustCall (/home/users/riclau/sandbox/github/nodejs/test/common/index.js:340:10)\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-persistent-history.js:166:28)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11\r\nCommand: out/Release/node --expose-internals /home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-persistent-history.js\r\n=== release test-repl-programmatic-history ===\r\nPath: parallel/test-repl-programmatic-history\r\nMismatched runTest function calls. Expected exactly 10, actual 0.\r\n at Object.mustCall (/home/users/riclau/sandbox/github/nodejs/test/common/index.js:340:10)\r\n at Object.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-programmatic-history.js:164:28)\r\n at Module._compile (internal/modules/cjs/loader.js:781:30)\r\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:792:10)\r\n at Module.load (internal/modules/cjs/loader.js:641:32)\r\n at Function.Module._load (internal/modules/cjs/loader.js:556:12)\r\n at Function.Module.runMain (internal/modules/cjs/loader.js:844:10)\r\n at internal/main/run_main_module.js:17:11\r\nCommand: out/Release/node /home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-programmatic-history.js\r\n=== release test-repl-end-emits-exit ===\r\nPath: parallel/test-repl-end-emits-exit\r\nassert.js:89\r\n throw new AssertionError(obj);\r\n ^\r\n\r\nAssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\r\n\r\n0 !== 1\r\n\r\n at process.\u003canonymous> (/home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-end-emits-exit.js:70:10)\r\n at process.emit (events.js:205:15)\r\n at process.EventEmitter.emit (domain.js:471:20)\r\n at process.topLevelDomainCallback (domain.js:126:23) {\r\n generatedMessage: true,\r\n code: 'ERR_ASSERTION',\r\n actual: 0,\r\n expected: 1,\r\n operator: 'strictEqual'\r\n}\r\nCommand: out/Release/node /home/users/riclau/sandbox/github/nodejs/test/parallel/test-repl-end-emits-exit.js\r\n[00:21|% 100|+ 2224|- 12]: Done\r\n-bash-4.2$\r\n```\r\n\u003c/details>","author":{"url":"https://github.com/richardlau","@type":"Person","name":"richardlau"},"datePublished":"2019-06-04T22:50:29Z","url":"https://github.com/nodejs/node/issues/28064"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8bbc31ab-3b6e-d87e-b7f6-d07601b29c11 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8470:20E6A:75A19:A2715:6AED312D |
| html-safe-nonce | cee4d13c492fbd7fefa770f8763643db7bfa2a424c1da6622b4c755d5f2b8675 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDcwOjIwRTZBOjc1QTE5OkEyNzE1OjZBRUQzMTJEIiwidmlzaXRvcl9pZCI6IjkxODQ0Njk1NjQ5MTEzMzM2NzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d7917b73b38930a0714f87c22db83a3c3385018e55c8acd0d994c5a4bacfdf72 |
| hovercard-subject-tag | issue:452241588 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/28064/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9ca27b40fb744549d3b4815aec9ea4bf454ae95566cdf39c4a4eb6424b8a4d47/nodejs/node/issues/28064 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9ca27b40fb744549d3b4815aec9ea4bf454ae95566cdf39c4a4eb6424b8a4d47/nodejs/node/issues/28064 |
| og:image:alt | Version: master Platform: Linux/AIX Subsystem: test Some tests, e.g. parallel/test-console-clear, fail when the TERM environment variable is dumb, e.g. on Linux: -bash-4.2$ echo $TERM xterm-256colo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | richardlau |
| hostname | github.com |
| expected-hostname | github.com |
| None | e51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ebb7b901cc154ecc179a44f266fcf69f343b30 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width