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

path: fixing a test that breaks on some machines. #6067

Closed

Conversation

mike-kaufman
Copy link

Pull Request check-list

Please make sure to review and check all of these items:

  • Does make -j8 test (UNIX) or vcbuild test nosign (Windows) pass with
    this change (including linting)?
  • Is the commit message formatted according to CONTRIBUTING.md?
  • If this change fixes a bug (or a performance problem), is a regression
    test (or a benchmark) included?
  • Is a documentation update included (if this change modifies
    existing APIs, or introduces new ones)?

Caveats:

  • didn't run the unix tests, as this change doesn't impact them.
  • seeing two non-related test failures on windows. I haven't investigated these
    • addons/load-long-path/test - seeing "Error: The data area passed to a system call is too small."
    • test\parallel\test-tls-server-verify.js - seeing a timeout.

Affected core subsystem(s)

path

Description of change

A win32-only test was verifying that path.win32._makeLong('C:')
would return the current working directory. This would only work if
current working directory was also on the C: device. Fix is to grab
the device letter for current working directory, and pass that to
_makeLong().

A win32-only test was verifying that path.win32._makeLong('C:')
would return the current working directory.  This would only work if
current working directory was also on the C: device.  Fix is to grab
the device letter for current working directory, and pass that to
_makeLong().
@Fishrock123 Fishrock123 added the path Issues and PRs related to the path subsystem. label Apr 5, 2016
@@ -41,6 +41,7 @@ _UpgradeReport_Files/
ipch/
*.sdf
*.opensdf
node.VC.opendb
Copy link
Contributor

Choose a reason for hiding this comment

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

I this this belongs in your own global gitignore. :)

Copy link
Author

Choose a reason for hiding this comment

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

Sure, I can remove this, but I believe this is an artifact of vs 2015, so anyone using this IDE will need to add this to their .gitignore. Is there precedent here?

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

No opinion from me on whether or not it should be added, but if it should, then let's do it in a separate PR. It's unrelated to the main change here.

Copy link
Member

Choose a reason for hiding this comment

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

would be *.opendb

@Trott
Copy link
Member

Trott commented Apr 5, 2016

@nodejs/testing @nodejs/platform-windows

@Trott Trott added windows Issues and PRs related to the Windows platform. test Issues and PRs related to the tests. labels Apr 5, 2016
@Trott
Copy link
Member

Trott commented Apr 5, 2016

@Trott
Copy link
Member

Trott commented Apr 5, 2016

Minus the .gitignore change, this LGTM

@mike-kaufman
Copy link
Author

reverted change to .gitignore.

@mike-kaufman
Copy link
Author

Opened a #6070 for the .gitignore change.

@mike-kaufman
Copy link
Author

So, what's the process here? I should squash commits & update the commit message to reflect reviewers & reference the PR, and then someone can merge in? Or is there something else I need to do?

@Trott
Copy link
Member

Trott commented Apr 6, 2016

@mike-kaufman Typically, stuff gets left open for 48 hours (longer if there's a weekend involved) before landing. So I think that's where it's at right now.

Squashing helps out a little bit, but if you don't do it, the person landing it will do it, so no big deal.

@mike-kaufman
Copy link
Author

Thanks @Trott. So who adds in the reviewer details & PR link to the commit message. Is that the person submitting the PR, or the person merging it in?

@Trott
Copy link
Member

Trott commented Apr 6, 2016

@mike-kaufman Usually the person merging it in.

'\\\\?\\' + process.cwd().toLowerCase());
const currentDeviceLetter = path.parse(process.cwd()).root.substring(0, 2);
assert.equal(path.win32._makeLong(currentDeviceLetter).toLowerCase(),
'\\\\?\\' + process.cwd().toLowerCase());
Copy link
Member

Choose a reason for hiding this comment

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

This last line was likely an oversight: I see only 2 added spaces, it was correct before.

@joaocgreis
Copy link
Member

LGTM minus comment. Thanks for contributing @mike-kaufman !

@mike-kaufman
Copy link
Author

Fixed indentation.

@benjamingr
Copy link
Member

@jasnell
Copy link
Member

jasnell commented Apr 7, 2016

LGTM

@benjamingr
Copy link
Member

Test failures look unrelated but I'm no 100% sure - @nodejs/build

@jbergstroem
Copy link
Member

Looks unrelated indeed. LGTM.

Trott pushed a commit to Trott/io.js that referenced this pull request Apr 8, 2016
A win32-only test was verifying that path.win32._makeLong('C:')
would return the current working directory.  This would only work if
current working directory was also on the C: device.  Fix is to grab
the device letter for current working directory, and pass that to
_makeLong().

PR-URL: nodejs#6067
Reviewed-By: Trott - Rich Trott <[email protected]>
Reviewed-By: Joao Reis <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
@Trott
Copy link
Member

Trott commented Apr 8, 2016

Landed in 1384de2

Thanks for the contribution, @mike-kaufman!

@Trott Trott closed this Apr 8, 2016
@mike-kaufman mike-kaufman deleted the mkaufman-test-fix-for-path branch April 13, 2016 21:53
MylesBorins pushed a commit that referenced this pull request Apr 19, 2016
A win32-only test was verifying that path.win32._makeLong('C:')
would return the current working directory.  This would only work if
current working directory was also on the C: device.  Fix is to grab
the device letter for current working directory, and pass that to
_makeLong().

PR-URL: #6067
Reviewed-By: Trott - Rich Trott <[email protected]>
Reviewed-By: Joao Reis <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
A win32-only test was verifying that path.win32._makeLong('C:')
would return the current working directory.  This would only work if
current working directory was also on the C: device.  Fix is to grab
the device letter for current working directory, and pass that to
_makeLong().

PR-URL: #6067
Reviewed-By: Trott - Rich Trott <[email protected]>
Reviewed-By: Joao Reis <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Apr 20, 2016
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
A win32-only test was verifying that path.win32._makeLong('C:')
would return the current working directory.  This would only work if
current working directory was also on the C: device.  Fix is to grab
the device letter for current working directory, and pass that to
_makeLong().

PR-URL: #6067
Reviewed-By: Trott - Rich Trott <[email protected]>
Reviewed-By: Joao Reis <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
This was referenced Apr 21, 2016
jasnell pushed a commit that referenced this pull request Apr 26, 2016
A win32-only test was verifying that path.win32._makeLong('C:')
would return the current working directory.  This would only work if
current working directory was also on the C: device.  Fix is to grab
the device letter for current working directory, and pass that to
_makeLong().

PR-URL: #6067
Reviewed-By: Trott - Rich Trott <[email protected]>
Reviewed-By: Joao Reis <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
path Issues and PRs related to the path subsystem. test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants