FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: add known_issues test for #5350 by AnnaMag · Pull Request #10319 · nodejs/node · GitHub

/ node Public

test: add known_issues test for #5350 - #10319

Closed
AnnaMag wants to merge 1 commit into
nodejs:masterfrom
AnnaMag:test-issue-5350
Closed

test: add known_issues test for #5350#10319
AnnaMag wants to merge 1 commit into
nodejs:masterfrom
AnnaMag:test-issue-5350

Conversation

AnnaMag commented Dec 17, 2016
edited
Loading

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

tests

Description of change

A test addressing subproblem of #5350
inherited properties flattened in the vm.runInNewContext
is added to the known_issues directory.
It will be fixed with the 5.5 V8 API changes

#5350 is a consequence of the above as flattening of sandbox
inherited properties happens first inside the vm context
and is subsequently translated onto the outer sandbox.
assert.strictEqual(sandbox.hasOwnProperty('propBase'), false);

nodejs-github-bot added test Issues and PRs related to the tests. lts-watch-v6.x labels Dec 17, 2016

Copy link
Copy Markdown
Contributor

@AnnaMag btw, to get the list to show up as a checklist you need to remove the white space. :D

e.g. - [x]

Fishrock123 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think make lint should catch those nits? I forget.

CI: https://ci.nodejs.org/job/node-test-pull-request/5454/

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

single quotes please!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is this the proper way to write it?
'this.hasOwnProperty("propBase");'
I thought that double quotes are used in JS to avoid escaping: http://standardjs.com/rules.html
Could you clarify this for me, please? Thanks!

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Oh uh... good question. We don't use Standard though (for legacy reasons).

@Trott thoughts? I'd prefer template strings tbh but I think our linter may warn about that currently...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ok. I asked for future reference.
I used template strings here: https://github.com/nodejs/node/pull/10272/files
and looks like the linter was ok with it

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

In our lint rules, double quotes are acceptable if being used to avoid escaping single quotes. There are a few examples of it in the code base, but not many.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

(Just providing the answer to the question asked. I'm fine with whatever you do in this case as long as the linter accepts it.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

could we drop the trailing comma?

AnnaMag commented Dec 17, 2016
edited
Loading

Copy link
Copy Markdown
Member Author

cc/ @fhinkel

From https://nodejs.org/api/vm.html#vm_vm_createcontext_sandbox
Outside of scripts run by the vm module, sandbox will remain unchanged.
Should sandbox always reflect changes happening in the vm context (even if changes do not cause unintended behavior)?

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can you use camelCase for JavaScript variables please.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

camelCase here too please.

AnnaMag commented Dec 17, 2016

Copy link
Copy Markdown
Member Author

@Fishrock123, @cjihrig Done- thanks!

mscdex added the vm Issues and PRs related to the vm subsystem. label Dec 17, 2016

Copy link
Copy Markdown

@@ -0,0 +1,20 @@
'use strict';
// Ref: https://github.com/nodejs/node/issues/5350

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We usually don't include Ref: when linking to issues. I can only find two tests that do that. (For consistency they probably shouldn't)

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The known issue tests do.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I don't think it matters.

The more information possible the better, though.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I meant just get rid of Ref, not the link.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yea. I meant the known issue tests (I think all of them) include Refs: at the top.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Never mind. Didn't realize that's the standard for known tests. Sorry for derailing the discussion.

AnnaMag commented Dec 20, 2016

Copy link
Copy Markdown
Member Author

Yes, it seems to be included in all files in that dir. I assumed it was an agreed upon "standard". Of course, np to remove it.

fhinkel 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown

Landed: b73402d

evanlucas pushed a commit that referenced this pull request Jan 3, 2017
PR-URL: #10319
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
PR-URL: #10319
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
PR-URL: #10319
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>

MylesBorins commented Jan 23, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

this passes on v6 and fails on v4. Landed only on v6

MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
PR-URL: #10319
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
MylesBorins mentioned this pull request Jan 24, 2017
AnnaMag deleted the test-issue-5350 branch January 25, 2017 14:58
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
PR-URL: #10319
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 the tests. vm Issues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL