rust-lang / rust-lang/libc

ctest: Figure out a way to test private items

Open
#4,649 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ctest
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

We have some definitions that aren't crate-public but come from C, so we should probably test them. One idea about how to do this is to just paste private items into the output file, since we have the AST version available.

Mentioned at https://github.com/rust-lang/libc/pull/4610#discussion_r2272258882

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the ctest generation path, especially how the AST and output file are handled, and review the discussion linked from PR #4610. Determine a workable way to exercise private C-derived definitions; done means the approach is implemented and those definitions are covered by ctest without exposing them publicly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.