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

Merge the ctest2 repository into libc #4283

Open
wants to merge 353 commits into
base: main
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

libc's testing is pretty tightly coupled to ctest2, which is a reasonably simple crate that maps Rust syntax to C syntax and creates tests based off of that. ctest2 itself is a fork of ctest.

Unfortunately, relying on ctest(2) has been somewhat of a problem since it supports only a very outdated version of Rust's syntax, and there are a handful of other bugs. There have been some GSoC proposals to modernize libc and its test crates; moving ctest to a rust-lang repo makes that easier and should come with some maintenance benefits.

On Zulip, @alexcrichton confirmed ownership of the original ctest crate could be transferred to rust-lang so we can continue publishing under that name, for other repos that make use of ctest/ctest2.

This pull only brings over the repo source and history as it currently exists. I will need to follow up with integration of the CI and release workflows.

alexcrichton and others added 30 commits April 10, 2018 21:09
Add target_endian to the set of #[cfg()] items that are considered.
Add support for unions without typedefs
Being able to call `const fn` on stable is a relatively new addition.

CC rust-lang#1075
Revert bump in the minimum supported Rust version
Minimal support for fn types in extern statics
Add support for arrays in extern statics
Skip signedness checks for type aliases of non-integer types
JohnTitor and others added 18 commits December 1, 2024 15:32
Signed-off-by: Florian Bartels <[email protected]>
Add support for alternative network stack io-sock on QNX 7.1
fix: Declare explicit "C" ABI on `extern` blocks/fns
Prepare for merging into `libc` by moving everything to a subdirectory
so names do not conflict.
Absorb the `ctest2` project and its history into `libc`.

Original HEAD: https://github.com/JohnTitor/ctest2.git
Latest HEAD ref: 0563471
We will be able to publish the crate under the original `ctest` name, so
update its name and URLS here.
@rustbot
Copy link
Collaborator

rustbot commented Feb 22, 2025

@tgross35: no appropriate reviewer found, use r? to override

@tgross35
Copy link
Contributor Author

tgross35 commented Feb 22, 2025

@JohnTitor would you be okay with libc absorbing ctest2, or do you have any concerns? You can continue to maintain it here if you wish of course.

@tgross35
Copy link
Contributor Author

Also, does anyone know of a better way to merge unrelated histories? The blame works fine but the log appears empty.

@alexcrichton
Copy link
Member

I think I've done something like this in the past using git filter-branch which rewrites the history as-if it all happened in a subfolder which should help with log/blame by ensuring the filenames don't change abruptly

@tgross35
Copy link
Contributor Author

r? @JohnTitor

I of course don't want to poach your fork without your okay, so I'll assign you :) if you're fine going forward, I'll get the history better integrated as Alex suggested before merging.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

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

Yeah, no objection. Thank you!

@JohnTitor
Copy link
Member

JohnTitor commented Mar 1, 2025

Some crates use ctest2 in their tests, so maybe I should add a deprecation notice and encourage to migrate in the ctest2 once the ctest supports the modern Rust.

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

Successfully merging this pull request may close these issues.