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: pass through stderr in benchmark tests #21860

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
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 Trott July 17, 2018 23:26
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jul 17, 2018
@addaleax addaleax added the benchmark Issues and PRs related to the benchmark subsystem. label Jul 17, 2018
Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

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

LGTM

@gireeshpunathil
Copy link
Member

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

@addaleax
Copy link
Member Author

@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
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
Member Author

@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
Member Author

@addaleax addaleax 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
Member Author

@Trott
Copy link
Member

Trott commented Jul 28, 2018

@Trott
Copy link
Member

Trott commented Jul 28, 2018

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

@trivikr
Copy link
Member

trivikr commented Aug 1, 2018

Landed in 8a62cdb

@trivikr trivikr 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. benchmark Issues and PRs related to the benchmark subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants