summaryrefslogtreecommitdiff
path: root/tests/modules
diff options
context:
space:
mode:
authorjruoho <jruoho@NetBSD.org>2012-04-20 05:41:25 +0000
committerjruoho <jruoho@NetBSD.org>2012-04-20 05:41:25 +0000
commitf3a88b9eaa71bb8aad1cc9561be4b31bc2ac4cba (patch)
tree92d27d08305f045ea4aacbe46b673409020ef059 /tests/modules
parent59ff20223d7f13aaef95837fa2369040da44186f (diff)
For now, skip module tests if modctl(8) fails either with EPERM or ENOSYS.
Diffstat (limited to 'tests/modules')
-rw-r--r--tests/modules/t_abi_uvm.sh9
-rw-r--r--tests/modules/t_modload.sh8
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/modules/t_abi_uvm.sh b/tests/modules/t_abi_uvm.sh
index 58502479913..b855bc831da 100644
--- a/tests/modules/t_abi_uvm.sh
+++ b/tests/modules/t_abi_uvm.sh
@@ -1,4 +1,4 @@
-# $NetBSD: t_abi_uvm.sh,v 1.2 2012/03/20 05:50:11 jruoho Exp $
+# $NetBSD: t_abi_uvm.sh,v 1.3 2012/04/20 05:41:25 jruoho Exp $
#
# Copyright (c) 2012 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -32,11 +32,12 @@ PAGE_SIZE_head() {
}
PAGE_SIZE_body() {
- # XXX: There should be a reliable way to detect MODULAR.
+ # XXX: Adjust when modctl(8) fails consistently.
#
- sysctl machdep.xen > /dev/null 2>&1
+ $(atf_get_srcdir)/k_helper3 \
+ "%s/k_helper/k_helper.kmod" $(atf_get_srcdir)
- if [ $? -eq 0 ]; then
+ if [ $? -eq 1 ] || [ $? -eq 78 ]; then
atf_skip "host does not support modules"
fi
diff --git a/tests/modules/t_modload.sh b/tests/modules/t_modload.sh
index bbbdb92abf9..561bb6f6d57 100644
--- a/tests/modules/t_modload.sh
+++ b/tests/modules/t_modload.sh
@@ -1,4 +1,4 @@
-# $NetBSD: t_modload.sh,v 1.12 2012/04/14 02:46:17 pgoyette Exp $
+# $NetBSD: t_modload.sh,v 1.13 2012/04/20 05:41:25 jruoho Exp $
#
# Copyright (c) 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -42,7 +42,7 @@ plain_body() {
$(atf_get_srcdir)/k_helper3 \
"%s/k_helper/k_helper.kmod" $(atf_get_srcdir)
- if [ $? -eq 78 ]; then
+ if [ $? -eq 1 ] || [ $? -eq 78 ]; then
atf_skip "host does not support modules"
fi
@@ -115,7 +115,7 @@ iflag_body() {
$(atf_get_srcdir)/k_helper3 \
"%s/k_helper/k_helper.kmod" $(atf_get_srcdir)
- if [ $? -eq 78 ]; then
+ if [ $? -eq 1 ] || [ $? -eq 78 ]; then
atf_skip "host does not support modules"
fi
@@ -169,7 +169,7 @@ sflag_body() {
$(atf_get_srcdir)/k_helper3 \
"%s/k_helper/k_helper.kmod" $(atf_get_srcdir)
- if [ $? -eq 78 ]; then
+ if [ $? -eq 1 ] || [ $? -eq 78 ]; then
atf_skip "host does not support modules"
fi