Skip to content

Commit

Permalink
psmx test: include psmx wr, non-psmx local reader
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Boasson <[email protected]>
  • Loading branch information
eboasson committed Sep 6, 2023
1 parent cbe760e commit 395b5ef
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions src/core/ddsc/tests/psmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,26 +577,16 @@ static void dotest (const dds_topic_descriptor_t *tpdesc, const void *sample, en
bool fatal = false;
bool fail_one = false;

//if (!wr_use_psmx)
// goto next;

if (wr_use_psmx)
{
// Currently unsupported? PSMX writer with DDS readers in same domain
bool skip = false;
for (int i = 0; !skip && i < MAX_READERS_PER_DOMAIN; i++)
if (rdmode[i] == 1)
skip = true;
if (skip)
goto skip;
}

// We want to be certain that local delivery happens via the PSMX, which is tricky
// because we rather try not to make it visible at the API level. We test it here by
// preventing the local short-circuit from working by temporarily forcing the "fast
// path" reader count to 0, so that nothing will get delivered if it picks the wrong
// path.
bool override_fastpath_rdcount = wr_use_psmx;
// path" reader count to 0 if there are no local non-PSMX readers, so that nothing
// will get delivered if it picks the wrong path.
bool have_local_dds_readers = false;
for (int i = 0; !have_local_dds_readers && i < MAX_READERS_PER_DOMAIN; i++)
if (rdmode[i] == 1)
have_local_dds_readers = true;
bool override_fastpath_rdcount = wr_use_psmx && !have_local_dds_readers;

test_index++;
if (test_index >= test_index_start && test_index <= test_index_end)
Expand Down

0 comments on commit 395b5ef

Please sign in to comment.