Skip to content

ctest: change API of when to skip #4122

Open
@tgross35

Description

@tgross35

Currently our config looks a bit like this:

    cfg.skip_field(move |struct_, field| {
        (struct_ == "siginfo_t" && field == "_pad") ||
        (musl && struct_ == "glob_t" && field == "gl_flags") ||
        // ...
    });

A problem is that we have no validation that e.g. _pad actually exists in siginfo_t. It would be better to have something like the following:

cfg.skip_field(&[
    // format: `(struct, field, extra_condition)`
    ("siginfo_t", "_pad", true),
    ("glob_t", "gl_flags", musl),
])

This would skip if any any of the entries match struct and field, and the condition for that row is true. However, it could also warn if any of those items are never used meaning the struct or field don't exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-testsuitectestIssues relating to the ctest crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions