Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/modules For now, skip module tests if modctl(8) fails ...



details:   https://anonhg.NetBSD.org/src/rev/d8667d76c183
branches:  trunk
changeset: 778918:d8667d76c183
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Fri Apr 20 05:41:25 2012 +0000

description:
For now, skip module tests if modctl(8) fails either with EPERM or ENOSYS.

diffstat:

 tests/modules/t_abi_uvm.sh |  9 +++++----
 tests/modules/t_modload.sh |  8 ++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (61 lines):

diff -r 07bbc1e58ffe -r d8667d76c183 tests/modules/t_abi_uvm.sh
--- a/tests/modules/t_abi_uvm.sh        Fri Apr 20 05:33:41 2012 +0000
+++ b/tests/modules/t_abi_uvm.sh        Fri Apr 20 05:41:25 2012 +0000
@@ -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_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 -r 07bbc1e58ffe -r d8667d76c183 tests/modules/t_modload.sh
--- a/tests/modules/t_modload.sh        Fri Apr 20 05:33:41 2012 +0000
+++ b/tests/modules/t_modload.sh        Fri Apr 20 05:41:25 2012 +0000
@@ -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 @@
        $(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 @@
        $(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 @@
        $(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
 



Home | Main Index | Thread Index | Old Index