_supported_fs generic
_supported_os Linux
_require_scratch_encryption
-_require_xfs_io_command "set_encpolicy"
_require_command "$KEYCTL_PROG" keyctl
-_requires_renameat2
+_require_renameat2 exchange
_new_session_keyring
mkdir $SCRATCH_MNT/edir
keydesc=$(_generate_encryption_key)
-$XFS_IO_PROG -c "set_encpolicy $keydesc" $SCRATCH_MNT/edir
+_set_encpolicy $SCRATCH_MNT/edir $keydesc
echo a > $SCRATCH_MNT/edir/a
echo b > $SCRATCH_MNT/edir/b
_unlink_encryption_key $keydesc