Skip to content

dmtest: Write random data instead of zeroes to geometry block - #3

Merged
bjohnsto merged 1 commit into
device-mapper-utils:mainfrom
bjohnsto:fix_corrupt_vdo
Apr 27, 2026
Merged

dmtest: Write random data instead of zeroes to geometry block#3
bjohnsto merged 1 commit into
device-mapper-utils:mainfrom
bjohnsto:fix_corrupt_vdo

Conversation

@bjohnsto

Copy link
Copy Markdown
Collaborator

Replaces the function that write zeroes to the vdo geometry block with a call to write random data. Then it checks for possible expected error messages.

The new code that formats vdo devices directly in the kernel decides whether to format by looking at the geometry block. If it is all zeroes, the device is formatted. Therefore, we want to change this test to write random data instead of zeroes, since we don't want to format the device.

Comment thread src/dmtest/assertions.py Outdated
Replaces the function that write zeroes to the vdo geometry block with
a call to write random data. Then checks for possible expected error
messages.

The new code that formats vdo devices directly in the kernel decides
whether to format by looking at the geometry block. If it is all
zeroes, the device is formatted. Therefore, we want to change this
test to write random data instead of zeroes, since we don't want to
format the device.

Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>

@bmarzins bmarzins left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me.

@lorelei-sakai lorelei-sakai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me; pretty much just the same as the earlier version so I guess cherry-picking worked.

@bjohnsto
bjohnsto merged commit ecd4141 into device-mapper-utils:main Apr 27, 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.

3 participants