Source-Changes-HG archive

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

[src/trunk]: src/tests/modules Be more verbose if we get unexpected error cod...



details:   https://anonhg.NetBSD.org/src/rev/ee65bbb260b5
branches:  trunk
changeset: 781102:ee65bbb260b5
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Aug 19 20:54:56 2012 +0000

description:
Be more verbose if we get unexpected error codes from modctl.

diffstat:

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

diffs (28 lines):

diff -r e44b61937a44 -r ee65bbb260b5 tests/modules/t_modctl.c
--- a/tests/modules/t_modctl.c  Sun Aug 19 19:31:13 2012 +0000
+++ b/tests/modules/t_modctl.c  Sun Aug 19 20:54:56 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_modctl.c,v 1.10 2012/08/13 08:07:03 martin Exp $     */
+/*     $NetBSD: t_modctl.c,v 1.11 2012/08/19 20:54:56 martin 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.10 2012/08/13 08:07:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: t_modctl.c,v 1.11 2012/08/19 20:54:56 martin Exp $");
 
 #include <sys/module.h>
 #include <sys/sysctl.h>
@@ -74,7 +74,8 @@
                atf_tc_skip("Kernel does not have 'options MODULAR'.");
        else if (err == EPERM)
                atf_tc_skip("Module loading administratively forbidden");
-       ATF_CHECK(err == 0);
+       ATF_REQUIRE_EQ_MSG(err, 0, "unexpected error code %d from "
+           "modctl(MODCTL_EXISTS, 0)", err);
 }
 
 static bool



Home | Main Index | Thread Index | Old Index