2 # SPDX-License-Identifier: GPL-2.0-or-newer
3 # Copyright (c) 2020, Oracle and/or its affiliates. All Rights Reserved.
7 # Ensure all xfs_db commands are documented.
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
27 # real QA test starts here
30 _require_command "$XFS_DB_PROG" "xfs_db"
31 _require_command "$MAN_PROG" man
34 echo "Silence is golden"
36 MANPAGE=$($MAN_PROG --path xfs_db)
39 *.gz|*.z\|*.Z) CAT=zcat;;
44 _require_command `which $CAT` $CAT
46 file=$TEST_DIR/xx.$seq
47 truncate -s 128m $file
48 $MKFS_XFS_PROG $file >> /dev/null
50 for COMMAND in `$XFS_DB_PROG -x -c help $file | awk '{print $1}' | grep -v "^Use"`; do
51 $CAT "$MANPAGE" | egrep -q "^\.B.*$COMMAND" || \
52 echo "$COMMAND not documented in the xfs_db manpage"