To do so, a few dependencies have been imported: * external/bsd/lutok * external/mit/lua * external/public-domain/sqlite * external/public-domain/xz The Kyua framework is the new generation of ATF (Automated Test Framework), it is composed of: * external/bsd/atf * external/bsd/kyua-atf-compat * external/bsd/kyua-cli * external/bsd/kyua-tester * tests Kyua/ATF being written in C++, it depends on libstdc++ which is provided by GCC. As this is not part of the sources, Kyua is only compiled when the native GCC utils are installed. To install Kyua do the following: * In a cross-build enviromnent, add the following to the build.sh commandline: -V MKBINUTILS=yes -V MKGCCCMDS=yes WARNING: At this point the import is still experimental, and not supported on native builds (a.k.a make build). Change-Id: I26aee23c5bbd2d64adcb7c1beb98fe0d479d7ada
44 lines
1 KiB
Bash
44 lines
1 KiB
Bash
# $NetBSD: quotas_common.sh,v 1.2 2011/03/06 17:08:41 bouyer Exp $
|
|
|
|
create_with_quotas()
|
|
{
|
|
local endian=$1; shift
|
|
local vers=$1; shift
|
|
local uid=$(id -u)
|
|
local gid=$(id -g)
|
|
|
|
atf_check -o ignore -e ignore newfs -B ${endian} -O ${vers} \
|
|
-s 4000 -F ${IMG}
|
|
atf_check -o ignore -e ignore tunefs -q user -q group -F ${IMG}
|
|
atf_check -s exit:0 -o 'match:NO USER QUOTA INODE \(CREATED\)' \
|
|
-o 'match:USER QUOTA MISMATCH FOR ID '${uid}': 0/0 SHOULD BE 1/1' \
|
|
-o 'match:GROUP QUOTA MISMATCH FOR ID '${gid}': 0/0 SHOULD BE 1/1' \
|
|
fsck_ffs -p -F ${IMG}
|
|
}
|
|
|
|
# from tests/ipf/h_common.sh via tests/sbin/resize_ffs
|
|
test_case()
|
|
{
|
|
local name="${1}"; shift
|
|
local check_function="${1}"; shift
|
|
local descr="${1}"; shift
|
|
|
|
atf_test_case "${name}"
|
|
|
|
eval "${name}_head() { \
|
|
atf_set "descr" "Checks ${descr} quotas inodes"
|
|
}"
|
|
eval "${name}_body() { \
|
|
${check_function} " "${@}" "; \
|
|
}"
|
|
tests="${tests} ${name}"
|
|
}
|
|
|
|
atf_init_test_cases()
|
|
{
|
|
IMG=fsimage
|
|
DIR=target
|
|
for i in ${tests}; do
|
|
atf_add_test_case $i
|
|
done
|
|
}
|