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-require-symlink error on Windows 10 #23596

Closed
S0ulDrag0n opened this issue Oct 12, 2018 · 4 comments · Fixed by #23691
Closed

test-require-symlink error on Windows 10 #23596

S0ulDrag0n opened this issue Oct 12, 2018 · 4 comments · Fixed by #23691
Labels
test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform.

Comments

@S0ulDrag0n
Copy link

  • Version: v10.3.0
  • Platform: 64-bit (Windows)
  • Subsystem: vsbuild test
running 'python tools\test.py --mode=release  -J default doctool addons addons-napi'
Skipping pseudo-tty tests, as pseudo terminals are not available on Windows.
=== release test-require-symlink ===
Path: parallel/test-require-symlink
assert.js:86
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected

+ 'INCORRECT_VERSION'
- 'CORRECT_VERSION'
    at test (C:\Users\s0ul-\Documents\Github\node\node\test\parallel\test-require-symlink.js:69:10)
    at Object.<anonymous> (C:\Users\s0ul-\Documents\Github\node\node\test\parallel\test-require-symlink.js:60:1)
    at Module._compile (internal/modules/cjs/loader.js:706:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:717:10)
    at Module.load (internal/modules/cjs/loader.js:604:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:543:12)
    at Function.Module._load (internal/modules/cjs/loader.js:535:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:759:12)
    at startup (internal/bootstrap/node.js:303:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:866:3)
Command: C:\Users\s0ul-\Documents\Github\node\node\Release\node.exe --preserve-symlinks C:\Users\s0ul-\Documents\Github\node\node\test\parallel\test-require-symlink.js
=== release test-tty-stdin-pipe ===
Path: parallel/test-tty-stdin-pipee test-url-format-invalid-input
Command: C:\Users\s0ul-\Documents\Github\node\node\Release\node.exe C:\Users\s0ul-\Documents\Github\node\node\test\parallel\test-tty-stdin-pipe.js
--- TIMEOUT ---

This issue occurs when running the tests on Windows with Windows Defender Firewall off while connected to a wireless network. This was executed in a command prompt with administrator privileges on Windows 10 ver 1803 (build 17134.345).

@S0ulDrag0n S0ulDrag0n changed the title test-require-symlink test-require-symlink error on Windows 10 Oct 12, 2018
@spectacularGavin
Copy link

spectacularGavin commented Oct 12, 2018

I had the same error when you have Symlink permissions when running as Administrator. Since admin has symlink permissions. The test seems to skip when you do not have symlink permissions.

The return value required by the fooModule (foo.js within the tmp dir)

{ 
	dep1: { 
		bar: { 
			version: 'CORRECT_VERSION' 
		},
		dep2: { 
			bar: { 
				version: 'INCORRECT_VERSION' 
			} 
		} 
	},
	dep2: { 
		bar: { 
			version: 'INCORRECT_VERSION' 
		} 
	} 
}

Looks like dep2,js requires the incorrect bar.js

@ChALkeR ChALkeR added windows Issues and PRs related to the Windows platform. test Issues and PRs related to the tests. labels Oct 12, 2018
@S0ulDrag0n
Copy link
Author

I've re-ran it again without administrative privileges. One error did come up relating to a parallel HTTP test if I remember correctly. However after running it again after and subsequently, the error is not showing up any more so I am unfortunately unable to report that one.

@spectacularGavin
Copy link

After a bit of digging, it seems that module-require-symlink\node_modules\dep1\node_modules\dep2 is linked two levels down to module-require-symlink\node_modules\dep2. I'm not quite sure how require resolves it's path but since module-require-symlink\node_modules\dep2 has no node_modules\bar it resolved to module-require-symlink\node_modules\bar which has the incorrect version. I apologize in advance if I'm just spouting nonsense here.

@bzoz
Copy link
Contributor

bzoz commented Oct 16, 2018

Fix in #23691, thanks for reporting this!

refack pushed a commit to JaneaSystems/node that referenced this issue Oct 23, 2018
Creating directory symlinks on Windows require 'dir' parameter to be
provided.

Fixes: nodejs#23596

PR-URL: nodejs#23691
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this issue Oct 24, 2018
Creating directory symlinks on Windows require 'dir' parameter to be
provided.

Fixes: #23596

PR-URL: #23691
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 26, 2018
Creating directory symlinks on Windows require 'dir' parameter to be
provided.

Fixes: #23596

PR-URL: #23691
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 26, 2018
Creating directory symlinks on Windows require 'dir' parameter to be
provided.

Fixes: #23596

PR-URL: #23691
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
rvagg pushed a commit that referenced this issue Nov 28, 2018
Creating directory symlinks on Windows require 'dir' parameter to be
provided.

Fixes: #23596

PR-URL: #23691
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
rvagg pushed a commit that referenced this issue Nov 28, 2018
Creating directory symlinks on Windows require 'dir' parameter to be
provided.

Fixes: #23596

PR-URL: #23691
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Nov 29, 2018
Creating directory symlinks on Windows require 'dir' parameter to be
provided.

Fixes: #23596

PR-URL: #23691
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.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 the tests. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants