Skip to content

dd: quote invalid status level - #13923

Open
Xylphy wants to merge 1 commit into
uutils:mainfrom
Xylphy:fix/dd-quote-invalid-status-level
Open

dd: quote invalid status level#13923
Xylphy wants to merge 1 commit into
uutils:mainfrom
Xylphy:fix/dd-quote-invalid-status-level

Conversation

@Xylphy

@Xylphy Xylphy commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #13868

Summary

Updates the dd error message for an unrecognized status= value so that the user-provided value is quoted.

Before

$ dd status=invalid
dd: status=LEVEL not recognized -> invalid

After

$ dd status=invalid
dd: invalid status level: ‘invalid’

GNU (Reference)

$ /bin/dd status=invalid
dd: invalid status level: ‘invalid’

Copilot AI lite review requested due to automatic review settings August 13, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates dd’s error output for unrecognized status= values to quote the user-provided level (matching GNU dd’s style) and adds a regression test to lock the behavior in.

Changes:

  • Updated the dd-error-status-not-recognized message in the en-US Fluent locale to include quotes around the provided status level.
  • Added an integration test ensuring dd status=invalid fails with the newly formatted, quoted error message.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/by-util/test_dd.rs Adds a regression test asserting the quoted error message for an invalid status= value.
src/uu/dd/locales/en-US.ftl Updates the en-US localized parse error string for unrecognized status= levels to include quoting.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

dd-error-multiplier-overflow = Multiplier string would overflow on current system -> { $input }
dd-error-block-without-cbs = conv=block or conv=unblock specified without cbs=N
dd-error-status-not-recognized = status=LEVEL not recognized -> { $level }
dd-error-status-not-recognized = invalid status level: ‘{ $level }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what's the French equivalent of that error message.

Comment thread tests/by-util/test_dd.rs
Comment on lines +2214 to +2219
fn test_invalid_status_level() {
new_ucmd!()
.args(&["status=invalid"])
.fails()
.stderr_contains("dd: invalid status level: ‘invalid’");
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I still have to include this or not?

@codspeed-hq

codspeed-hq Bot commented Aug 13, 2026

Copy link
Copy Markdown

Merging this PR will regress 1 benchmark

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 351 untouched benchmarks
⏩ 50 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation du_summarize_balanced_tree[(5, 4, 10)] 16.2 ms 16.7 ms -3.11%
Simulation complex_relative_date 330.6 µs 318.7 µs +3.72%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Xylphy:fix/dd-quote-invalid-status-level (8a07d67) with main (4ca7ded)2

Open in CodSpeed

Footnotes

  1. 50 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (668ea71) during the generation of this report, so 4ca7ded was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

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.

minorbug(dd): status= errors not quoted

2 participants