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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't mean to delete all of the original ctest right now :), only that you can swap a target from ctest to ctest-next rather than running both for that specific target

Comment on lines +840 to +843
// Windows uppercase structs don't have `struct` in fr.into()ont:
t if ty.chars().next().unwrap().is_uppercase() => t.to_string().into(),
"stat" => "struct __stat64".to_string().into(),
"utimbuf" => "struct __utimbuf64".to_string().into(),
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the difference with original ctest here?

_ => 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

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 S-waiting-on-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants