Skip to content

Fix decrypt_fault.ksh when zfs_abd_scatter_enabled=0 #17233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tests/zfs-tests/tests/functional/fault/decrypt_fault.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ log_must eval "echo 'password' | zfs create -o encryption=on \
mntpt=$(get_prop mountpoint $TESTPOOL/fs)
log_must mkfile 32M $mntpt/file1

log_must zinject -a -t data -e decrypt -f 20 $mntpt/file1
log_must zfs umount $TESTPOOL/fs
# Remember guid to reimport so we don't import wrong pool
guid="$(zpool get guid $TESTPOOL -Ho value)"
Copy link
Member

@amotin amotin Apr 21, 2025

Choose a reason for hiding this comment

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

Suggested change
guid="$(zpool get guid $TESTPOOL -Ho value)"
guid=$(get_pool_prop guid $TESTPOOL)

# Reimport the pool to clear cache
log_must zpool export $TESTPOOL
log_must zpool import "$guid"
log_must eval "echo 'password' | zfs load-key $TESTPOOL/fs"
log_must zfs mount $TESTPOOL/fs
log_must zinject -a -t data -e decrypt -f 20 $mntpt/file1

log_mustnot eval "cat $mntpt/file1 > /dev/null"
# Events are not supported on FreeBSD
Expand Down
Loading