2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2016 Red Hat, Inc. All Rights Reserved.
7 # test out high quota ids retrieved by Q_GETNEXTQUOTA
8 # Request for next ID near 2^32 should not wrap to 0
10 # Designed to use the new Q_GETNEXTQUOTA quotactl
13 _begin_fstest auto quick quota
15 # Import common functions.
19 # real QA test starts here
25 _scratch_mkfs >> $seqres.full 2>&1
27 MOUNT_OPTIONS="-o usrquota,grpquota"
31 echo "Launch all quotas"
33 # We want to create a block of quotas for an id very near
34 # 2^32, then ask for the next quota after it. The returned
35 # ID should not overflow to 0.
37 # Populate with 2^32-4
39 setquota -u $ID $ID $ID $ID $ID $SCRATCH_MNT
40 touch ${SCRATCH_MNT}/${ID}
41 chown ${ID} ${SCRATCH_MNT}/${ID}
43 # remount just for kicks, make sure we get it off disk
47 # Ask for the next quota after $ID; should get nothing back
48 # If kernelspace wraps, we'll get 0 back.
51 echo "Ask for ID after $NEXT expecting nothing"
52 $here/src/test-nextquota -i $NEXT -${TYPE} -d $SCRATCH_DEV