mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
generic: test setting and getting encryption policies
Several kernel bugs were recently fixed regarding the constraints for setting encryption policies. Add tests for these cases and a few more. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
QA output created by 395
|
||||
|
||||
*** Setting encryption policy on empty directory ***
|
||||
SCRATCH_MNT/empty_dir: failed to get encryption policy: No data available
|
||||
Encryption policy for SCRATCH_MNT/empty_dir:
|
||||
Policy version: 0
|
||||
Master key descriptor: 0000111122223333
|
||||
Contents encryption mode: 1 (AES-256-XTS)
|
||||
Filenames encryption mode: 4 (AES-256-CTS)
|
||||
Flags: 0x02
|
||||
|
||||
*** Setting encryption policy again ***
|
||||
Encryption policy for SCRATCH_MNT/empty_dir:
|
||||
Policy version: 0
|
||||
Master key descriptor: 0000111122223333
|
||||
Contents encryption mode: 1 (AES-256-XTS)
|
||||
Filenames encryption mode: 4 (AES-256-CTS)
|
||||
Flags: 0x02
|
||||
SCRATCH_MNT/empty_dir: failed to set encryption policy: File exists
|
||||
Encryption policy for SCRATCH_MNT/empty_dir:
|
||||
Policy version: 0
|
||||
Master key descriptor: 0000111122223333
|
||||
Contents encryption mode: 1 (AES-256-XTS)
|
||||
Filenames encryption mode: 4 (AES-256-CTS)
|
||||
Flags: 0x02
|
||||
|
||||
*** Setting encryption policy on nonempty directory ***
|
||||
SCRATCH_MNT/nonempty_dir: failed to set encryption policy: Directory not empty
|
||||
SCRATCH_MNT/nonempty_dir: failed to get encryption policy: No data available
|
||||
|
||||
*** Setting encryption policy on nondirectory ***
|
||||
SCRATCH_MNT/nondirectory: failed to set encryption policy: Not a directory
|
||||
SCRATCH_MNT/nondirectory: failed to get encryption policy: No data available
|
||||
|
||||
*** Setting encryption policy on another user's directory ***
|
||||
SCRATCH_MNT/unauthorized_dir: failed to set encryption policy: Permission denied
|
||||
SCRATCH_MNT/unauthorized_dir: failed to get encryption policy: No data available
|
||||
|
||||
*** Setting encryption policy on readonly filesystem ***
|
||||
SCRATCH_MNT/ro_dir: failed to set encryption policy: Read-only file system
|
||||
SCRATCH_MNT/ro_dir: failed to get encryption policy: No data available
|
||||
SCRATCH_MNT/ro_bind_mnt/ro_dir: failed to set encryption policy: Read-only file system
|
||||
SCRATCH_MNT/ro_bind_mnt/ro_dir: failed to get encryption policy: No data available
|
||||
Reference in New Issue
Block a user