xfs: convert tests to SPDX license tags
[xfstests-dev.git] / tests / xfs / 281
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2012 SGI.  All Rights Reserved.
4 #
5 # FS QA Test No. 281
6 #
7 # Test that xfsdump can generate a format 2 dump.
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1        # failure is the default!
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
17
18 # get standard environment, filters and checks
19 . ./common/rc
20 . ./common/dump
21
22 # real QA test starts here
23 _supported_fs xfs
24 _supported_os Linux
25
26 _require_legacy_v2_format
27
28 _create_dumpdir_fill
29
30 echo "*** Dump using format 2"
31 _do_dump_file -K
32
33 echo "*** Verify it's a format 2 dump"
34 file $dump_file | cut -d: -f 2
35
36 echo "*** Restoring format 2 dump"
37 _do_restore_file
38 _diff_compare
39
40 # success, all done
41 status=0
42 exit