Source-Changes-HG archive

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

[src/trunk]: src/tests/modules Skip Xen. XXX: There should be a reliable way ...



details:   https://anonhg.NetBSD.org/src/rev/4e20105c3c2f
branches:  trunk
changeset: 778224:4e20105c3c2f
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Tue Mar 20 05:50:11 2012 +0000

description:
Skip Xen. XXX: There should be a reliable way to detect MODULAR.

diffstat:

 tests/modules/t_abi_uvm.sh |  11 ++++++++++-
 tests/modules/t_modload.sh |  29 ++++++++++++++++++++++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)

diffs (82 lines):

diff -r f0e36fe7c8b2 -r 4e20105c3c2f tests/modules/t_abi_uvm.sh
--- a/tests/modules/t_abi_uvm.sh        Tue Mar 20 05:21:45 2012 +0000
+++ b/tests/modules/t_abi_uvm.sh        Tue Mar 20 05:50:11 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_abi_uvm.sh,v 1.1 2012/02/17 22:36:50 jmmv Exp $
+# $NetBSD: t_abi_uvm.sh,v 1.2 2012/03/20 05:50:11 jruoho Exp $
 #
 # Copyright (c) 2012 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -31,6 +31,15 @@
        atf_set "require.user" "root"
 }
 PAGE_SIZE_body() {
+
+       # XXX: There should be a reliable way to detect MODULAR.
+       #
+       sysctl machdep.xen > /dev/null 2>&1
+
+       if [ $? -eq 0 ]; then
+               atf_skip "host does not support modules"
+       fi
+
        if modload $(atf_get_srcdir)/k_uvm/k_uvm.kmod; then
                :
        else
diff -r f0e36fe7c8b2 -r 4e20105c3c2f tests/modules/t_modload.sh
--- a/tests/modules/t_modload.sh        Tue Mar 20 05:21:45 2012 +0000
+++ b/tests/modules/t_modload.sh        Tue Mar 20 05:50:11 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_modload.sh,v 1.9 2011/03/24 21:52:51 jmmv Exp $
+# $NetBSD: t_modload.sh,v 1.10 2012/03/20 05:50:11 jruoho Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,6 +36,15 @@
        atf_set "require.user" "root"
 }
 plain_body() {
+
+       # XXX: There should be a reliable way to detect MODULAR.
+       #
+       sysctl machdep.xen > /dev/null 2>&1
+
+       if [ $? -eq 0 ]; then
+               atf_skip "host does not support modules"
+       fi
+
        cat >experr <<EOF
 modload: No such file or directory
 EOF
@@ -99,6 +108,15 @@
        atf_set "require.user" "root"
 }
 iflag_body() {
+
+       # XXX: There should be a reliable way to detect MODULAR.
+       #
+       sysctl machdep.xen > /dev/null 2>&1
+
+       if [ $? -eq 0 ]; then
+               atf_skip "host does not support modules"
+       fi
+
        echo "Checking error conditions"
 
        atf_check -s eq:1 -o empty -e save:stderr modload -i foo \
@@ -143,6 +161,15 @@
        atf_set "require.user" "root"
 }
 sflag_body() {
+
+       # XXX: There should be a reliable way to detect MODULAR.
+       #
+       sysctl machdep.xen > /dev/null 2>&1
+
+       if [ $? -eq 0 ]; then
+               atf_skip "host does not support modules"
+       fi
+
        echo "Checking error conditions"
 
        atf_check -s eq:1 -o empty -e save:stderr modload -s foo \



Home | Main Index | Thread Index | Old Index