- EXPECT_EQ/EXPECT_NE instead of EXPECT_TRUE(a == b) in the parts,
memory resource and plugin manager tests; split the && checks
- ASSERT_NE on the message pointer before it is dereferenced
- ASSERT_TRUE/ASSERT_FALSE instead of ASSERT_EQ(x, true/false)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Turn the per-transport TEST() copies into TEST_P() suites:
Messages, ShmMessages, Regions, ConnectedPeers and Options
- The test names change, e.g. Resize.shmem_expanded_metadata is now
Messages.Resize/shmem_expanded_metadata
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the in-process tests used fixed, relative ipc addresses; the socket
files stayed in the build directory (99 files after 6 runs), and two
runs of the same test at the same time could share a socket
- use test::IpcAddress: a unique path in /tmp that the destructor
removes
- drop the session suffix of the inproc addresses: an inproc address
is local to the process
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 33 places repeated the same session, shm segment size, shm monitor
and expanded metadata properties
- call test::Configure() and set only the properties that differ
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- an ASSERT_* between thread start and join() returned with a joinable
std::thread, and its destructor called std::terminate()
- the PluginServices fixture ended the device only from Idle; after a
failure in another state, the join waited until the ctest timeout
- use StateMachineThread in the Transitions tests and in the fixture,
and JoiningThread in Region.LockOrder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- an ASSERT_* in a region callback returned before blocker.Signal(),
and the test then waited in blocker.Wait() until the ctest timeout
- use EXPECT_* in the callbacks, so that the signal always comes
- wait with a deadline (test::Semaphore) in the region and message
tests
- in RegionEventSubscriptions, make the semaphore outlive the factory
that calls the callback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ZeroCopyFromUnmanaged and RegionEventSubscriptions set the console
severity to debug and did not restore it
- the setting stayed active for all later tests in the same process,
e.g. with --gtest_repeat or a direct run of the test binary
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the message, region, channel and transport tests ignored the return
values of these calls; a failed bind or a short transfer showed up
later as an unrelated failure, or not at all
- assert each result where the test uses it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GetRegion() locks the local region mutex first and then the
session-wide shmem mutex; CreateRegion() locked them in the opposite
order
- a thread that creates a region and a thread that opens a region of
another process in the same session can deadlock (ABBA)
- lock the local region mutex first also in CreateRegion()
- add a regression test
Refs: #334
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- RemoveRegion() held the session-wide shmem mutex and the local region
mutex while it joined the ack threads of the region
- the ack receiver calls the user callback for each outstanding ack
during the linger period; a callback that calls into the transport
(e.g. GetRegionInfo(), or a message destruction that opens a region)
waits for one of these mutexes, and the destruction never ends
- the shmem mutex is shared by all processes of the session, so the
other processes hang also, and new processes hang at startup
- stop the acks without a lock, then lock each mutex separately and
only for the access to the shared data
- add a regression test
Refs: #334
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>