Skip to content

Conversation

@bnoordhuis
Copy link
Member

v8 inspect -l <n> takes an argument.

Bug introduced in commit 2fc1571 ("src: option to limit output
of findjsinstances") from September 2018.

Fixes: #346

`v8 inspect -l <n>` takes an argument.

Bug introduced in commit 2fc1571 ("src: option to limit output
of `findjsinstances`") from September 2018.

Fixes: #346
@mmarchini
Copy link
Contributor

We should add some testing here. Since we don't seem to have specific tests for command arguments, we can change one of the inspect tests:

diff --git test/plugin/inspect-test.js test/plugin/inspect-test.js
index 0a59c9b..f664237 100644
--- test/plugin/inspect-test.js
+++ test/plugin/inspect-test.js
@@ -244,7 +244,7 @@ const hashMapTests = {
       });
     }, (t, sess, addresses, name, cb) => {
       const address = addresses[name];
-      sess.send(`v8 inspect --array-length 1 ${address}`);
+      sess.send(`v8 inspect -l 1 ${address}`);
 
       sess.linesUntil(/\]>/, (err, lines) => {
         if (err) return cb(err);

We use --array-length on other places in this test, so it should be fine.

Also our documentation is incomplete, --array-length and --string-length are not documented, but this can be handled in a separate PR.

@bnoordhuis
Copy link
Member Author

I updated one of the tests. I should perhaps mention that I don't plan to spend much more time on this patch, I just sent it because I'm such a nice guy (and also because obvious bug is obvious.)

mmarchini pushed a commit that referenced this pull request Mar 25, 2020
`v8 inspect -l <n>` takes an argument.

Bug introduced in commit 2fc1571 ("src: option to limit output
of `findjsinstances`") from September 2018.

Fixes: #346

PR-URL: #347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
@mmarchini
Copy link
Contributor

Landed in 83c810f

@mmarchini mmarchini closed this Mar 25, 2020
@coveralls
Copy link

Pull Request Test Coverage Report for Build ba54c028a413aadad021bfa0db05d8700efc2eaf-PR-347

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+4.5%) to 78.618%

Files with Coverage Reduction New Missed Lines %
test/common.js 2 79.24%
Totals Coverage Status
Change from base Build 8bf15c079fe0477731e2269c3786d53107563b60: 4.5%
Covered Lines: 3709
Relevant Lines: 4705

💛 - Coveralls

1 similar comment
@coveralls
Copy link

coveralls commented Aug 16, 2024

Pull Request Test Coverage Report for Build ba54c028a413aadad021bfa0db05d8700efc2eaf-PR-347

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+4.5%) to 78.618%

Files with Coverage Reduction New Missed Lines %
test/common.js 2 79.24%
Totals Coverage Status
Change from base Build 8bf15c079fe0477731e2269c3786d53107563b60: 4.5%
Covered Lines: 3709
Relevant Lines: 4705

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crash when run v8 i -l

4 participants