svn commit: r345779 - projects/capsicum-test/contrib/capsicum-test
Enji Cooper
ngie at FreeBSD.org
Tue Sep 3 14:06:08 UTC 2019
Author: ngie
Date: Mon Apr 1 20:02:26 2019
New Revision: 345779
URL: https://svnweb.freebsd.org/changeset/base/345779
Log:
Clarify why `kern.trap_enotcap` being set should cause the tests to be skipped.
Modified:
projects/capsicum-test/contrib/capsicum-test/capsicum-test-main.cc
Modified: projects/capsicum-test/contrib/capsicum-test/capsicum-test-main.cc
==============================================================================
--- projects/capsicum-test/contrib/capsicum-test/capsicum-test-main.cc Mon Apr 1 19:19:51 2019 (r345778)
+++ projects/capsicum-test/contrib/capsicum-test/capsicum-test-main.cc Mon Apr 1 20:02:26 2019 (r345779)
@@ -47,6 +47,8 @@ class SetupEnvironment : public ::testing::Environment
GTEST_SKIP() << "Skipping tests because capsicum support is not "
<< "enabled in the kernel.";
}
+ // If this OID is enabled, it will send SIGTRAP to the process when
+ // `ENOTCAPABLE` is returned.
const char *oid = "kern.trap_enotcap";
rc = sysctlbyname(oid, &trap_enotcap_enabled, &trap_enotcap_enabled_len,
nullptr, 0);
@@ -54,8 +56,9 @@ class SetupEnvironment : public ::testing::Environment
GTEST_FAIL() << "sysctlbyname failed: " << strerror(errno);
}
if (trap_enotcap_enabled) {
- GTEST_SKIP() << "Sysctl " << oid << " enabled. "
- << "Skipping tests to avoid non-determinism with results.";
+ GTEST_SKIP() << "Debug sysctl " << oid << " enabled. "
+ << "Skipping tests because it's enablement invalidates the "
+ << "test results.";
}
#endif /* FreeBSD */
}
More information about the svn-src-projects
mailing list