Skip to content

test: Test surrogate pair filenames on windows - #51800

Closed
mertcanaltin wants to merge 13 commits into
nodejs:mainfrom
mertcanaltin:dev-51789
Closed

mertcanaltin wants to merge 13 commits into
nodejs:mainfrom
mertcanaltin:dev-51789

Conversation

@mertcanaltin

@mertcanaltin mertcanaltin commented Feb 18, 2024 •

Copy link
Copy Markdown
Member

This PR adds a test to verify the handling of filenames containing surrogate pairs on the Windows operating system. Existing tests didn't focus specifically on filenames containing surrogate pairs, so adding this test will help determine if file system operations work correctly with such filenames.

Fixes: #51789

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. labels Feb 18, 2024
Comment thread test/common/file-ops-with-surrogate-pairs-on-windows.js Outdated
Comment thread test/common/file-ops-with-surrogate-pairs-on-windows.js Outdated
Comment thread test/common/file-ops-with-surrogate-pairs-on-windows.js Outdated
Comment thread test/common/file-ops-with-surrogate-pairs-on-windows.js Outdated
Comment thread test/common/file-ops-with-surrogate-pairs-on-windows.js Outdated
Mert Can Altın and others added 5 commits February 19, 2024 09:14
@mertcanaltin

ghost commented Feb 19, 2024

Copy link
Copy Markdown
Member Author

thank you very much I applied what you said @anonrig

@mertcanaltin
mertcanaltin requested a review from anonrig February 19, 2024 08:30

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

Can you please use tmpdir from ../common/tmpdir so files can be deleted even if the test fails?

Comment thread test/common/file-operations-with-surrogate-pairs.js Outdated
Comment thread test/common/file-operations-with-surrogate-pairs.js Outdated
@mertcanaltin

ghost commented Feb 19, 2024

Copy link
Copy Markdown
Member Author

Can you please use tmpdir from ../common/tmpdir so files can be deleted even if the test fails?

I tried it, I hope I used it right.

@mertcanaltin
mertcanaltin requested a review from aduh95 February 19, 2024 13:55
Comment thread test/parallel/fs-operations-with-surrogate-pairs.js Outdated
Comment thread test/parallel/fs-operations-with-surrogate-pairs.js Outdated
Mert Can Altın and others added 2 commits February 19, 2024 19:17
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@mertcanaltin
mertcanaltin requested a review from aduh95 February 20, 2024 14:17
@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Feb 20, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Feb 20, 2024
@nodejs-github-bot

ghost commented Feb 27, 2024

Copy link
Copy Markdown
Collaborator

@richardlau richardlau added the commit-queue-squash PRs the Commit Queue should land as one squashed commit. label Feb 27, 2024
@marco-ippolito marco-ippolito added the commit-queue PRs queued for automated landing through the Commit Queue. label Feb 28, 2024
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Feb 28, 2024
@nodejs-github-bot

ghost commented Feb 28, 2024

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/51800
✔  Done loading data for nodejs/node/pull/51800
----------------------------------- PR info ------------------------------------
Title      test: Test surrogate pair filenames on windows (#51800)
Author     Mert Can Altın  (@mertcanaltin)
Branch     mertcanaltin:dev-51789 -> nodejs:main
Labels     test, needs-ci, commit-queue-squash
Commits    13
 - test: test surrogate pair filenames on windows
 - lint
 - Update test/common/file-ops-with-surrogate-pairs-on-windows.js
 - Update test/common/file-ops-with-surrogate-pairs-on-windows.js
 - Update test/common/file-ops-with-surrogate-pairs-on-windows.js
 - fix: test rename & repair
 - fix: un used os
 - Update file-operations-with-surrogate-pairs.js
 - feat: moved test file to parallel path
 - :Merge branch 'dev-51789' of https://github.com/mertcanaltin/node int…
 - fix: used tmpdir
 - Update fs-operations-with-surrogate-pairs.js
 - Update fs-operations-with-surrogate-pairs.js
Committers 2
 - Mert Can Altin 
 - GitHub 
PR-URL: https://github.com/nodejs/node/pull/51800
Fixes: https://github.com/nodejs/node/issues/51789
Reviewed-By: Luigi Pinca 
Reviewed-By: Antoine du Hamel 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Marco Ippolito 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/51800
Fixes: https://github.com/nodejs/node/issues/51789
Reviewed-By: Luigi Pinca 
Reviewed-By: Antoine du Hamel 
Reviewed-By: Yagiz Nizipli 
Reviewed-By: Marco Ippolito 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sun, 18 Feb 2024 15:47:47 GMT
   ✔  Approvals: 4
   ✔  - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/51800#pullrequestreview-1891479480
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/51800#pullrequestreview-1892301830
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/51800#pullrequestreview-1904754883
   ✔  - Marco Ippolito (@marco-ippolito): https://github.com/nodejs/node/pull/51800#pullrequestreview-1906283848
   ⚠  GitHub cannot link the author of 'test: test surrogate pair filenames on windows' to their GitHub account.
   ⚠  Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork
   ⚠  GitHub cannot link the author of 'lint' to their GitHub account.
   ⚠  Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork
   ⚠  GitHub cannot link the author of 'fix: test rename & repair' to their GitHub account.
   ⚠  Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork
   ⚠  GitHub cannot link the author of 'fix: un used os' to their GitHub account.
   ⚠  Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork
   ⚠  GitHub cannot link the author of 'feat: moved test file to parallel path' to their GitHub account.
   ⚠  Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork
   ⚠  GitHub cannot link the author of ':Merge branch 'dev-51789' of https://github.com/mertcanaltin/node int…' to their GitHub account.
   ⚠  Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork
   ⚠  GitHub cannot link the author of 'fix: used tmpdir' to their GitHub account.
   ⚠  Please suggest them to take a look at https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2024-02-27T19:48:52Z: https://ci.nodejs.org/job/node-test-pull-request/57476/
- Querying data for job/node-test-pull-request/57476/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
   2f01f02ac6..8a94177eb9  main       -> origin/main
✔  origin/main is now up-to-date
main is out of sync with origin/main. Mismatched commits:
 - 96354891a0 meta: move one or more collaborators to emeritus
 - 8a94177eb9 meta: move one or more collaborators to emeritus
--------------------------------------------------------------------------------
HEAD is now at 8a94177eb9 meta: move one or more collaborators to emeritus
   ✔  Reset to origin/main
- Downloading patch for 51800
From https://github.com/nodejs/node
 * branch                  refs/pull/51800/merge -> FETCH_HEAD
✔  Fetched commits as 8a94177eb984..b91c291fd769
--------------------------------------------------------------------------------
[main c9623f9291] test: test surrogate pair filenames on windows
 Author: Mert Can Altin 
 Date: Sun Feb 18 18:46:43 2024 +0300
 1 file changed, 49 insertions(+)
 create mode 100644 test/common/file-ops-with-surrogate-pairs-on-windows.js
[main 2099d684e6] lint
 Author: Mert Can Altin 
 Date: Sun Feb 18 21:03:50 2024 +0300
 1 file changed, 2 insertions(+), 2 deletions(-)
[main c547fc5ad7] Update test/common/file-ops-with-surrogate-pairs-on-windows.js
 Author: Mert Can Altın 
 Date: Mon Feb 19 09:14:11 2024 +0300
 1 file changed, 1 insertion(+), 1 deletion(-)
[main 1b7e376894] Update test/common/file-ops-with-surrogate-pairs-on-windows.js
 Author: Mert Can Altın 
 Date: Mon Feb 19 09:14:16 2024 +0300
 1 file changed, 1 insertion(+), 1 deletion(-)
[main 87ee1fa84e] Update test/common/file-ops-with-surrogate-pairs-on-windows.js
 Author: Mert Can Altın 
 Date: Mon Feb 19 09:14:36 2024 +0300
 1 file changed, 1 insertion(+), 1 deletion(-)
[main dd97181dca] fix: test rename & repair
 Author: Mert Can Altin 
 Date: Mon Feb 19 09:24:11 2024 +0300
 1 file changed, 3 insertions(+), 9 deletions(-)
 rename test/common/{file-ops-with-surrogate-pairs-on-windows.js => file-operations-with-surrogate-pairs.js} (78%)
[main 3c4d856768] fix: un used os
 Author: Mert Can Altin 
 Date: Mon Feb 19 09:29:51 2024 +0300
 1 file changed, 8 insertions(+), 3 deletions(-)
[main 98db540834] Update file-operations-with-surrogate-pairs.js
 Author: Mert Can Altın 
 Date: Mon Feb 19 15:26:41 2024 +0300
 1 file changed, 2 insertions(+), 2 deletions(-)
error: commit b75b7c0301809a217802a967104aabd011fcd657 is a merge but no -m option was given.
fatal: cherry-pick failed
[main 491cdb24cf] feat: moved test file to parallel path
 Author: Mert Can Altin 
 Date: Mon Feb 19 16:16:52 2024 +0300
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename test/{common/file-operations-with-surrogate-pairs.js => parallel/fs-operations-with-surrogate-pairs.js} (100%)
   ✘  Failed to apply patches
https://github.com/nodejs/node/actions/runs/8081292275

@richardlau

ghost commented Feb 28, 2024

Copy link
Copy Markdown
Member

Landed in 8e7da60.

FYI I renamed the test to prepend test- (i.e. test-fs-operations-with-surrogate-pairs.js) so that it is consistent with the other existing tests.

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

Labels

commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. commit-queue-squash PRs the Commit Queue should land as one squashed commit. needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for filenames with surrogate pairs on Windows

8 participants