Skip to content

flaky: test-fs-cp #56794

Description

@mhdawson

Test

test-fs-cp

Platform

Windows x64

Console output

not ok 304 parallel/test-fs-cp
12:01:46   ---
12:01:46   duration_ms: 520.01000
12:01:46   severity: fail
12:01:46   exitcode: 1
12:01:46   stack: |-
12:01:46     node:assert:128
12:01:46       throw new AssertionError(obj);
12:01:46       ^
12:01:46     
12:01:46     AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
12:01:46     + actual - expected
12:01:46     
12:01:46     + 'ERR_FS_EISDIR'
12:01:46     - 'ERR_FS_CP_EINVAL'
12:01:46               ^
12:01:46     
12:01:46         at file:///c:/workspace/node-test-binary-windows-js-suites/node/test/parallel/test-fs-cp.mjs:687:12
12:01:46         at c:\workspace\node-test-binary-windows-js-suites\node\test\common\index.js:491:15
12:01:46         at node:fs:190:23
12:01:46         at callbackifyOnRejected (node:util:230:10)
12:01:46         at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
12:01:46       generatedMessage: true,
12:01:46       code: 'ERR_ASSERTION',
12:01:46       actual: 'ERR_FS_EISDIR',
12:01:46       expected: 'ERR_FS_CP_EINVAL',
12:01:46       operator: 'strictEqual'
12:01:46     }
12:01:46     
12:01:46     Node.js v24.0.0-pre
12:01:46   ...

Build links

Additional information

No response

Activity

  1. added
    flaky-testIssues and PRs involving tests that fail intermittently in CI.
    on Jan 27, 2025
  2. mhdawson commented on Jan 27, 2025

    @mhdawson
    MemberAuthor

    This might not be a flaky test since it failed even after a resume.
    https://ci.nodejs.org/job/node-test-binary-windows-js-suites/32313/

  3. StefanStojanovic commented on Jan 28, 2025

    @StefanStojanovic
    Contributor

    This test seems to have failure bursts (https://github.com/nodejs/reliability/issues?q=is%3Aissue%20state%3Aopen%20test-fs-cp). In each, there were a few PRs with all the failures.

    However this time it is different, there are many different PRs affected by that and it only happens on Windows 11. We checked this and are fairly certain that this is caused by the latest Windows 11 updates (most likely will fail the same way on Windows 2025). Based on all of that I'll open a PR marking this test as flaky on Windows and will investigate it once it is no longer causing CI failures.

  4. added a commit that references this issue on Feb 2, 2025
  5. huseyinacacak-janea commented on Feb 18, 2025

    @huseyinacacak-janea
    Contributor

    I opened 2 PRs (libuv/libuv#4696 and libuv/libuv#4698) in libuv and they landed. When a new version of libuv is released and merged into Node, this should be fixed.

  6. added a commit that references this issue on Apr 2, 2025
  7. joyeecheung commented on Jul 16, 2025

    @joyeecheung
    Member

    Both libuv PRs have been present in the main branch but the test still seems very flaky: they are currently failing in almost all Windows CIs https://ci.nodejs.org/job/node-test-binary-windows-js-suites/

  8. joyeecheung commented on Jul 25, 2025

    @joyeecheung
    Member

    This seems to almost always fail now. I think we should consider splitting it and skipping the always failing test case, otherwise it will make the CI indefinitely orange.

  9. added a commit that references this issue on Aug 10, 2025
  10. targos commented on Aug 24, 2025

    @targos
    Member

    I tried to add some logs and compile on Windows:

    diff --git a/src/node_file.cc b/src/node_file.cc
    index 44b4d4595e4..26e74814b64 100644
    --- a/src/node_file.cc
    +++ b/src/node_file.cc
    @@ -3591,6 +3591,8 @@ static void CpSyncCopyDir(const FunctionCallbackInfo<Value>& args) {
             std::filesystem::copy_file(
                 dir_entry.path(), dest_file_path, file_copy_opts, error);
             if (error) {
    +          std::cout << error.message();
    +          printf("Error code: %d\n", error.value());
               if (error.value() == EEXIST) {
                 THROW_ERR_FS_CP_EEXIST(isolate,
                                        "[ERR_FS_CP_EEXIST]: Target already exists: "

    out/Debug/node test/parallel/test-fs-cp-sync-error-on-exist.mjs prints:

    Le fichier existe.Error code: 80
    

    So the builtin error message says that the file exists, but the error code is not EEXIST.
    According to errno.h in Visual Studio, it is #define STRUNCATE 80.

  11. added a commit that references this issue on Sep 20, 2025
  12. github-actions commented on Apr 22, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  13. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Apr 22, 2026
  14. github-actions commented on May 22, 2026

    @github-actions
    Contributor

    This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
    If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    flaky-testIssues and PRs involving tests that fail intermittently in CI.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions