fstests: remove _wipe_fs from dump testing entirely
[xfstests-dev.git] / tests / xfs / 267
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2011 SGI.  All Rights Reserved.
4 #
5 # FS QA Test No. 267
6 #
7 # Test xfsdump with a file spanning multiple media files.
8 #
9 . ./common/preamble
10 _begin_fstest dump ioctl tape
11
12 status=0        # success is the default!
13
14 # Override the default cleanup function.
15 _cleanup()
16 {
17         _cleanup_dump
18         cd /
19         rm -f $tmp.*
20 }
21
22 #
23 # create a 40 MiB file with an extended attr.
24 # xfsdump writes file data in "extent groups", currently 16 MiB in size. After
25 # writing an extent group or finishing a file, xfsdump will start a new media
26 # file if it is over the suggested size. With a single 40 MiB file and using a
27 # suggested media file size of 12 MiB below, this dump will be contained in 3
28 # media files.
29 #
30 _create_files()
31 {
32     cat <<End-of-File >$tmp.config
33 # pathname      size            user    group    perm   name value namespace
34 biggg           41943040        $nobody $nobody  777    attr1 some_text1  root
35 End-of-File
36
37     _do_create_dumpdir_fill
38     _stable_fs
39 }
40
41 # Import common functions.
42 . ./common/dump
43 . ./common/attr
44
45 # real QA test starts here
46 _supported_fs xfs
47
48 _require_tape $TAPE_DEV
49 _require_attrs trusted
50 _require_scratch
51 _scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed"
52 _scratch_mount
53
54 _create_files
55 _erase_hard
56 _do_dump -d 12
57 _do_restore
58 _ls_compare_sub
59 _diff_compare
60 _diff_compare_eas
61
62 # success, all done
63 exit