This adds some systematic testing for QoS objects and the handling of QoS settings in creating topics, subscribers, publishers, readers and writers. It is not exhaustive, but it is quite close. Perhaps I should leave completing it as an exercise to the reader 😄
It checks that the QoS objects can set/get individual QoS's to various values and that it can independently do so for pairs of QoS settings. It checks that the same holds for entities. It also checks that reader writer matching respects the RxO matching rules.
It doesn't check inheritance of QoS from topics and is missing a handful of QoS settings: type consistency enforcement, data representation and enabled PSMX instances. The latter is I think covered sufficiently by the PSMX tests. The type consistency and data representation ones are possibly better tested in an XTypes context. It also ignores user_data, group_data and topic_data. There are quite substantial tests for those already.
One somewhat serious bug was found: "ignore local" in "participant" mode implemented its short-circuiting incorrectly, possibly leading to a match where there should be none. Two less serious bugs were also found: the data reader accidentally claimed to have a "transport priority" setting and the publisher and subscriber QoS did not properly set the default values for "presentation" and "ignore local". These really only affect the result of dds_get_qos in a setting like this test.
Edit: now also extended with some garbage QoS values and changing/being unable to change QoS settings. Plus a bug fix in dds_qset_entity_name: calling it twice in a row would leak memory.
This adds some systematic testing for QoS objects and the handling of QoS settings in creating topics, subscribers, publishers, readers and writers. It is not exhaustive, but it is quite close. Perhaps I should leave completing it as an exercise to the reader 😄
It checks that the QoS objects can set/get individual QoS's to various values and that it can independently do so for pairs of QoS settings. It checks that the same holds for entities. It also checks that reader writer matching respects the RxO matching rules.
It doesn't check inheritance of QoS from topics and is missing a handful of QoS settings: type consistency enforcement, data representation and enabled PSMX instances. The latter is I think covered sufficiently by the PSMX tests. The type consistency and data representation ones are possibly better tested in an XTypes context. It also ignores user_data, group_data and topic_data. There are quite substantial tests for those already.
One somewhat serious bug was found: "ignore local" in "participant" mode implemented its short-circuiting incorrectly, possibly leading to a match where there should be none. Two less serious bugs were also found: the data reader accidentally claimed to have a "transport priority" setting and the publisher and subscriber QoS did not properly set the default values for "presentation" and "ignore local". These really only affect the result of
dds_get_qos
in a setting like this test.Edit: now also extended with some garbage QoS values and changing/being unable to change QoS settings. Plus a bug fix in
dds_qset_entity_name
: calling it twice in a row would leak memory.