From: Gerd von Egidy Date: Fri, 10 Feb 2012 12:18:23 +0000 (+0100) Subject: fix unit test for pid_of in case of systemd X-Git-Tag: v2.6~18 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=246bcd586f1dd80f562556584dc4cd1c7bd2335b;p=libi2ncommon fix unit test for pid_of in case of systemd --- diff --git a/test/test_filefunc.cpp b/test/test_filefunc.cpp index c137b5a..09c6d3b 100644 --- a/test/test_filefunc.cpp +++ b/test/test_filefunc.cpp @@ -291,8 +291,14 @@ BOOST_AUTO_TEST_CASE(TestPidOf1) std::vector< pid_t > pid_list; bool res= pid_of("init", pid_list); - BOOST_CHECK_EQUAL( true, res); + + if (pid_list.empty()) + { + res= pid_of("systemd", pid_list); + BOOST_CHECK_EQUAL( true, res); + } + BOOST_CHECK_EQUAL( false, pid_list.empty() ); std::vector< pid_t >::const_iterator pos1 =