xfs/007: fix regressions on V4 filesystems
[xfstests-dev.git] / tests / xfs / 515
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0-or-newer
3 # Copyright (c) 2020, Oracle and/or its affiliates.  All Rights Reserved.
4 #
5 # FS QA Test No. 515
6 #
7 # Ensure all xfs_quota commands are documented.
8
9 . ./common/preamble
10 _begin_fstest auto quick quota
11
12 # Override the default cleanup function.
13 _cleanup()
14 {
15         cd /
16         rm -f $tmp.* $file
17 }
18
19 # Import common functions.
20
21 # real QA test starts here
22 _supported_fs xfs
23 _require_command "$XFS_QUOTA_PROG" "xfs_quota"
24 _require_command "$MAN_PROG" man
25 _require_test
26
27 echo "Silence is golden"
28
29 MANPAGE=$($MAN_PROG --path xfs_quota)
30
31 case "$MANPAGE" in
32 *.gz|*.z\|*.Z)  CAT=zcat;;
33 *.bz2)          CAT=bzcat;;
34 *.xz)           CAT=xzcat;;
35 *)              CAT=cat;;
36 esac
37 _require_command `which $CAT` $CAT
38
39 for COMMAND in `$XFS_QUOTA_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do
40   $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
41         echo "$COMMAND not documented in the xfs_quota manpage"
42 done
43
44 # success, all done
45 status=0
46 exit