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 _begin_fstest auto quick quota
13 # Import common functions.
16 # real QA test starts here
19 echo "Silence is golden"
21 # To run this sanity check we don't need to enable quota function
22 # nor need a scratch device as quota tool will get the mount path
24 # An non-existent xfs mount point
25 INVALID_PATH="/INVALID_XFS_MOUNT_POINT"
27 xfs_quota -x -c 'report -a' $INVALID_PATH 2>/dev/null
28 xfs_quota -x -c 'state -a' $INVALID_PATH 2>/dev/null
29 xfs_quota -x -c 'free -h' $INVALID_PATH 2>/dev/null
30 xfs_quota -x -c 'quot -v' $INVALID_PATH 2>/dev/null
31 xfs_quota -x -c 'remove' $INALID_PATH 2>/dev/null
32 xfs_quota -x -c 'disable' $INVALID_PATH 2>/dev/null
33 xfs_quota -x -c 'enable' $INVALID_PATH 2>/dev/null