ea1147612e94ccf12a6546c3a92a8af93bee0baf
[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 . ./common/preamble
10 _begin_fstest dump ioctl auto quick
11
12 # Override the default cleanup function.
13 _cleanup()
14 {
15         _cleanup_dump
16         cd /
17         rm -f $tmp.*
18 }
19
20 # Import common functions.
21 . ./common/dump
22
23 # real QA test starts here
24 _supported_fs xfs
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