fstests: remove _wipe_fs from dump testing entirely
[xfstests-dev.git] / tests / xfs / 047
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 047
6 #
7 # invutil with interactive responses
8 #
9 . ./common/preamble
10 _begin_fstest dump ioctl auto
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 _require_scratch
26 _scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed"
27 _scratch_mount
28
29 #
30 # Create 5 dumps
31 # and on the 3rd dump note the date
32 # which we'll use to prune against using xfsinvutil
33 #
34 i=0
35 while [ $i -lt 5 ]; do
36     _do_dump_file -L "session.$i"
37     if [ $i -eq 2 ]; then
38        sleep 1
39        middate=`date '+%m/%d/%Y %T'`
40     fi
41     rm $dump_file
42     sleep 2
43     let i=$i+1
44 done
45
46 echo "middate = $middate" >>$seqres.full
47
48 # Only say No to 1st question to prune
49 cat >$tmp.input <<EOF
50 N
51 Y
52 Y
53 Y
54 Y
55 EOF
56
57 #
58 # Now do the xfsinvutil and
59 # look and the inventory before and after
60 # to see if it did the job
61 #
62 _dump_inventory
63 _do_invutil <$tmp.input
64 _dump_inventory
65
66 status=0
67 exit