memorysafety / memorysafety/rav1d

Port test data tests to Rust

Open
#77 3 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #153 by @thedataking — merged
idiomaticity testing
Dominant language
Assembly
Stars
643
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Currently we're running the test data tests by hacking the Meson test runner to invoke the rav1d Rust executable instead of the dav1d C executable. This is good enough for testing locally and in CI, but it's not ideal for a few reasons:

  • Not idiomatic Rust, would be better to use cargo test.
  • Doesn't automatically rebuild, you have to remember to run cargo build --release before running tests or they'll run against an out-of-date binary.
  • Runs against release builds instead of debug builds, which makes debugging harder.
  • We don't want to have to maintain the Meson scripts long term.
  • It would also be good to have some examples of invoking rav1d from Rust, and writing Rust tests would be a good way of doing that.

We should port these tests over to the standard Rust test harness so that we can run our test suite with cargo test. Since there are 790 test files, this is probably best done by writing a one-off script to generate a test for each file, along with the correct MD5 checksums.

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 inspecting the current Meson test-runner setup and the existing test-data files, then run the current cargo test and rav1d test commands to compare behavior. Generate coverage for all 790 files with the correct MD5 checksums, and confirm the suite runs through the standard Rust test harness without requiring the Meson workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.