[cpp-sp] branch main updated: Stop checking platform-specific error.
Scott Cantor
cantor.2 at osu.edu
Mon Oct 20 15:44:51 UTC 2025
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=d2585f8797d967dbb580f3b99494c91780ae5f49
The following commit(s) were added to refs/heads/main by this push:
new d2585f87 Stop checking platform-specific error.
d2585f87 is described below
commit d2585f8797d967dbb580f3b99494c91780ae5f49
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Oct 20 11:44:47 2025 -0400
Stop checking platform-specific error.
---
tests/AgentConfigTests.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/AgentConfigTests.cpp b/tests/AgentConfigTests.cpp
index d74cd749..bb4eab1d 100644
--- a/tests/AgentConfigTests.cpp
+++ b/tests/AgentConfigTests.cpp
@@ -39,8 +39,9 @@ struct AC_Fixture {
class exceptionCheck {
public:
exceptionCheck(const string& msg) : m_msg(msg) {}
+ exceptionCheck(const char* msg) : m_msg(msg ? msg : "") {}
bool check_message(const exception& e) {
- return strstr(e.what(), m_msg.c_str()) != nullptr;
+ return m_msg.empty() ? true : strstr(e.what(), m_msg.c_str()) != nullptr;
}
private:
string m_msg;
@@ -103,11 +104,11 @@ BOOST_FIXTURE_TEST_CASE(AgentConfig_init_syslog, AC_Fixture)
BOOST_FIXTURE_TEST_CASE(AgentConfig_init_fatal_exts, AC_Fixture)
{
- // TODO: this is probably going to vary by platform and require alternate validation.
#ifdef WIN32
exceptionCheck checker_fatal("Unable to load extension library: \\path\\to\\extension.so");
#else
- exceptionCheck checker_fatal("dlopen(/path/to/extension.so, 0x0001): tried: ");
+ // This varies too much by platform to test a specific message.
+ exceptionCheck checker_fatal(nullptr);
#endif // !WIN32
BOOST_CHECK_EXCEPTION(AgentConfig::getConfig().init(nullptr, (data_path + "fatal-exts-agent.ini").c_str(), true),
runtime_error, checker_fatal.check_message);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list