Skip to content

libc-test: port windows to use ctest-next#4600

Merged
tgross35 merged 1 commit intorust-lang:mainfrom
mbyx:libc-test-windows-port
Aug 12, 2025
Merged

libc-test: port windows to use ctest-next#4600
tgross35 merged 1 commit intorust-lang:mainfrom
mbyx:libc-test-windows-port

Conversation

@mbyx
Copy link
Contributor

@mbyx mbyx commented Jul 30, 2025

Description

This PR adds support for testing the windows platform using ctest-next as well as the original ctest. A minor bug was also fixed along the way, where we have some public primitive types that aren't available in C (this can be fixed with skips instead as well).

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot rustbot added ctest Issues relating to the ctest crate S-waiting-on-review labels Jul 30, 2025
@mbyx mbyx force-pushed the libc-test-windows-port branch from d4e8842 to 5771cf0 Compare July 30, 2025 06:55
@rustbot rustbot added the A-CI Area: CI-related items label Jul 30, 2025
@mbyx mbyx force-pushed the libc-test-windows-port branch 4 times, most recently from 809ef9f to 0306748 Compare July 30, 2025 07:41
@mbyx
Copy link
Contributor Author

mbyx commented Jul 30, 2025

Not sure what the arm-linux-androideabi is about. Also since ctest-next is more specific about renaming and skipping types it is possible I might put say a struct type in a rename union type block accidentally, and I wouldn't be able to figure it out.

@mbyx mbyx force-pushed the libc-test-windows-port branch 3 times, most recently from 1692d40 to 9428748 Compare August 2, 2025 13:22
@mbyx mbyx force-pushed the libc-test-windows-port branch 8 times, most recently from ab9e478 to 3dbb7a5 Compare August 7, 2025 07:32
@tgross35
Copy link
Contributor

Fyi, once #4594 and #4601 merge, I'm happy to just replace the existing ctest impls rather than keeping both for a little while

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

(updating the status)

@mbyx mbyx force-pushed the libc-test-windows-port branch 3 times, most recently from 89bbc29 to 3dcc655 Compare August 12, 2025 10:29
@mbyx mbyx force-pushed the libc-test-windows-port branch from 3dcc655 to 8f770d3 Compare August 12, 2025 10:32
@mbyx mbyx requested a review from tgross35 August 12, 2025 10:38
_ => None,
}
});
cfg.rename_type(move |ty| {
Copy link
Contributor

Choose a reason for hiding this comment

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

In ctest we should rename this function rename_alias or rename_type_alias, I was thinking it handled all types for a bit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It handles all non struct and union types, we don't actually have a rename_alias method (although we can add it), since ctest doesn't use it. But rename_alias would be a different method (rename_type uses MapInput::Type, rename_alias would use MapInput::Alias).

Copy link
Contributor

Choose a reason for hiding this comment

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

Is rename_type just a catch-all for renaming anything? If so, tbh I think we should remove it: it's better to be more specific about what you expect to rename

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

🎉 🎉 goodbye old ctest!

@tgross35 tgross35 added this pull request to the merge queue Aug 12, 2025
Merged via the queue into rust-lang:main with commit acd869f Aug 12, 2025
49 of 52 checks passed
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Sep 19, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 19, 2025
(backport <rust-lang#4600>)
(cherry picked from commit acd869f)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 19, 2025
(backport <rust-lang#4600>)
(cherry picked from commit acd869f)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 19, 2025
(backport <rust-lang#4600>)
(cherry picked from commit acd869f)
@tgross35 tgross35 mentioned this pull request Sep 19, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 19, 2025
(backport <#4600>)
(cherry picked from commit acd869f)
github-merge-queue bot pushed a commit that referenced this pull request Sep 19, 2025
(backport <#4600>)
(cherry picked from commit acd869f)
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI-related items ctest Issues relating to the ctest crate stable-applied This PR has been cherry-picked to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants