xfs: fix old fuzz test invocations of xfs_repair
[xfstests-dev.git] / tests / xfs / 494
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018, Oracle and/or its affiliates.  All Rights Reserved.
4 #
5 # FS QA Test No. 494
6 #
7 # Ensure that xfsprogs crc32 works correctly via xfs_io crc32cselftest command.
8 #
9 seq=`basename "$0"`
10 seqres="$RESULT_DIR/$seq"
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1    # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20         cd /
21         rm -f $tmp.*
22 }
23
24 # get standard environment, filters and checks
25 . ./common/rc
26 . ./common/filter
27
28 # real QA test starts here
29 _supported_fs xfs
30 _require_xfs_io_command "crc32cselftest"
31
32 rm -f "$seqres.full"
33
34 filter_selftest() {
35         sed -e 's/bytes in [0-9]* usec/bytes in XXX usec/g'
36 }
37
38 $XFS_IO_PROG -c 'crc32cselftest' | filter_selftest
39
40 echo "Silence is golden."
41 # success, all done
42 status=0
43 exit