rust-lang / rust-lang/libc

`pid_type` and `proc_cm_event` are not tested.

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

Nobody has claimed this yet.

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

Description

The previous ctest for inexplicable reasons hid the definitions of C enums when expanding macros and thus didn't test any C enum types. Now that the new ctest is able to test these types, it has been found that the pid_type and proc_cm_event C enums cannot be accessed on the C side, despite the correct headers being included.

It is suspected that the issue is because these types are not made public to user space C code, which is what is used for the tests.

I'm not exactly sure how this could be fixed.

This was first found in #4647.

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 with the new ctest that exposed the missing enum coverage, then inspect the headers and user-space C test setup involved in #4647. Trace how pid_type and proc_cm_event are exposed to C and compare that with the Rust bindings. Done means both enum types are accessible from the C side and are covered by the tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, rust
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.