Skip to content

test: changed test2 & test3 of test-vm-timeout.js - #13453

Closed
aniketshukla wants to merge 1 commit into
nodejs:masterfrom
aniketshukla:master
Closed

aniketshukla wants to merge 1 commit into
nodejs:masterfrom
aniketshukla:master

Conversation

@aniketshukla

@aniketshukla aniketshukla commented Jun 4, 2017 •

Copy link
Copy Markdown
Contributor

Changed test2 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.
Before test 2 of test-vm-timeout.js would match any RangeError,
now it looks specifically for the error message
"RangeError: timeout must be a positive number"

Changed test 3 of test-vm-timeout.js so that entire error message
would be matched in assert.throw.
Before test 3 of test-vm-timeout.js would match any RangeError,
now it looks specifically for the error message
"RangeError: timeout must be a positive number"

Ref: #13454

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

test,vm

test: changed test2 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 2 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

test: changed test 3 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 3 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to Node.js core tests and test infrastructure. label Jun 4, 2017
@vsemozhetbyt vsemozhetbyt added the vm Issues and PRs related to the vm subsystem. label Jun 4, 2017
@vsemozhetbyt

Copy link
Copy Markdown
Contributor

@refack

refack commented Jun 4, 2017

Copy link
Copy Markdown
Contributor

@aniketshukla Welcome, and thank you very much for the contribution 🥇
I've "gently" edited you original comment to make it more conformant with our template (you actually have supplied a test, and the affected subsystems are: test,vm)

@vsemozhetbyt vsemozhetbyt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Тhank you!

@aniketshukla

Copy link
Copy Markdown
Contributor Author

@refack @vsemozhetbyt Thank you !

@tniessen tniessen 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.

Please choose a more specific commit message. The first line should start with test,vm: and say something useful, e.g. test,vm: restrict allowed RangeErrors for timeout. Additionally, the next paragraphs can be shortened significantly.

@addaleax

addaleax commented Jun 4, 2017

Copy link
Copy Markdown
Member

The first line should start with test,vm:

That’s really not customary for test-only changes; I think we mostly do that kind of format for changes that are test-heavy but also have changes in lib/ or src/. I think the commit message is fine as it is.

@refack

refack commented Jun 4, 2017

Copy link
Copy Markdown
Contributor

test,vm: restrict allowed RangeErrors for timeout

I would suggest test: validate full error messages
INHO you can remove everything else. We'll add the (new) reference to #13454 that supplies the motivation, and the filename is automatically added by git to the full commit metadata.

@tniessen

tniessen commented Jun 4, 2017 •

Copy link
Copy Markdown
Member

@addaleax Okay, my bad, I thought we included all affected subsystems in the commit message. IMHO "changed test2 & test3 of test-vm-timeout.js" is not a helpful commit message.

@refack

refack commented Jun 4, 2017

Copy link
Copy Markdown
Contributor

Okay, my bad, I interpreted, I thought we included all affected subsystems in the commit message.

INHO It's good you voice your opinion!
Anyway it's a judgment call, in my POV test,vm would be better when a new test is added that tests vm. IMHO this change is more of an improvement to the test suite 🤔

IMHO "changed test2 & test3 of test-vm-timeout.js" is not a helpful commit message.
👍

@refack

refack commented Jun 4, 2017

Copy link
Copy Markdown
Contributor

@tniessen personally I give more "assertive" comment to @nodejs/collaborators members then to other users (IMHO @addaleax does too), it doesn't mean we are always right, and it's usually not meant as criticism (unless explicitly written so), and is never ever personal! You should take it as pointer to (undocumented) more common practices.

@tniessen

tniessen commented Jun 4, 2017

Copy link
Copy Markdown
Member

@refack It's okay, no offense taken :) I see that including vm in the commit message is not necessary, it might actually be confusing as no actual changes were made to the vm subsystem, but I still hold up my opinion about the commit message. IMO the first line should at least attempt to explain or summarize what was done :)

If we agree on a different commit message, I can change it while merging this (unless someone else plans to do that). I am fine with @refack's suggestion (test: validate full error messages) considering your explanation.

@refack

refack commented Jun 4, 2017

Copy link
Copy Markdown
Contributor

Failure on test/windows-fanned is unrelated. Maybe a new flake.

@refack

refack commented Jun 4, 2017

Copy link
Copy Markdown
Contributor

@refack refack self-assigned this Jun 4, 2017
refack pushed a commit to refack/node that referenced this pull request Jun 7, 2017
test: changed test2 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 2 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

test: changed test 3 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 3 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

PR-URL: nodejs#13453
Refs: nodejs#13454
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@refack

refack commented Jun 7, 2017

Copy link
Copy Markdown
Contributor

Landed in 12e39d6

@refack refack closed this Jun 7, 2017
@refack

refack commented Jun 7, 2017

Copy link
Copy Markdown
Contributor

Extra post-land sanity of master: https://ci.nodejs.org/job/node-test-commit-linuxone/6445/

jasnell pushed a commit that referenced this pull request Jun 7, 2017
test: changed test2 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 2 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

test: changed test 3 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 3 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

PR-URL: #13453
Refs: #13454
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
2 of 3 tasks
MylesBorins pushed a commit that referenced this pull request Jul 17, 2017
test: changed test2 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 2 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

test: changed test 3 of test-vm-timeout.js so that entire error message
      would be matched in assert.throw.

      Before test 3 of test-vm-timeout.js would match any RangeError,
      now it looks specifically for the error message
      "RangeError: timeout must be a positive number"

PR-URL: #13453
Refs: #13454
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
@MylesBorins MylesBorins mentioned this pull request Jul 18, 2017
@refack refack removed their assignment Oct 20, 2018
Andarist added a commit to replayio/node that referenced this pull request Oct 5, 2026
…sAddon

Backend nodejs#13453 added the RecordReplayMarkNextDlopenAsAddon() export which
this branch calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Andarist added a commit to replayio/node that referenced this pull request Oct 5, 2026
* Tell the driver which dlopen() loads an addon

The driver only let addons be loaded from paths containing node_modules
when recording, and refused others without a dlerror() message, which
crashed DLib::Open() while building its error.

Call the driver's RecordReplayMarkNextDlopenAsAddon() before loading an
addon, so that it is attached wherever it is, and fall back to a generic
message when dlerror() has none.

Requires a driver with RecordReplayMarkNextDlopenAsAddon(), so
REPLAY_BACKEND_REV needs to be bumped once it is released.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pass the addon's name when marking its dlopen() for the driver

The driver only applies the mark to a dlopen() of that name, so a mark
whose dlopen() wasn't intercepted can't apply to a later library.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Pin REPLAY_BACKEND_REV to the driver with RecordReplayMarkNextDlopenAsAddon

Backend nodejs#13453 added the RecordReplayMarkNextDlopenAsAddon() export which
this branch calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Drop the fallback for a NULL dlerror() in DLib::Open

Addon dlopen() calls are marked for the driver, so it doesn't refuse
them, and the driver makes dlerror() report refused ones anyway. A failed
dlopen() always has an error, as upstream assumes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Issues and PRs related to Node.js core tests and test infrastructure. vm Issues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants