Skip to content

tests: Match exfatprogs multiline version output - #1228

Closed
hoexter wants to merge 1 commit into
storaged-project:masterfrom
hoexter:fix/exfatprogs-144
Closed

hoexter wants to merge 1 commit into
storaged-project:masterfrom
hoexter:fix/exfatprogs-144

Conversation

@hoexter

@hoexter hoexter commented Nov 14, 2026 •

Copy link
Copy Markdown

Starting with exfatprogs 1.4.4 we see a multiline
version output on stderr and stdout:

$ /usr/sbin/mkfs.exfat --version > /dev/null
exfatprogs version : 1.4.4 (2026-11-10)

$ /usr/sbin/mkfs.exfat --version 2> /dev/null
libblkid version : 2.42.4 (21-Sep-2026)

$ /usr/sbin/mkfs.exfat --version
exfatprogs version : 1.4.4 (2026-11-10)
libblkid version : 2.42.4 (21-Sep-2026)

Let the regex search on multiple lines from stdout and stderr to find the one containing the exfatprogs version.

Summary by CodeRabbit

  • Bug Fixes
    • Improved exfatprogs version detection when version information appears on standard error.
    • Updated the example version output to 1.4.4.

Starting with exfatprogs 1.4.4 we see a multiline
version output on stderr and stdout:

$ /usr/sbin/mkfs.exfat --version > /dev/null
exfatprogs version : 1.4.4 (2026-11-10)

$ /usr/sbin/mkfs.exfat --version 2> /dev/null
libblkid version : 2.42.4 (21-Sep-2026)

$ /usr/sbin/mkfs.exfat --version
exfatprogs version : 1.4.4 (2026-11-10)
libblkid version : 2.42.4 (21-Sep-2026)

Let the regex search on multiple lines from stdout and stderr
to find the one containing the exfatprogs version.

Signed-off-by: Sven Hoexter <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The exfatprogs version parser now searches both stdout and stderr and matches the version line at the start of a line.

Changes: exfatprogs version detection

Layer / File(s) Summary
Parse version output
tests/fs_tests/exfat_test.py
_get_exfatprogs_version() searches combined stdout and stderr for a version line anchored at the start of a line. The example output is updated for exfatprogs 1.4.4.

Estimated code review effort: 2 (Simple) | ~8 minutes

Merge Risk: Minimal · up to 095ae

This updates a test helper to read the exfatprogs version from multiline output across both streams. It has no production impact and carries minimal merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "tests: Match exfatprogs multiline version output" matches the main change. The PR updates the test regex in tests/fs_tests/exfat_test.py so that _get_exfatprogs_version() searches stdout an…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "tests: Match exfatprogs multiline version output" matches the main change. The PR updates the test regex in tests/fs_tests/exfat_test.py so that _get_exfatprogs_version() searches stdout and stderr across multiple lines of mkfs.exfat --version output. This is needed because exfatprogs 1.4.4 prints the exfatprogs version on stdout and the libblkid version on stderr. The title is specific and short, and a reviewer scanning history would understand the primary change.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between ced1904 and 095ae1b.

Files selected for processing: 1

  • tests/fs_tests/exfat_test.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@hoexter

hoexter commented Nov 14, 2026

Copy link
Copy Markdown
Author

sorry duplicate of #1227 - though slightly different implementation

@hoexter hoexter closed this Nov 14, 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.

1 participant