overlay: run unionmount testsuite test cases
[xfstests-dev.git] / tests / xfs / 293
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2012 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 293
6 #
7 # Ensure all xfs_io commands are documented
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
30 # Modify as appropriate.
31 _supported_fs xfs
32 _supported_os Linux
33
34 _require_command "$MAN_PROG" man
35
36 echo "Silence is golden"
37
38 MANPAGE=`$MAN_PROG --path xfs_io`
39
40 case "$MANPAGE" in
41 *.gz|*.z\|*.Z)  CAT=zcat;;
42 *.bz2)          CAT=bzcat;;
43 *.xz)           CAT=xzcat;;
44 *)              CAT=cat;;
45 esac
46
47 _require_command `which $CAT` $CAT
48
49 for COMMAND in `$XFS_IO_PROG -c help | awk '{print $1}' | grep -v "^Use"`; do
50   $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
51         echo "$COMMAND not documented in the xfs_io manpage"
52 done
53
54 # success, all done
55 status=0
56 exit