Merge bitcoin/bitcoin#32403: test: remove Boost SIGCHLD workaround.
3add6ab9adtest: remove Boost SIGCHLD workaround. (fanquake) Pull request description: The related code was removed from Boost in https://github.com/boostorg/test/commit/2e3bd1025d417f661a7edbf7b7dbcb801118033d. ACKs for top commit: achow101: ACK3add6ab9adlaanwj: ACK3add6ab9adhebasto: ACK3add6ab9ad, I have reviewed the code and it looks OK. mabu44: ACK3add6ab9adTree-SHA512: a0db2bb4e6a476c920a97183bd807e800d935114ff28f8802373a08b5330df42a9be953e7ea6e3c09f2ed45175f60c26c33bb4e25010269e6e491f12867ba008
This commit is contained in:
1 file changed
-8
@@ -40,7 +40,6 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <signal.h>
|
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1198,11 +1197,6 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory)
|
|||||||
fs::path dirname = m_args.GetDataDirBase() / "lock_dir";
|
fs::path dirname = m_args.GetDataDirBase() / "lock_dir";
|
||||||
const fs::path lockname = ".lock";
|
const fs::path lockname = ".lock";
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
// Revert SIGCHLD to default, otherwise boost.test will catch and fail on
|
|
||||||
// it: there is BOOST_TEST_IGNORE_SIGCHLD but that only works when defined
|
|
||||||
// at build-time of the boost library
|
|
||||||
void (*old_handler)(int) = signal(SIGCHLD, SIG_DFL);
|
|
||||||
|
|
||||||
// Fork another process for testing before creating the lock, so that we
|
// Fork another process for testing before creating the lock, so that we
|
||||||
// won't fork while holding the lock (which might be undefined, and is not
|
// won't fork while holding the lock (which might be undefined, and is not
|
||||||
// relevant as test case as that is avoided with -daemonize).
|
// relevant as test case as that is avoided with -daemonize).
|
||||||
@@ -1280,8 +1274,6 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory)
|
|||||||
BOOST_CHECK_EQUAL(processstatus, 0);
|
BOOST_CHECK_EQUAL(processstatus, 0);
|
||||||
BOOST_CHECK_EQUAL(util::LockDirectory(dirname, lockname, true), util::LockResult::Success);
|
BOOST_CHECK_EQUAL(util::LockDirectory(dirname, lockname, true), util::LockResult::Success);
|
||||||
|
|
||||||
// Restore SIGCHLD
|
|
||||||
signal(SIGCHLD, old_handler);
|
|
||||||
BOOST_CHECK_EQUAL(close(fd[1]), 0); // Close our side of the socketpair
|
BOOST_CHECK_EQUAL(close(fd[1]), 0); // Close our side of the socketpair
|
||||||
#endif
|
#endif
|
||||||
// Clean up
|
// Clean up
|
||||||
|
|||||||
Reference in new issue
Block a user