2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # Run fsx with quotas enabled and verify accounted quotas in the end
9 # Derived from test 127
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
17 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
19 # get standard environment, filters and checks
24 FSX_FILE_SIZE=64000000
25 FSX_ARGS="-q -l $FSX_FILE_SIZE -o 65536 -N 20000"
30 echo "=== FSX Standard Mode, Memory Mapping, $tasks Tasks ==="
31 for (( i = 1; i <= $tasks; i++ )); do
33 echo "ltp/fsx $FSX_ARGS -S $SEED $SCRATCH_MNT/fsx_file$i" >>$seqres.full
34 su $qa_user -c "ltp/fsx $FSX_ARGS -S $SEED \
35 $FSX_AVOID $SCRATCH_MNT/fsx_file$i" >$tmp.output$i 2>&1 &
38 for (( i = 1; i <= $tasks; i++ )); do
40 cat $tmp.output$i | tee -a $seqres.full
44 $XFS_IO_PROG -c 'fsync' $SCRATCH_MNT/fsx_file$i
45 cat $tmp.output$i | tee -a $seqres.full
50 # real QA test starts here
58 _scratch_mkfs >> $seqres.full 2>&1
59 _scratch_mount "-o usrquota,grpquota"
60 chmod 777 $SCRATCH_MNT
61 quotacheck -u -g $SCRATCH_MNT 2>/dev/null
62 quotaon -u -g $SCRATCH_MNT 2>/dev/null
65 _scratch_unmount 2>/dev/null
70 if ! _check_quota_usage; then
71 _scratch_unmount 2>/dev/null
77 _scratch_unmount 2>/dev/null
82 if ! _check_quota_usage; then
83 _scratch_unmount 2>/dev/null
88 #flush cache after write
89 FSX_ARGS="-f $FSX_ARGS"
91 _scratch_unmount 2>/dev/null
96 if ! _check_quota_usage; then
97 _scratch_unmount 2>/dev/null
102 _scratch_unmount 2>/dev/null