1 1.2 bouyer # $NetBSD: quotas_common.sh,v 1.2 2011/03/06 17:08:41 bouyer Exp $ 2 1.2 bouyer 3 1.2 bouyer create_with_quotas() 4 1.2 bouyer { 5 1.2 bouyer local endian=$1; shift 6 1.2 bouyer local vers=$1; shift 7 1.2 bouyer local type=$1; shift 8 1.2 bouyer local op; 9 1.2 bouyer if [ ${type} = "both" ]; then 10 1.2 bouyer op="-q user -q group" 11 1.2 bouyer else 12 1.2 bouyer op="-q ${type}" 13 1.2 bouyer fi 14 1.2 bouyer atf_check -o ignore -e ignore newfs ${op} \ 15 1.2 bouyer -B ${endian} -O ${vers} -s 4000 -F ${IMG} 16 1.2 bouyer } 17 1.2 bouyer 18 1.2 bouyer # from tests/ipf/h_common.sh via tests/sbin/resize_ffs 19 1.2 bouyer test_case() 20 1.2 bouyer { 21 1.2 bouyer local name="${1}"; shift 22 1.2 bouyer local check_function="${1}"; shift 23 1.2 bouyer local descr="${1}"; shift 24 1.2 bouyer 25 1.2 bouyer atf_test_case "${name}" 26 1.2 bouyer 27 1.2 bouyer eval "${name}_head() { \ 28 1.2 bouyer atf_set "descr" "Checks ${descr} quotas inodes" 29 1.2 bouyer }" 30 1.2 bouyer eval "${name}_body() { \ 31 1.2 bouyer ${check_function} " "${@}" "; \ 32 1.2 bouyer }" 33 1.2 bouyer tests="${tests} ${name}" 34 1.2 bouyer } 35 1.2 bouyer 36 1.2 bouyer atf_init_test_cases() 37 1.2 bouyer { 38 1.2 bouyer IMG=fsimage 39 1.2 bouyer DIR=target 40 1.2 bouyer for i in ${tests}; do 41 1.2 bouyer atf_add_test_case $i 42 1.2 bouyer done 43 1.2 bouyer } 44