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

Two more testing improvements #317

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Commits on Aug 19, 2024

  1. tests: Fix extra - in should-fail tests

    I had an extra `-` at the end here which was being interpreted
    as an xattr...It turns out that `mkcomposefs` is liberal here
    in what it accepts (string parsing in C stinks) and interprets
    a missing `=` to be an xattr with the provided name, and
    no value.
    
    In this *specific* case that's an xattr with the name `-`.
    
    The Rust parser is stricter and rejects this (which I think
    is a good thing), and this is preparation for doing stronger
    verification on the Rust side before we start passing data
    into C.
    
    Signed-off-by: Colin Walters <walters@verbum.org>
    cgwalters committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    db7ce39 View commit details
    Browse the repository at this point in the history
  2. rust: Also test we fail to parse the should-fail- cases

    This way, callers of the Rust API get validation before
    we start passing things down to the C code.
    (To be clear, the C code also needs sanity tests, but
     it's way more reliable to test things on the Rust side)
    
    Signed-off-by: Colin Walters <walters@verbum.org>
    cgwalters committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    2a450b8 View commit details
    Browse the repository at this point in the history