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: convert test_encoding_binding.cc to a JS test #56791

Closed
wants to merge 2 commits into from

Conversation

legendecas
Copy link
Member

@legendecas legendecas commented Jan 27, 2025

test: convert test_encoding_binding.cc to a JS test

The cctest file test_encoding_binding.cc is never tested and it is
not a valid test. Binding functions should not be tested with V8 API
circumvented. A binding function should only be tested with JS calls.

test: search cctest files

To prevent a new cctest missing from the node.gyp, search cctest
files with tool search_files.py at configure time.

Refs: #55275

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels Jan 27, 2025
@legendecas
Copy link
Member Author

@anonrig @jasnell @lemire @RafaelGSS

Requesting original reviewer to review if the converted test is valid. The original cctest tests "invalid latin1" and expects an exception thrown. But there is no "invalid latin1" characters.

@legendecas legendecas changed the title test: search cctest files test: convert test_encoding_binding.cc to a JS test Jan 27, 2025
Copy link
Member

@lemire lemire left a comment

Choose a reason for hiding this comment

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

Sounds reasonable.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.21%. Comparing base (55cc372) to head (c639e65).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #56791   +/-   ##
=======================================
  Coverage   89.21%   89.21%           
=======================================
  Files         663      663           
  Lines      192002   192002           
  Branches    36928    36931    +3     
=======================================
+ Hits       171292   171294    +2     
+ Misses      13583    13569   -14     
- Partials     7127     7139   +12     

see 26 files with indirect coverage changes

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 27, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 27, 2025
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Jan 28, 2025

@targos targos added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 29, 2025
@legendecas legendecas added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Jan 29, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jan 29, 2025
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/56791
✔  Done loading data for nodejs/node/pull/56791
----------------------------------- PR info ------------------------------------
Title      test: convert test_encoding_binding.cc to a JS test (#56791)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     legendecas:cctest-scan-files -> nodejs:main
Labels     build, needs-ci, commit-queue-rebase
Commits    3
 - test: convert test_encoding_binding.cc to a JS test
 - test: search cctest files
 - fixup! test: search cctest files
Committers 1
 - Chengzhong Wu <[email protected]>
PR-URL: https://github.com/nodejs/node/pull/56791
Refs: https://github.com/nodejs/node/pull/55275
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Daniel Lemire <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/56791
Refs: https://github.com/nodejs/node/pull/55275
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Daniel Lemire <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Mon, 27 Jan 2025 15:44:01 GMT
   ✔  Approvals: 4
   ✔  - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/56791#pullrequestreview-2575833947
   ✔  - Daniel Lemire (@lemire): https://github.com/nodejs/node/pull/56791#pullrequestreview-2575840776
   ✔  - Richard Lau (@richardlau) (TSC): https://github.com/nodejs/node/pull/56791#pullrequestreview-2578108349
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/56791#pullrequestreview-2578763757
   ⚠  This PR has conflicts that must be resolved
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2025-01-28T10:44:43Z: https://ci.nodejs.org/job/node-test-pull-request/64794/
- Querying data for job/node-test-pull-request/64794/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/13035060751

The cctest file `test_encoding_binding.cc` is never tested and it is
not a valid test. Binding functions should never be tested with V8 API
circumvented. A binding function should only be tested with JS calls.
To prevent a new cctest missing from the `node.gyp`, search cctest
files with tool `search_files.py` at configure time.
@legendecas
Copy link
Member Author

Rebased to address conflicts.

@legendecas legendecas added request-ci Add this label to start a Jenkins CI on a PR. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Jan 29, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 29, 2025
@nodejs-github-bot
Copy link
Collaborator

@legendecas legendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 29, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 29, 2025
@nodejs-github-bot
Copy link
Collaborator

Landed in 1b2a966...82ac335

nodejs-github-bot pushed a commit that referenced this pull request Jan 29, 2025
The cctest file `test_encoding_binding.cc` is never tested and it is
not a valid test. Binding functions should never be tested with V8 API
circumvented. A binding function should only be tested with JS calls.

PR-URL: #56791
Refs: #55275
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Daniel Lemire <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Jan 29, 2025
To prevent a new cctest missing from the `node.gyp`, search cctest
files with tool `search_files.py` at configure time.

PR-URL: #56791
Refs: #55275
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Daniel Lemire <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@legendecas legendecas deleted the cctest-scan-files branch January 29, 2025 21:55
lpinca added a commit to lpinca/node that referenced this pull request Jan 30, 2025
Handle cases where the path the the Python executable contains spaces.

Refs: nodejs#56791
lpinca added a commit to lpinca/node that referenced this pull request Jan 30, 2025
Handle cases where the path to the Python executable contains spaces.

Refs: nodejs#56791
nodejs-github-bot pushed a commit that referenced this pull request Jan 31, 2025
Handle cases where the path to the Python executable contains spaces.

Refs: #56791
PR-URL: #56826
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Stefan Stojanovic <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
targos pushed a commit that referenced this pull request Feb 2, 2025
The cctest file `test_encoding_binding.cc` is never tested and it is
not a valid test. Binding functions should never be tested with V8 API
circumvented. A binding function should only be tested with JS calls.

PR-URL: #56791
Refs: #55275
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Daniel Lemire <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this pull request Feb 2, 2025
To prevent a new cctest missing from the `node.gyp`, search cctest
files with tool `search_files.py` at configure time.

PR-URL: #56791
Refs: #55275
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Daniel Lemire <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
targos pushed a commit that referenced this pull request Feb 2, 2025
Handle cases where the path to the Python executable contains spaces.

Refs: #56791
PR-URL: #56826
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Stefan Stojanovic <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants