Skip to content

test: pass through stderr in benchmark tests - #21860

Closed
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:test-benchmark-stderr
Closed

test: pass through stderr in benchmark tests#21860
addaleax wants to merge 1 commit into
nodejs:masterfrom
addaleax:test-benchmark-stderr

Conversation

@addaleax

Copy link
Copy Markdown
Member

This helps a lot with debugging failing benchmark tests,
which would otherwise just print an assertion for the
exit code (something like +1 -0, which yields almost no
information about a failure).

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

This helps a lot with debugging failing benchmark tests,
which would otherwise just print an assertion for the
exit code (something like `+1 -0`, which yields almost no
information about a failure).
@addaleax
addaleax requested a review from TrottJuly 17, 2018 23:26
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Jul 17, 2018
@addaleaxaddaleax added the benchmark Issues and PRs related to the benchmark subsystem. label Jul 17, 2018

@TrottTrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@gireeshpunathil

Copy link
Copy Markdown
Member

@addaleax - why is the third entry (in the stdio array) required?

@addaleax

Copy link
Copy Markdown
MemberAuthor

@gireeshpunathil I’m not sure I understand – the first one is for stdin, which we don’t really care about, the second one is for stdout (which is what we’re testing here, so we need to capture it). The third one is for stderr; that’s the debugging information that should not get lost in the parent process. The fourth one is necessary for fork() to work.

@gireeshpunathil

Copy link
Copy Markdown
Member

my apologies - I meant the 4th entry (somehow the 0 based index concept messed up with the natural language).

The fourth one is necessary for fork() to work.

Can you please elaborate? missing to catch this. Is it for process.send to work properly?

@addaleax

Copy link
Copy Markdown
MemberAuthor

@gireeshpunathil I think process.send is the reason for it, but generally, it seems that child_process.fork() just fails if there’s no IPC file descriptor?

I think we might be able to switch to another child_process if we like, if we want to avoid that extra fd.

@addaleax

Copy link
Copy Markdown
MemberAuthor

@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 18, 2018
@addaleax

Copy link
Copy Markdown
MemberAuthor

@Trott

Copy link
Copy Markdown
Member

@Trott

Copy link
Copy Markdown
Member

Just fixed AIX in CI (I hope): https://ci.nodejs.org/job/node-test-pull-request/16049/

@trivikr

Copy link
Copy Markdown
Member

Landed in 8a62cdb

@trivikrtrivikr closed this Aug 1, 2018
trivikr pushed a commit that referenced this pull request Aug 1, 2018
This helps a lot with debugging failing benchmark tests,
which would otherwise just print an assertion for the
exit code (something like `+1 -0`, which yields almost no
information about a failure).
PR-URL: #21860
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
targos pushed a commit that referenced this pull request Aug 1, 2018
This helps a lot with debugging failing benchmark tests,
which would otherwise just print an assertion for the
exit code (something like `+1 -0`, which yields almost no
information about a failure).
PR-URL: #21860
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
@rvaggrvagg mentioned this pull request Aug 13, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.benchmarkIssues and PRs related to the benchmark subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@addaleax@nodejs-github-bot@gireeshpunathil@Trott@trivikr@jasnell@gabrielschulhof@cjihrig