Module Name: src
Committed By: jmmv
Date: Mon Jul 5 16:27:09 UTC 2010
Modified Files:
src/tests/fs/puffs: t_psshfs.sh
src/tests/fs/tmpfs: t_vnd.sh t_vnode_leak.sh
src/tests/kernel: t_umount.sh
src/tests/modules: t_modload.sh
Log Message:
Properly mark some test cases as having a cleanup routine. Stupidity of
the API? Most likely; will revise it.
Fixes atf-run breaking when running t_psshfs. This does not resolve the
underlying issue though, which is atf-run getting confused trying to
unmount the temporary mount point by itself (I think). (I'm now wondering
if atf should be bothering about unmounting stuff at all. Maybe not. It is
a tricky and uncommon thing.)
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/puffs/t_psshfs.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/tmpfs/t_vnd.sh \
src/tests/fs/tmpfs/t_vnode_leak.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/kernel/t_umount.sh
cvs rdiff -u -r1.6 -r1.7 src/tests/modules/t_modload.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/fs/puffs/t_psshfs.sh
diff -u src/tests/fs/puffs/t_psshfs.sh:1.6 src/tests/fs/puffs/t_psshfs.sh:1.7
--- src/tests/fs/puffs/t_psshfs.sh:1.6 Fri Jun 4 08:39:40 2010
+++ src/tests/fs/puffs/t_psshfs.sh Mon Jul 5 16:27:08 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_psshfs.sh,v 1.6 2010/06/04 08:39:40 jmmv Exp $
+# $NetBSD: t_psshfs.sh,v 1.7 2010/07/05 16:27:08 jmmv Exp $
#
# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -125,7 +125,7 @@
# The test cases.
# -------------------------------------------------------------------------
-atf_test_case inode_nos
+atf_test_case inode_nos cleanup
inode_nos_head() {
atf_set "descr" "Checks that different files get different inode" \
"numbers"
@@ -169,7 +169,7 @@
stop_ssh
}
-atf_test_case pwd
+atf_test_case pwd cleanup
pwd_head() {
atf_set "descr" "Checks that pwd works correctly"
atf_set "use.fs" "true"
Index: src/tests/fs/tmpfs/t_vnd.sh
diff -u src/tests/fs/tmpfs/t_vnd.sh:1.4 src/tests/fs/tmpfs/t_vnd.sh:1.5
--- src/tests/fs/tmpfs/t_vnd.sh:1.4 Fri Jun 4 08:39:40 2010
+++ src/tests/fs/tmpfs/t_vnd.sh Mon Jul 5 16:27:08 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_vnd.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
+# $NetBSD: t_vnd.sh,v 1.5 2010/07/05 16:27:08 jmmv Exp $
#
# Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -28,7 +28,7 @@
# Verifies that vnd works with files stored in tmpfs.
#
-atf_test_case basic
+atf_test_case basic cleanup
basic_head() {
atf_set "descr" "Verifies that vnd works with files stored in tmpfs"
atf_set "require.user" "root"
Index: src/tests/fs/tmpfs/t_vnode_leak.sh
diff -u src/tests/fs/tmpfs/t_vnode_leak.sh:1.4 src/tests/fs/tmpfs/t_vnode_leak.sh:1.5
--- src/tests/fs/tmpfs/t_vnode_leak.sh:1.4 Fri Jun 4 08:39:40 2010
+++ src/tests/fs/tmpfs/t_vnode_leak.sh Mon Jul 5 16:27:08 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_vnode_leak.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
+# $NetBSD: t_vnode_leak.sh,v 1.5 2010/07/05 16:27:08 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -25,7 +25,7 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-atf_test_case main
+atf_test_case main cleanup
main_head() {
atf_set "descr" "Verifies that vnodes are not leaked and that" \
"their reclaim operation works as expected: i.e.," \
Index: src/tests/kernel/t_umount.sh
diff -u src/tests/kernel/t_umount.sh:1.3 src/tests/kernel/t_umount.sh:1.4
--- src/tests/kernel/t_umount.sh:1.3 Sat Jun 12 13:31:35 2010
+++ src/tests/kernel/t_umount.sh Mon Jul 5 16:27:08 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_umount.sh,v 1.3 2010/06/12 13:31:35 pooka Exp $
+# $NetBSD: t_umount.sh,v 1.4 2010/07/05 16:27:08 jmmv Exp $
#
# Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -33,7 +33,7 @@
CVND=/dev/r${VND}
MPART=a
-atf_test_case umount
+atf_test_case umount cleanup
umount_head()
{
atf_set "descr" "Checks forced unmounting"
Index: src/tests/modules/t_modload.sh
diff -u src/tests/modules/t_modload.sh:1.6 src/tests/modules/t_modload.sh:1.7
--- src/tests/modules/t_modload.sh:1.6 Fri Jun 4 08:39:41 2010
+++ src/tests/modules/t_modload.sh Mon Jul 5 16:27:08 2010
@@ -1,4 +1,4 @@
-# $NetBSD: t_modload.sh,v 1.6 2010/06/04 08:39:41 jmmv Exp $
+# $NetBSD: t_modload.sh,v 1.7 2010/07/05 16:27:08 jmmv Exp $
#
# Copyright (c) 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -30,7 +30,7 @@
atf_check -s eq:0 -o file:expout -e empty sysctl ${1}
}
-atf_test_case plain
+atf_test_case plain cleanup
plain_head() {
atf_set "descr" "Test load without arguments"
atf_set "require.user" "root"
@@ -53,7 +53,7 @@
modunload k_helper >/dev/null 2>&1
}
-atf_test_case bflag
+atf_test_case bflag cleanup
bflag_head() {
atf_set "descr" "Test the -b flag"
atf_set "require.user" "root"
@@ -94,7 +94,7 @@
modunload k_helper >/dev/null 2>&1
}
-atf_test_case iflag
+atf_test_case iflag cleanup
iflag_head() {
atf_set "descr" "Test the -i flag"
atf_set "require.user" "root"
@@ -138,7 +138,7 @@
modunload k_helper >/dev/null 2>&1
}
-atf_test_case sflag
+atf_test_case sflag cleanup
sflag_head() {
atf_set "descr" "Test the -s flag"
atf_set "require.user" "root"