diff options
| author | Eric Biggers <ebiggers@google.com> | 2020-05-09 14:04:47 -0700 |
|---|---|---|
| committer | Eric Biggers <ebiggers@google.com> | 2020-05-09 14:04:47 -0700 |
| commit | c626494e0c687a109e16ee7289a6f215d6a44809 (patch) | |
| tree | 548ce94ebafe672a75549d4a79b049b0b9de669a /cli-tests/t_not_supported.sh | |
| parent | c5faa27f1ff51d9fe7e6453a6e92b032c82b3c43 (diff) | |
cli-tests: add t_not_supported
Test that fscrypt fails when the filesystem doesn't support encryption.
Diffstat (limited to 'cli-tests/t_not_supported.sh')
| -rwxr-xr-x | cli-tests/t_not_supported.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cli-tests/t_not_supported.sh b/cli-tests/t_not_supported.sh new file mode 100755 index 0000000..53a096a --- /dev/null +++ b/cli-tests/t_not_supported.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Test that fscrypt fails when the filesystem doesn't support encryption. + +cd "$(dirname "$0")" +. common.sh + +_print_header "Mount tmpfs" +umount "$MNT" +mount tmpfs -t tmpfs -o size=128m "$MNT" + +_print_header "Create fscrypt metadata on tmpfs" +fscrypt setup "$MNT" + +_print_header "Try to encrypt a directory on tmpfs" +mkdir "$MNT/dir" +_expect_failure "fscrypt encrypt '$MNT/dir'" |