1 # $NetBSD: ffs_common.sh,v 1.2 2013/07/29 13:15:24 skrll Exp $
9 if [ ${type} = "both" ]; then
14 atf_check
-o ignore
-e ignore newfs
${op} \
15 -B ${endian} -O ${vers} -s 4000 -F ${IMG}
22 atf_check
-o ignore
-e ignore $
(atf_get_srcdir
)/h_ffs_server \
23 ${sarg} ${IMG} ${RUMP_SERVER}
28 for s
in ${RUMP_SOCKETS_LIST}; do
29 atf_check
-s exit:0 env RUMP_SERVER
=unix
://${s} rump.halt
;
31 # check that the quota inode creation didn't corrupt the filesystem
32 atf_check
-s exit:0 -o "match:already clean" \
33 -o "match:Phase 6 - Check Quotas" \
34 fsck_ffs
-nf -F ${IMG}
37 # from tests/ipf/h_common.sh via tests/sbin/resize_ffs
40 local name
="${1}"; shift
41 local check_function
="${1}"; shift
42 local descr
="${1}"; shift
44 atf_test_case
"${name}" cleanup
46 eval "${name}_head() { \
47 atf_set "descr
" "${descr}"
48 atf_set "timeout
" "60"
50 eval "${name}_body() { \
51 RUMP_SOCKETS_LIST=\${RUMP_SOCKET}; \
52 export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
53 ${check_function} " "${@}" "; \
55 eval "${name}_cleanup() { \
56 for s in \${RUMP_SOCKETS_LIST}; do \
57 export RUMP_SERVER=unix://\${s}; \
58 atf_check -s exit:1 -o ignore -e ignore rump.halt; \
61 tests
="${tests} ${name}"
66 local name
="${1}"; shift
67 local check_function
="${1}"; shift
68 local descr
="${1}"; shift
70 atf_test_case
"${name}" cleanup
72 eval "${name}_head() { \
73 atf_set "descr
" "${descr}"
74 atf_set "require.user
" "root
"
75 atf_set "timeout
" "360"
77 eval "${name}_body() { \
78 RUMP_SOCKETS_LIST=\${RUMP_SOCKET}; \
79 export RUMP_SERVER=unix://\${RUMP_SOCKET}; \
80 ${check_function} " "${@}" "; \
82 eval "${name}_cleanup() { \
83 for s in \${RUMP_SOCKETS_LIST}; do \
84 export RUMP_SERVER=unix://\${s}; \
85 atf_check -s exit:1 -o ignore -e ignore rump.halt; \
88 tests
="${tests} ${name}"