From e5c3739ba25535b9d9cf459e2213365a6e88e43c Mon Sep 17 00:00:00 2001 From: ngie Date: Wed, 13 May 2015 12:13:18 +0000 Subject: [PATCH] MFC r282211,r282244: r282211: ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase no longer bombs out PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no longer bombs out if it prints to stderr r282244: Fix typo. It should have been atf_tc_skip, not atf_skip Reported by: many, Jenkins Pointyhat to: ngie git-svn-id: svn://svn.freebsd.org/base/stable/10@282859 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- tests/freebsd_test_suite/macros.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/freebsd_test_suite/macros.h b/tests/freebsd_test_suite/macros.h index 755a9942d..8d95f0532 100644 --- a/tests/freebsd_test_suite/macros.h +++ b/tests/freebsd_test_suite/macros.h @@ -32,21 +32,24 @@ #include #include #include -#include #include +#include +#include #include #define ATF_REQUIRE_KERNEL_MODULE(_mod_name) do { \ - ATF_REQUIRE_MSG(modfind(_mod_name) != -1, \ - "module %s could not be resolved: %s", \ - _mod_name, strerror(errno)); \ + if (modfind(_mod_name) == -1) { \ + atf_tc_skip("module %s could not be resolved: %s", \ + _mod_name, strerror(errno)); \ + } \ } while(0) -#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ +#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ if (modfind(_mod_name) == -1) { \ - err(_exit_code, "module %s could not be resolved", \ - _mod_name); \ + printf("module %s could not be resolved: %s\n", \ + _mod_name, strerror(errno)); \ + _exit(_exit_code); \ } \ } while(0) -- 2.45.0