Module Name: src Committed By: martin Date: Sun Aug 19 20:54:56 UTC 2012
Modified Files: src/tests/modules: t_modctl.c Log Message: Be more verbose if we get unexpected error codes from modctl. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/modules/t_modctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/modules/t_modctl.c diff -u src/tests/modules/t_modctl.c:1.10 src/tests/modules/t_modctl.c:1.11 --- src/tests/modules/t_modctl.c:1.10 Mon Aug 13 08:07:03 2012 +++ src/tests/modules/t_modctl.c Sun Aug 19 20:54:56 2012 @@ -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 @@ check_permission(void) 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