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: add --trace-gc flag test #42471

Merged
merged 5 commits into from
Mar 28, 2022

Conversation

tony-go
Copy link
Member

@tony-go tony-go commented Mar 25, 2022

Hi 👋

Context

This pull request follows this previous one and the initiative started by the diagnostic wg.

Added

Now that --trace-gc is a part of the diagnostic tooling support, I thought that we could improve maturity tiers by adding a simple high-level test. As --trace-gc is a part of the v8 codebase, it probably doesn't make sense to test specific cases here. I just tried to test the integration between node and v8.

I first tried to find where this integration was made, but I didn't find it. While I read the code I expected to find it somewhere around here:

StringVector* const v8_args,

If someone has an idea about where the integration is made, let me know ^^

How to run this test? -> make test-v8-updates

I wasn't sure about where should the test be or how I should write it, so I try to make it simple. 🙈

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Mar 25, 2022
test/fixtures/gc.js Outdated Show resolved Hide resolved
@tony-go
Copy link
Member Author

tony-go commented Mar 26, 2022

cc @nodejs/diagnostics

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

LGTM.

@nodejs-github-bot

This comment was marked as outdated.

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

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

LGTM with or without the suggested nits fixed.

test/v8-updates/test-trace-gc-flag.js Outdated Show resolved Hide resolved
test/v8-updates/test-trace-gc-flag.js Outdated Show resolved Hide resolved
@RaisinTen RaisinTen added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 28, 2022
@nodejs-github-bot
Copy link
Collaborator

Comment on lines 30 to 31
const expectedRegex = new RegExp(expectedOutput[index]);
assert.match(line, expectedRegex);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const expectedRegex = new RegExp(expectedOutput[index]);
assert.match(line, expectedRegex);
assert.match(line, expectedOutput[index]);

expectedOutput already contains regexes.

Copy link
Member Author

Choose a reason for hiding this comment

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

In fact, I did like it first, then I got an error but I misread it.

I finally trim the output string and it worked ^^

Thanks a lot 🙏

@tony-go tony-go requested a review from targos March 28, 2022 10:26
@Flarna Flarna added the request-ci Add this label to start a Jenkins CI on a PR. label Mar 28, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 28, 2022
@nodejs-github-bot
Copy link
Collaborator

@Flarna Flarna added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Mar 28, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 28, 2022
@nodejs-github-bot nodejs-github-bot merged commit 00cb091 into nodejs:master Mar 28, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 00cb091

juanarbol pushed a commit that referenced this pull request Apr 4, 2022
PR-URL: #42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
juanarbol pushed a commit to juanarbol/node that referenced this pull request Apr 5, 2022
PR-URL: nodejs#42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
This was referenced Apr 5, 2022
juanarbol pushed a commit that referenced this pull request Apr 6, 2022
PR-URL: #42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
xtx1130 pushed a commit to xtx1130/node that referenced this pull request Apr 25, 2022
PR-URL: nodejs#42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
juanarbol pushed a commit that referenced this pull request May 31, 2022
PR-URL: #42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
danielleadams pushed a commit that referenced this pull request Jun 27, 2022
PR-URL: #42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
targos pushed a commit that referenced this pull request Jul 11, 2022
PR-URL: #42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
targos pushed a commit that referenced this pull request Jul 11, 2022
PR-URL: #42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
PR-URL: nodejs/node#42471
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
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. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants