summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-12-19 17:34:13 -0800
committerWilliam A. Kennington III <wak@google.com>2019-01-14 22:57:24 +0000
commit062205d78d7fd0209e3438807a28c428823ed145 (patch)
tree801d7dcaaff73996e3669b115e290fe84e239fcb /test
parent34fdbf3bc88db804b4dd131cb912680012996612 (diff)
downloadsdbusplus-062205d78d7fd0209e3438807a28c428823ed145.tar.gz
sdbusplus-062205d78d7fd0209e3438807a28c428823ed145.zip
bus: Only close connections we own
If we have multiple code segments in the same thread acquiring the default bus, we end up with the potential for one of those handles to be destroyed, calling sd_event_flush_close_unref(). This terminates the bus for all users of the same reference. Any of the reference which still exist after the first destroy will then return ENOTCONN for all bus operations since it is now closed. This behavior is undesirable as we expect to be able to have transient bus references. However, we do want to make sure we clean up any buses created by sd_bus_open(). See openbmc/phosphor-time-manager@4e84539349dac086ce2a58e5b9900ed4e40a2eaf for a specific example of this behavior being unwanted. Change-Id: I8aad7e282e9d66993b63e85532dce37c179ad5dc Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'test')
-rw-r--r--test/bus/match.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/bus/match.cpp b/test/bus/match.cpp
index 3a5cc49..2074cde 100644
--- a/test/bus/match.cpp
+++ b/test/bus/match.cpp
@@ -6,7 +6,7 @@
class Match : public ::testing::Test
{
protected:
- decltype(sdbusplus::bus::new_default()) bus = sdbusplus::bus::new_default();
+ sdbusplus::bus::bus bus = sdbusplus::bus::new_bus();
static constexpr auto busName = "xyz.openbmc_project.sdbusplus.test.Match";
OpenPOWER on IntegriCloud