version 1.11, 2012/08/19 20:54:56 |
version 1.12, 2012/08/20 08:07:52 |
Line 70 check_permission(void) |
|
Line 70 check_permission(void) |
|
int err; |
int err; |
|
|
err = modctl(MODCTL_EXISTS, 0); |
err = modctl(MODCTL_EXISTS, 0); |
if (err == ENOSYS) |
if (err == 0) return; |
|
if (errno == ENOSYS) |
atf_tc_skip("Kernel does not have 'options MODULAR'."); |
atf_tc_skip("Kernel does not have 'options MODULAR'."); |
else if (err == EPERM) |
else if (errno == EPERM) |
atf_tc_skip("Module loading administratively forbidden"); |
atf_tc_skip("Module loading administratively forbidden"); |
ATF_REQUIRE_EQ_MSG(err, 0, "unexpected error code %d from " |
ATF_REQUIRE_EQ_MSG(errno, 0, "unexpected error %d from " |
"modctl(MODCTL_EXISTS, 0)", err); |
"modctl(MODCTL_EXISTS, 0)", errno); |
} |
} |
|
|
static bool |
static bool |