xfs/029: filter out "extended-header: cycle: 1" from output
[xfstests-dev.git] / tests / xfs / 268
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2011 SGI.  All Rights Reserved.
4 #
5 # FS QA Test No. 268
6 #
7 # Test xfsdump with multiple media files where a file ends
8 # at the end of the first media file (i.e., no file is split
9 # across media files).
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=0        # success is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
19
20 _cleanup()
21 {
22         _cleanup_dump
23         cd /
24         rm -f $tmp.*
25 }
26
27 #
28 # create two 12 MiB files with extended attrs.
29 # xfsdump writes file data in "extent groups", currently 16 MiB in size. After
30 # writing an extent group or finishing a file, xfsdump will start a new media
31 # file if it is over the suggested size. A media file size of 8 MiB is used
32 # below, so after dumping a 12 MiB file xfsdump will start a new media file and
33 # no file will be split across a media file.
34 #
35 _create_files()
36 {
37     cat <<End-of-File >$tmp.config
38 # pathname      size            user    group    perm   name value namespace
39 bigg1           12582912        $nobody $nobody  777    attr1 some_text1  root
40 bigg2           12582912        $nobody $nobody  777    attr2 some_text2  user
41 End-of-File
42
43     _wipe_fs
44     _do_create_dumpdir_fill
45     _stable_fs
46 }
47
48 # get standard environment, filters and checks
49 . ./common/rc
50 . ./common/dump
51 . ./common/attr
52
53 # real QA test starts here
54 _supported_fs xfs
55 _supported_os Linux
56
57 _require_tape $TAPE_DEV
58 _require_attrs
59
60 _create_files
61 _erase_hard
62 _do_dump -d 8
63 _do_restore
64 _ls_compare_sub
65 _diff_compare
66 _diff_compare_eas
67
68 # success, all done
69 exit