generic: test adding filesystem-level fscrypt key via key_id
[xfstests-dev.git] / tests / generic / 583
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright 2019 Google LLC
4 #
5 # FS QA Test No. generic/583
6 #
7 # Verify ciphertext for v2 encryption policies that use AES-128-CBC-ESSIV to
8 # encrypt file contents and AES-128-CTS-CBC to encrypt file names.
9 #
10 # This is the same as generic/549, except using v2 policies.
11 #
12 seq=`basename $0`
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1        # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23         cd /
24         rm -f $tmp.*
25 }
26
27 # get standard environment, filters and checks
28 . ./common/rc
29 . ./common/filter
30 . ./common/encrypt
31
32 # remove previous $seqres.full before test
33 rm -f $seqres.full
34
35 # real QA test starts here
36 _supported_fs generic
37 _supported_os Linux
38
39 _verify_ciphertext_for_encryption_policy AES-128-CBC-ESSIV AES-128-CTS-CBC v2
40
41 # success, all done
42 status=0
43 exit