generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / xfs / 022
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. 022
6 #
7 # Test out a level 0 dump/restore to a tape of a subdir
8 # i.e. it is testing out drive_scsitape.c
9 #
10 # Use fsstress to create a directory structure with a mix of files
11 #
12 seqfull=$0
13 . ./common/preamble
14 _begin_fstest dump ioctl tape
15
16 status=0        # success is the default!
17
18 # Override the default cleanup function.
19 _cleanup()
20 {
21         _cleanup_dump
22         cd /
23         rm -f $tmp.*
24 }
25
26 . ./common/dump
27
28 # real QA test starts here
29 _supported_fs xfs
30
31 _require_tape $TAPE_DEV
32
33 # note: fsstress uses an endian dependent random number generator, running this
34 # will produce different output for big/little endian machines.
35 _create_dumpdir_stress
36 _erase_hard
37 _do_dump_sub
38 # filter out the file count, it changes as fsstress adds new operations
39 _do_restore | sed -e "/entries processed$/s/[0-9][0-9]*/NUM/g"
40 _ls_compare_sub
41
42 # success, all done
43 exit