Skip to content

Add back long prefix check with mkfs version check#12

Merged
dmcgowan merged 1 commit into
erofs:mainfrom
dmcgowan:fix-long-prefix-tests
Mar 11, 2026
Merged

Add back long prefix check with mkfs version check#12
dmcgowan merged 1 commit into
erofs:mainfrom
dmcgowan:fix-long-prefix-tests

Conversation

@dmcgowan

Copy link
Copy Markdown
Member

There is a relevant fix available in mkfs 1.9, skip older version to prevent test failure.

Copilot AI review requested due to automatic review settings March 11, 2026 04:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a mkfs.erofs version gate so tests can skip when the installed mkfs is older than the version that contains the relevant fix (mkfs 1.9+), while also reintroducing long xattr prefix checks in test mkfs invocations.

Changes:

  • Introduce internal/erofstest.CheckMkfsVersion with basic semver parsing/comparison and mkfs.erofs --version probing.
  • Skip TestBasic when mkfs.erofs is older than 1.9.
  • Add --xattr-prefix flags (short + long) to mkfs args used during test image creation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
internal/erofstest/mkfs.go Adds mkfs.erofs version detection and semver comparison helper used by tests.
erofs_test.go Skips a test on old mkfs versions and appends xattr prefix flags to mkfs test invocations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/erofstest/mkfs.go
Comment thread internal/erofstest/mkfs.go
Comment thread erofs_test.go Outdated
Comment thread erofs_test.go Outdated
Comment thread erofs_test.go Outdated
Comment thread internal/erofstest/mkfs.go Outdated
There is a relevant fix available in mkfs 1.9, skip older version to
prevent test failure.

Signed-off-by: Derek McGowan <derek@mcg.dev>
@dmcgowan dmcgowan force-pushed the fix-long-prefix-tests branch from 0cf32e1 to f22409c Compare March 11, 2026 06:04
@dmcgowan dmcgowan merged commit 959a363 into erofs:main Mar 11, 2026
1 check passed
@dmcgowan dmcgowan deleted the fix-long-prefix-tests branch March 11, 2026 06:11
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.

3 participants