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-permission-deny-fs-wildcard always fails during coverage-windows GitHub action #47093

Closed
tniessen opened this issue Mar 14, 2023 · 1 comment · Fixed by #47095
Closed
Labels
permission Issues and PRs related to the Permission Model test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform.

Comments

@tniessen
Copy link
Member

While looking at the logs of #47091, I noticed that test-permission-deny-fs-wildcard appears to always fail during the coverage-windows GitHub action:

not ok 2199 parallel/test-permission-deny-fs-wildcard
  ---
  duration_ms: 0.180
  severity: fail
  exitcode: 1
  stack: |-
    node:assert:125
      throw new AssertionError(obj);
      ^
    
    AssertionError [ERR_ASSERTION]: Missing expected exception.
        at Object.<anonymous> (D:\a\node\node\test\parallel\test-permission-deny-fs-wildcard.js:49:10)
        at Module._compile (node:internal/modules/cjs/loader:1287:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1341:10)
        at Module.load (node:internal/modules/cjs/loader:1145:32)
        at Module._load (node:internal/modules/cjs/loader:984:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
        at node:internal/main/run_main_module:23:47 {
      generatedMessage: false,
      code: 'ERR_ASSERTION',
      actual: undefined,
      expected: [Function (anonymous)],
      operator: 'throws'
    }
    
    Node.js v20.0.0-pre
  ...

This happens on the main branch, too.

@tniessen tniessen added windows Issues and PRs related to the Windows platform. test Issues and PRs related to the tests. labels Mar 14, 2023
@tniessen
Copy link
Member Author

Oh, this seems surprisingly simple. The test incorrectly assumes that path.resolve('/') === 'C:\\', which is not true in general. GitHub actions seem to use D:\ as the working directory.

tniessen added a commit to tniessen/node that referenced this issue Mar 14, 2023
The test fails on Windows when the working directory is not on a 'C:'
drive. For example, it always fails during the coverage-windows GitHub
action, which runs tests on drive 'D:'.

Fixes: nodejs#47093
nodejs-github-bot pushed a commit that referenced this issue Mar 15, 2023
The test fails on Windows when the working directory is not on a 'C:'
drive. For example, it always fails during the coverage-windows GitHub
action, which runs tests on drive 'D:'.

Fixes: #47093
PR-URL: #47095
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
@tniessen tniessen added the permission Issues and PRs related to the Permission Model label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
permission Issues and PRs related to the Permission Model 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.

1 participant