1*11be35a1SLionel Sambuc# $NetBSD: t_quotalimit.sh,v 1.4 2012/01/18 20:51:23 bouyer Exp $ 2*11be35a1SLionel Sambuc# 3*11be35a1SLionel Sambuc# Copyright (c) 2011 Manuel Bouyer 4*11be35a1SLionel Sambuc# All rights reserved. 5*11be35a1SLionel Sambuc# 6*11be35a1SLionel Sambuc# Redistribution and use in source and binary forms, with or without 7*11be35a1SLionel Sambuc# modification, are permitted provided that the following conditions 8*11be35a1SLionel Sambuc# are met: 9*11be35a1SLionel Sambuc# 1. Redistributions of source code must retain the above copyright 10*11be35a1SLionel Sambuc# notice, this list of conditions and the following disclaimer. 11*11be35a1SLionel Sambuc# 2. Redistributions in binary form must reproduce the above copyright 12*11be35a1SLionel Sambuc# notice, this list of conditions and the following disclaimer in the 13*11be35a1SLionel Sambuc# documentation and/or other materials provided with the distribution. 14*11be35a1SLionel Sambuc# 15*11be35a1SLionel Sambuc# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 16*11be35a1SLionel Sambuc# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17*11be35a1SLionel Sambuc# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18*11be35a1SLionel Sambuc# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19*11be35a1SLionel Sambuc# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20*11be35a1SLionel Sambuc# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21*11be35a1SLionel Sambuc# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22*11be35a1SLionel Sambuc# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23*11be35a1SLionel Sambuc# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24*11be35a1SLionel Sambuc# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25*11be35a1SLionel Sambuc# POSSIBILITY OF SUCH DAMAGE. 26*11be35a1SLionel Sambuc# 27*11be35a1SLionel Sambuc 28*11be35a1SLionel Sambucfor e in le; do 29*11be35a1SLionel Sambuc for v in 1; do 30*11be35a1SLionel Sambuc for q in "user" "group"; do 31*11be35a1SLionel Sambuc test_case_root limit_${e}_${v}_${q} limit_quota \ 32*11be35a1SLionel Sambuc "hit hard limit quota with ${q} enabled" -b ${e} ${v} ${q} 33*11be35a1SLionel Sambuc test_case_root limit_${e}_${v}_${q}_log limit_quota \ 34*11be35a1SLionel Sambuc "hit hard limit quota with ${q} enabled, WAPBL" -bl ${e} ${v} ${q} 35*11be35a1SLionel Sambuc test_case_root slimit_${e}_${v}_${q} limit_softquota \ 36*11be35a1SLionel Sambuc "hit soft limit quota with ${q} enabled after grace time" \ 37*11be35a1SLionel Sambuc -b ${e} ${v} ${q} 38*11be35a1SLionel Sambuc test_case_root inolimit_${e}_${v}_${q} limit_iquota \ 39*11be35a1SLionel Sambuc "hit hard limit ino quota with ${q} enabled" -b ${e} ${v} ${q} 40*11be35a1SLionel Sambuc test_case_root inolimit_${e}_${v}_${q}_log limit_iquota \ 41*11be35a1SLionel Sambuc "hit hard limit ino quota with ${q} enabled, WAPBL" -bl ${e} ${v} ${q} 42*11be35a1SLionel Sambuc test_case_root sinolimit_${e}_${v}_${q} limit_softiquota \ 43*11be35a1SLionel Sambuc "hit soft limit ino quota with ${q} enabled after grace time" \ 44*11be35a1SLionel Sambuc -b ${e} ${v} ${q} 45*11be35a1SLionel Sambuc test_case_root herit_defq_${e}_${v}_${q} inherit_defaultquota \ 46*11be35a1SLionel Sambuc "new id herit from default for ${q} quota" -b ${e} ${v} ${q} 47*11be35a1SLionel Sambuc test_case_root herit_defq_${e}_${v}_${q}_log inherit_defaultquota \ 48*11be35a1SLionel Sambuc "new id herit from default for ${q} quota, WAPBL" -bl ${e} ${v} ${q} 49*11be35a1SLionel Sambuc test_case_root herit_idefq_${e}_${v}_${q}_log inherit_defaultiquota \ 50*11be35a1SLionel Sambuc "new id herit from default for ${q} ino quota, WAPBL" -bl ${e} ${v} ${q} 51*11be35a1SLionel Sambuc done 52*11be35a1SLionel Sambuc done 53*11be35a1SLionel Sambucdone 54*11be35a1SLionel Sambuc 55*11be35a1SLionel Sambuclimit_quota() 56*11be35a1SLionel Sambuc{ 57*11be35a1SLionel Sambuc create_ffs_server $* 58*11be35a1SLionel Sambuc local q=$4 59*11be35a1SLionel Sambuc local expect 60*11be35a1SLionel Sambuc local id=1 61*11be35a1SLionel Sambuc 62*11be35a1SLionel Sambuc case ${q} in 63*11be35a1SLionel Sambuc user) 64*11be35a1SLionel Sambuc expect=u 65*11be35a1SLionel Sambuc fail=g 66*11be35a1SLionel Sambuc ;; 67*11be35a1SLionel Sambuc group) 68*11be35a1SLionel Sambuc expect=g 69*11be35a1SLionel Sambuc fail=u 70*11be35a1SLionel Sambuc ;; 71*11be35a1SLionel Sambuc both) 72*11be35a1SLionel Sambuc expect="u g" 73*11be35a1SLionel Sambuc fail="" 74*11be35a1SLionel Sambuc ;; 75*11be35a1SLionel Sambuc *) 76*11be35a1SLionel Sambuc atf_fail "wrong quota type" 77*11be35a1SLionel Sambuc ;; 78*11be35a1SLionel Sambuc esac 79*11be35a1SLionel Sambuc 80*11be35a1SLionel Sambuc for q in ${expect} ; do 81*11be35a1SLionel Sambuc atf_check -s exit:0 \ 82*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt edquota -$q -s2k/4 -h3k/6 \ 83*11be35a1SLionel Sambuc -t 2h/2h ${id} 84*11be35a1SLionel Sambuc done 85*11be35a1SLionel Sambuc atf_check -s exit:0 rump.halt 86*11be35a1SLionel Sambuc 87*11be35a1SLionel Sambuc #now start the server which does the limits tests 88*11be35a1SLionel Sambuc atf_check -s exit:0 -o ignore \ 89*11be35a1SLionel Sambuc-e match:'test 0: write up to hard limit returned 69: Disc quota exceeded' \ 90*11be35a1SLionel Sambuc $(atf_get_srcdir)/h_quota2_tests -b 0 ${IMG} ${RUMP_SERVER} 91*11be35a1SLionel Sambuc for q in ${expect} ; do 92*11be35a1SLionel Sambuc atf_check -s exit:0 \ 93*11be35a1SLionel Sambuc -o match:'/mnt 3072 B\* 2048 B 3072 B 2:0 2 4 6 ' \ 94*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quota -$q -h ${id} 95*11be35a1SLionel Sambuc atf_check -s exit:0 \ 96*11be35a1SLionel Sambuc -o match:'daemon \+- 3 2 3 2:0 2 4 6' \ 97*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt repquota -$q /mnt 98*11be35a1SLionel Sambuc done 99*11be35a1SLionel Sambuc rump_quota_shutdown 100*11be35a1SLionel Sambuc} 101*11be35a1SLionel Sambuc 102*11be35a1SLionel Sambuclimit_softquota() 103*11be35a1SLionel Sambuc{ 104*11be35a1SLionel Sambuc create_ffs_server $* 105*11be35a1SLionel Sambuc local q=$4 106*11be35a1SLionel Sambuc local expect 107*11be35a1SLionel Sambuc local id=1 108*11be35a1SLionel Sambuc 109*11be35a1SLionel Sambuc case ${q} in 110*11be35a1SLionel Sambuc user) 111*11be35a1SLionel Sambuc expect=u 112*11be35a1SLionel Sambuc fail=g 113*11be35a1SLionel Sambuc ;; 114*11be35a1SLionel Sambuc group) 115*11be35a1SLionel Sambuc expect=g 116*11be35a1SLionel Sambuc fail=u 117*11be35a1SLionel Sambuc ;; 118*11be35a1SLionel Sambuc both) 119*11be35a1SLionel Sambuc expect="u g" 120*11be35a1SLionel Sambuc fail="" 121*11be35a1SLionel Sambuc ;; 122*11be35a1SLionel Sambuc *) 123*11be35a1SLionel Sambuc atf_fail "wrong quota type" 124*11be35a1SLionel Sambuc ;; 125*11be35a1SLionel Sambuc esac 126*11be35a1SLionel Sambuc 127*11be35a1SLionel Sambuc for q in ${expect} ; do 128*11be35a1SLionel Sambuc atf_check -s exit:0 \ 129*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt edquota -$q -s2k/4 -h3k/6 \ 130*11be35a1SLionel Sambuc -t 1s/1d ${id} 131*11be35a1SLionel Sambuc done 132*11be35a1SLionel Sambuc atf_check -s exit:0 rump.halt 133*11be35a1SLionel Sambuc 134*11be35a1SLionel Sambuc #now start the server which does the limits tests 135*11be35a1SLionel Sambuc atf_check -s exit:0 -o ignore \ 136*11be35a1SLionel Sambuc-e match:'test 1: write beyond the soft limit after grace time returned 69: Disc quota exceeded' \ 137*11be35a1SLionel Sambuc $(atf_get_srcdir)/h_quota2_tests -b 1 ${IMG} ${RUMP_SERVER} 138*11be35a1SLionel Sambuc for q in ${expect} ; do 139*11be35a1SLionel Sambuc atf_check -s exit:0 \ 140*11be35a1SLionel Sambuc -o match:'/mnt 2560 B\* 2048 B 3072 B none 2 4 6 ' \ 141*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quota -$q -h ${id} 142*11be35a1SLionel Sambuc atf_check -s exit:0 \ 143*11be35a1SLionel Sambuc -o match:'daemon \+- 2 2 3 none 2 4 6' \ 144*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt repquota -$q /mnt 145*11be35a1SLionel Sambuc done 146*11be35a1SLionel Sambuc rump_quota_shutdown 147*11be35a1SLionel Sambuc} 148*11be35a1SLionel Sambuc 149*11be35a1SLionel Sambuclimit_iquota() 150*11be35a1SLionel Sambuc{ 151*11be35a1SLionel Sambuc create_ffs_server $* 152*11be35a1SLionel Sambuc local q=$4 153*11be35a1SLionel Sambuc local expect 154*11be35a1SLionel Sambuc local id=1 155*11be35a1SLionel Sambuc 156*11be35a1SLionel Sambuc case ${q} in 157*11be35a1SLionel Sambuc user) 158*11be35a1SLionel Sambuc expect=u 159*11be35a1SLionel Sambuc fail=g 160*11be35a1SLionel Sambuc ;; 161*11be35a1SLionel Sambuc group) 162*11be35a1SLionel Sambuc expect=g 163*11be35a1SLionel Sambuc fail=u 164*11be35a1SLionel Sambuc ;; 165*11be35a1SLionel Sambuc both) 166*11be35a1SLionel Sambuc expect="u g" 167*11be35a1SLionel Sambuc fail="" 168*11be35a1SLionel Sambuc ;; 169*11be35a1SLionel Sambuc *) 170*11be35a1SLionel Sambuc atf_fail "wrong quota type" 171*11be35a1SLionel Sambuc ;; 172*11be35a1SLionel Sambuc esac 173*11be35a1SLionel Sambuc 174*11be35a1SLionel Sambuc for q in ${expect} ; do 175*11be35a1SLionel Sambuc atf_check -s exit:0 \ 176*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt edquota -$q -s2m/4 -h3m/6 \ 177*11be35a1SLionel Sambuc -t 2h/2h ${id} 178*11be35a1SLionel Sambuc done 179*11be35a1SLionel Sambuc atf_check -s exit:0 rump.halt 180*11be35a1SLionel Sambuc 181*11be35a1SLionel Sambuc #now start the server which does the limits tests 182*11be35a1SLionel Sambuc atf_check -s exit:0 -o ignore \ 183*11be35a1SLionel Sambuc-e match:'test 2: create file up to hard limit returned 69: Disc quota exceeded' \ 184*11be35a1SLionel Sambuc $(atf_get_srcdir)/h_quota2_tests -b 2 ${IMG} ${RUMP_SERVER} 185*11be35a1SLionel Sambuc for q in ${expect} ; do 186*11be35a1SLionel Sambuc atf_check -s exit:0 \ 187*11be35a1SLionel Sambuc -o match:'/mnt 3072 B 2048 K 3072 K 6 \* 4 6 2:0' \ 188*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quota -$q -h ${id} 189*11be35a1SLionel Sambuc atf_check -s exit:0 \ 190*11be35a1SLionel Sambuc -o match:'daemon -\+ 3 2048 3072 6 4 6 2:0' \ 191*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt repquota -$q /mnt 192*11be35a1SLionel Sambuc done 193*11be35a1SLionel Sambuc rump_quota_shutdown 194*11be35a1SLionel Sambuc} 195*11be35a1SLionel Sambuc 196*11be35a1SLionel Sambuclimit_softiquota() 197*11be35a1SLionel Sambuc{ 198*11be35a1SLionel Sambuc create_ffs_server $* 199*11be35a1SLionel Sambuc local q=$4 200*11be35a1SLionel Sambuc local expect 201*11be35a1SLionel Sambuc local id=1 202*11be35a1SLionel Sambuc 203*11be35a1SLionel Sambuc case ${q} in 204*11be35a1SLionel Sambuc user) 205*11be35a1SLionel Sambuc expect=u 206*11be35a1SLionel Sambuc fail=g 207*11be35a1SLionel Sambuc ;; 208*11be35a1SLionel Sambuc group) 209*11be35a1SLionel Sambuc expect=g 210*11be35a1SLionel Sambuc fail=u 211*11be35a1SLionel Sambuc ;; 212*11be35a1SLionel Sambuc both) 213*11be35a1SLionel Sambuc expect="u g" 214*11be35a1SLionel Sambuc fail="" 215*11be35a1SLionel Sambuc ;; 216*11be35a1SLionel Sambuc *) 217*11be35a1SLionel Sambuc atf_fail "wrong quota type" 218*11be35a1SLionel Sambuc ;; 219*11be35a1SLionel Sambuc esac 220*11be35a1SLionel Sambuc 221*11be35a1SLionel Sambuc for q in ${expect} ; do 222*11be35a1SLionel Sambuc atf_check -s exit:0 \ 223*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt edquota -$q -s2m/4 -h3m/6 \ 224*11be35a1SLionel Sambuc -t 1d/1s ${id} 225*11be35a1SLionel Sambuc done 226*11be35a1SLionel Sambuc atf_check -s exit:0 rump.halt 227*11be35a1SLionel Sambuc 228*11be35a1SLionel Sambuc #now start the server which does the limits tests 229*11be35a1SLionel Sambuc atf_check -s exit:0 -o ignore \ 230*11be35a1SLionel Sambuc-e match:'test 3: create file beyond the soft limit after grace time returned 69: Disc quota exceeded' \ 231*11be35a1SLionel Sambuc $(atf_get_srcdir)/h_quota2_tests -b 3 ${IMG} ${RUMP_SERVER} 232*11be35a1SLionel Sambuc for q in ${expect} ; do 233*11be35a1SLionel Sambuc atf_check -s exit:0 \ 234*11be35a1SLionel Sambuc -o match:'/mnt 2560 B 2048 K 3072 K 5 \* 4 6 none' \ 235*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quota -$q -h ${id} 236*11be35a1SLionel Sambuc atf_check -s exit:0 \ 237*11be35a1SLionel Sambuc -o match:'daemon -\+ 2 2048 3072 5 4 6 none' \ 238*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt repquota -$q /mnt 239*11be35a1SLionel Sambuc done 240*11be35a1SLionel Sambuc rump_quota_shutdown 241*11be35a1SLionel Sambuc} 242*11be35a1SLionel Sambuc 243*11be35a1SLionel Sambucinherit_defaultquota() 244*11be35a1SLionel Sambuc{ 245*11be35a1SLionel Sambuc create_ffs_server $* 246*11be35a1SLionel Sambuc local q=$4 247*11be35a1SLionel Sambuc local expect 248*11be35a1SLionel Sambuc local id=1 249*11be35a1SLionel Sambuc 250*11be35a1SLionel Sambuc case ${q} in 251*11be35a1SLionel Sambuc user) 252*11be35a1SLionel Sambuc expect=u 253*11be35a1SLionel Sambuc fail=g 254*11be35a1SLionel Sambuc ;; 255*11be35a1SLionel Sambuc group) 256*11be35a1SLionel Sambuc expect=g 257*11be35a1SLionel Sambuc fail=u 258*11be35a1SLionel Sambuc ;; 259*11be35a1SLionel Sambuc both) 260*11be35a1SLionel Sambuc expect="u g" 261*11be35a1SLionel Sambuc fail="" 262*11be35a1SLionel Sambuc ;; 263*11be35a1SLionel Sambuc *) 264*11be35a1SLionel Sambuc atf_fail "wrong quota type" 265*11be35a1SLionel Sambuc ;; 266*11be35a1SLionel Sambuc esac 267*11be35a1SLionel Sambuc 268*11be35a1SLionel Sambuc for q in ${expect} ; do 269*11be35a1SLionel Sambuc atf_check -s exit:0 \ 270*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt edquota -$q -s2k/4 -h3k/6 \ 271*11be35a1SLionel Sambuc -t 2h/2h -d 272*11be35a1SLionel Sambuc done 273*11be35a1SLionel Sambuc for q in ${expect} ; do 274*11be35a1SLionel Sambuc atf_check -s exit:0 \ 275*11be35a1SLionel Sambuc -o match:'Disk quotas for .*id 1\): none' \ 276*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quota -$q -v ${id} 277*11be35a1SLionel Sambuc done 278*11be35a1SLionel Sambuc atf_check -s exit:0 rump.halt 279*11be35a1SLionel Sambuc 280*11be35a1SLionel Sambuc #now start the server which does the limits tests 281*11be35a1SLionel Sambuc atf_check -s exit:0 -o ignore \ 282*11be35a1SLionel Sambuc-e match:'test 0: write up to hard limit returned 69: Disc quota exceeded' \ 283*11be35a1SLionel Sambuc $(atf_get_srcdir)/h_quota2_tests -b 0 ${IMG} ${RUMP_SERVER} 284*11be35a1SLionel Sambuc for q in ${expect} ; do 285*11be35a1SLionel Sambuc atf_check -s exit:0 \ 286*11be35a1SLionel Sambuc -o match:'/mnt 3072 B\* 2048 B 3072 B 2:0 2 4 6 ' \ 287*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quota -$q -h ${id} 288*11be35a1SLionel Sambuc atf_check -s exit:0 \ 289*11be35a1SLionel Sambuc -o match:'daemon \+- 3 2 3 2:0 2 4 6' \ 290*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt repquota -$q /mnt 291*11be35a1SLionel Sambuc done 292*11be35a1SLionel Sambuc rump_quota_shutdown 293*11be35a1SLionel Sambuc} 294*11be35a1SLionel Sambuc 295*11be35a1SLionel Sambucinherit_defaultiquota() 296*11be35a1SLionel Sambuc{ 297*11be35a1SLionel Sambuc create_ffs_server $* 298*11be35a1SLionel Sambuc local q=$4 299*11be35a1SLionel Sambuc local expect 300*11be35a1SLionel Sambuc local id=1 301*11be35a1SLionel Sambuc 302*11be35a1SLionel Sambuc case ${q} in 303*11be35a1SLionel Sambuc user) 304*11be35a1SLionel Sambuc expect=u 305*11be35a1SLionel Sambuc fail=g 306*11be35a1SLionel Sambuc ;; 307*11be35a1SLionel Sambuc group) 308*11be35a1SLionel Sambuc expect=g 309*11be35a1SLionel Sambuc fail=u 310*11be35a1SLionel Sambuc ;; 311*11be35a1SLionel Sambuc both) 312*11be35a1SLionel Sambuc expect="u g" 313*11be35a1SLionel Sambuc fail="" 314*11be35a1SLionel Sambuc ;; 315*11be35a1SLionel Sambuc *) 316*11be35a1SLionel Sambuc atf_fail "wrong quota type" 317*11be35a1SLionel Sambuc ;; 318*11be35a1SLionel Sambuc esac 319*11be35a1SLionel Sambuc 320*11be35a1SLionel Sambuc for q in ${expect} ; do 321*11be35a1SLionel Sambuc atf_check -s exit:0 \ 322*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt edquota -$q -s2m/4 -h3m/6 \ 323*11be35a1SLionel Sambuc -t 2h/2h -d 324*11be35a1SLionel Sambuc done 325*11be35a1SLionel Sambuc for q in ${expect} ; do 326*11be35a1SLionel Sambuc atf_check -s exit:0 \ 327*11be35a1SLionel Sambuc -o match:'Disk quotas for .*id 1\): none' \ 328*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quota -$q -v ${id} 329*11be35a1SLionel Sambuc done 330*11be35a1SLionel Sambuc atf_check -s exit:0 rump.halt 331*11be35a1SLionel Sambuc 332*11be35a1SLionel Sambuc #now start the server which does the limits tests 333*11be35a1SLionel Sambuc atf_check -s exit:0 -o ignore \ 334*11be35a1SLionel Sambuc-e match:'test 2: create file up to hard limit returned 69: Disc quota exceeded' \ 335*11be35a1SLionel Sambuc $(atf_get_srcdir)/h_quota2_tests -b 2 ${IMG} ${RUMP_SERVER} 336*11be35a1SLionel Sambuc for q in ${expect} ; do 337*11be35a1SLionel Sambuc atf_check -s exit:0 \ 338*11be35a1SLionel Sambuc -o match:'/mnt 3072 B 2048 K 3072 K 6 \* 4 6 2:0' \ 339*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quota -$q -h ${id} 340*11be35a1SLionel Sambuc atf_check -s exit:0 \ 341*11be35a1SLionel Sambuc -o match:'daemon -\+ 3 2048 3072 6 4 6 2:0' \ 342*11be35a1SLionel Sambuc env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt repquota -$q /mnt 343*11be35a1SLionel Sambuc done 344*11be35a1SLionel Sambuc rump_quota_shutdown 345*11be35a1SLionel Sambuc} 346