Make coherent_sets_w_instances timing-independent - #94
Open
sqt wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
As it's currently written,
coherent_sets_w_instances(used byTest_CoherentSets_10/11/12/19/20/21) requires that exactly 36 samples appear between consecutive Reading coherent sets lines. That's a property of the phase alignment between the subscriber's take() period and the publisher's write period (two unsynchronised sleep loops) not of the PRESENTATION coherent_access contract itself. When a poll lands mid-coherent-change the check may see 12 / 24 / 72 and will return DATA_NOT_CORRECT even though every sample was delivered, in order, in a complete coherent set.Observed false-failure rates run from a few percent to a large majority of runs depending on the implementation pair, how the publisher orders instances on the wire, and the host load. That makes these six tests unreliable as a real test of interoperability between vendors. This is the same class of issue, and same approximate fix approach, as commit 95b6f62 ("Added tolerance to the ordered_access test").
Description of changes
This PR rewrites the body of coherent_sets_w_instances. It drives the subscriber the same way but, instead of a per-poll-cycle sample count, it collects every (topic, color, size) the subscriber prints and asserts, over the whole run: