btrfs/012: check free size of scratch device before copying files
[xfstests-dev.git] / tests / generic / 584
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright 2019 Google LLC
4 #
5 # FS QA Test No. generic/584
6 #
7 # Verify ciphertext for v2 encryption policies that use Adiantum to encrypt file
8 # contents and file names.
9 #
10 # This is the same as generic/550, 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
38 # Test both with and without the DIRECT_KEY flag.
39 _verify_ciphertext_for_encryption_policy Adiantum Adiantum v2
40 _verify_ciphertext_for_encryption_policy Adiantum Adiantum v2 direct
41
42 # success, all done
43 status=0
44 exit