fstests: convert remaining tests to SPDX license tags
[xfstests-dev.git] / tests / ext4 / 023
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2017 Oracle, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 023
6 #
7 # Ensure that the populate helpers actually /can/ populate a ext4
8 # filesystem with all types of metadata and create an image of the
9 # metadata.  Check that fsck is happy with the resulting fs.
10 #
11 seq=`basename $0`
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
14
15 here=`pwd`
16 tmp=/tmp/$$
17 status=1        # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 7 15
19
20 _cleanup()
21 {
22         cd /
23         rm -rf $tmp.*
24 }
25
26 # get standard environment, filters and checks
27 . ./common/rc
28 . ./common/filter
29 . ./common/populate
30 . ./common/fuzzy
31
32 # real QA test starts here
33 _supported_os Linux
34 _supported_fs ext4
35 _require_scratch
36 _require_scrub
37
38 echo "Format and populate"
39 _scratch_populate_cached > $seqres.full 2>&1
40
41 echo "Mount"
42 _scratch_mount >> $seqres.full 2>&1
43
44 # success, all done
45 status=0
46 exit