Skip to content

test(libmlx): add enumerated table-driven cases to raise coverage#2516

Merged
chet merged 1 commit into
NVIDIA:mainfrom
chet:libmlx-test-improve-coverage
Jun 12, 2026
Merged

test(libmlx): add enumerated table-driven cases to raise coverage#2516
chet merged 1 commit into
NVIDIA:mainfrom
chet:libmlx-test-improve-coverage

Conversation

@chet

@chet chet commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

This adds table-driven coverage tests across libmlx using the carbide-test-support framework, increasing line coverage from 50 -> 80%, and function coverage from 58 -> 81%. The embedded mlxconfig parsers, variable value/spec/registry conversions and validators, runner result types, JSON parsing, profile (de)serialization, and lockdown serialization.

The idea is to simply, and more comprehensively, enumerate input variants into the existing check_cases/check_values tables, targeting the code being tested.

Coverage (cargo-llvm-cov), before (origin/main) vs after, with function and line converage increasing to ~80%.

  ┌──────────┬──────────────────────┬───────────────┐
  │  Metric  │ Before (origin/main) │ After (this)  │
  ├──────────┼──────────────────────┼───────────────┤
  │ Region   │ 48.61%               │ 73.86%        │
  ├──────────┼──────────────────────┼───────────────┤
  │ Function │ 58.15%               │ 81.93%        │
  ├──────────┼──────────────────────┼───────────────┤
  │ Line     │ 50.18%               │ 81.12%        │
  └──────────┴──────────────────────┴───────────────┘

The remaining uncovered surface is mostly IO related, which needs dry-run/mock harnessing rather than additional table rows.

All tests pass and clippy is clean.

Signed-off-by: Chet Nichols III chetn@nvidia.com

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

This adds table-driven coverage tests across `libmlx` using the
`carbide-test-support` framework. The embedded `mlxconfig` parsers,
variable value/spec/registry conversions and validators, runner result
types, JSON parsing, profile (de)serialization, and lockdown serialization.

The idea is to simply, and more comprehensively, enumerate input variants
into the existing `check_cases`/`check_values` tables, targeting the code
being tested.

Coverage (cargo-llvm-cov), before (origin/main) vs after, with function and
line converage increasing to ~80%.

```
  ┌──────────┬──────────────────────┬───────────────┐
  │  Metric  │ Before (origin/main) │ After (this)  │
  ├──────────┼──────────────────────┼───────────────┤
  │ Region   │ 48.61%               │ 73.86%        │
  ├──────────┼──────────────────────┼───────────────┤
  │ Function │ 58.15%               │ 81.93%        │
  ├──────────┼──────────────────────┼───────────────┤
  │ Line     │ 50.18%               │ 81.12%        │
  └──────────┴──────────────────────┴───────────────┘
```

The remaining uncovered surface is mostly IO related, which
needs dry-run/mock harnessing rather than additional table rows.

All tests pass and clippy is clean.

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet chet requested a review from a team as a code owner June 12, 2026 16:32
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0aa7e456-f343-4c00-8fe1-92c55b03e607

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@chet chet merged commit 4f927d2 into NVIDIA:main Jun 12, 2026
51 checks passed
@chet chet mentioned this pull request Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants