2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Oracle Inc. All Rights Reserved.
7 # Test to verify xfs_quota(8) administrator commands can deal with invalid
8 # storage mount point without NULL pointer dereference problem.
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
29 # real QA test starts here
32 echo "Silence is golden"
34 # To run this sanity check we don't need to enable quota function
35 # nor need a scratch device as quota tool will get the mount path
37 # An non-existent xfs mount point
38 INVALID_PATH="/INVALID_XFS_MOUNT_POINT"
40 xfs_quota -x -c 'report -a' $INVALID_PATH 2>/dev/null
41 xfs_quota -x -c 'state -a' $INVALID_PATH 2>/dev/null
42 xfs_quota -x -c 'free -h' $INVALID_PATH 2>/dev/null
43 xfs_quota -x -c 'quot -v' $INVALID_PATH 2>/dev/null
44 xfs_quota -x -c 'remove' $INALID_PATH 2>/dev/null
45 xfs_quota -x -c 'disable' $INVALID_PATH 2>/dev/null
46 xfs_quota -x -c 'enable' $INVALID_PATH 2>/dev/null