Skip to content

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

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

Merged
merged 1 commit into from
Aug 12, 2025

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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants