Remove building with NOCRYPTO option
[minix3.git] / tests / sbin / fsck_ffs / quotas_common.sh
blob7d4ab58b995171eebef910ac43fbd135cf807b18
1 # $NetBSD: quotas_common.sh,v 1.2 2011/03/06 17:08:41 bouyer Exp $
3 create_with_quotas()
5 local endian=$1; shift
6 local vers=$1; shift
7 local uid=$(id -u)
8 local gid=$(id -g)
10 atf_check -o ignore -e ignore newfs -B ${endian} -O ${vers} \
11 -s 4000 -F ${IMG}
12 atf_check -o ignore -e ignore tunefs -q user -q group -F ${IMG}
13 atf_check -s exit:0 -o 'match:NO USER QUOTA INODE \(CREATED\)' \
14 -o 'match:USER QUOTA MISMATCH FOR ID '${uid}': 0/0 SHOULD BE 1/1' \
15 -o 'match:GROUP QUOTA MISMATCH FOR ID '${gid}': 0/0 SHOULD BE 1/1' \
16 fsck_ffs -p -F ${IMG}
19 # from tests/ipf/h_common.sh via tests/sbin/resize_ffs
20 test_case()
22 local name="${1}"; shift
23 local check_function="${1}"; shift
24 local descr="${1}"; shift
26 atf_test_case "${name}"
28 eval "${name}_head() { \
29 atf_set "descr" "Checks ${descr} quotas inodes"
31 eval "${name}_body() { \
32 ${check_function} " "${@}" "; \
34 tests="${tests} ${name}"
37 atf_init_test_cases()
39 IMG=fsimage
40 DIR=target
41 for i in ${tests}; do
42 atf_add_test_case $i
43 done