Source-Changes-HG archive

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

[src/trunk]: src/tests/modules Skip the tests even if modctl(2) does not fail...



details:   https://anonhg.NetBSD.org/src/rev/ee62a24a0fcf
branches:  trunk
changeset: 777992:ee62a24a0fcf
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Mar 11 19:33:17 2012 +0000

description:
Skip the tests even if modctl(2) does not fail specifically with ENOSYS.

diffstat:

 tests/modules/t_modctl.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 31b587fbaa04 -r ee62a24a0fcf tests/modules/t_modctl.c
--- a/tests/modules/t_modctl.c  Sun Mar 11 19:27:26 2012 +0000
+++ b/tests/modules/t_modctl.c  Sun Mar 11 19:33:17 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_modctl.c,v 1.5 2010/11/03 16:10:23 christos Exp $    */
+/*     $NetBSD: t_modctl.c,v 1.6 2012/03/11 19:33:17 jruoho Exp $      */
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: t_modctl.c,v 1.5 2010/11/03 16:10:23 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: t_modctl.c,v 1.6 2012/03/11 19:33:17 jruoho Exp $");
 
 #include <sys/module.h>
 #include <sys/sysctl.h>
@@ -62,7 +62,7 @@
 bool
 check_modular(void)
 {
-       bool res;
+       bool res = false;
        struct iovec iov;
 
        iov.iov_base = NULL;
@@ -70,8 +70,6 @@
 
        if (modctl(MODCTL_STAT, &iov) == 0)
                res = true;
-       else
-               res = (errno != ENOSYS);
 
        return res;
 }



Home | Main Index | Thread Index | Old Index