Add integration tests for LoLa/mw::com feature in ITF#21
Draft
Subramanian-K812 wants to merge 9 commits into
Draft
Add integration tests for LoLa/mw::com feature in ITF#21Subramanian-K812 wants to merge 9 commits into
Subramanian-K812 wants to merge 9 commits into
Conversation
…communication_feature_integration_tests
…ance-vs-process ASIL abort
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.
Add communication (LoLa / mw::com) integration tests to ITF
Summary
Adds an ITF test suite for the communication module (LoLa /
mw::com) thatexercises the deployed
ipc_bridgeexample on the target image as two real OSprocesses communicating over shared memory. The tests assert on the data the
consumer actually observes — sample sequence and per-sample hash validity —
rather than on log strings the application prints about its own configuration,
so a regression in the middleware is what breaks them.
The suite runs under the existing
//feature_integration_tests/itf:itftarget on both the Linux (Docker) and QNX (QEMU) configs
What's added
feature_integration_tests/itf/test_communication.pyfeature_integration_tests/itf/comm_helpers.pyCommResult, ordering/hash checks, deployment-config and ACL scenario helpers).feature_integration_tests/itf/test_properties.pyattribute_plugin.add_test_properties, mirroringfeature_integration_tests/test_cases/test_properties.py.feature_integration_tests/itf/BUILDitftarget and activates the requirement-traceability plugin (-p attribute_plugin+@score_tooling//python_basics/score_pytest:attribute_plugindep).Test coverage
test_ipc_bridge_is_deployedtest_event_exchange_delivers_valid_dataevent_type,producer_consumer,interfaces,time_based_arch,service_discoverytest_received_samples_are_ordered_and_uncorrupteddata_corruption,data_reorderingtest_late_joining_consumer_receives_cached_datastateless_communication,producer_consumertest_deployment_config_is_read_from_runtime_pathdepl_config_runtime,multi_binding_depl-s <path>manifest, not compiled in.test_missing_config_file_fails_deterministicallydepl_config_runtimetest_truncated_config_fails_deterministicallydepl_config_runtimetest_schema_invalid_config_fails_deterministicallydepl_config_runtimetest_mixed_criticality_acl_isolationsafe_communication,asil,data_corruption,data_reorderingRequirement IDs are the published
feat_req__com__*identifiers, attached via@add_test_properties(partially_verifies=[...])so they are emitted into theJUnit XML
<properties>— the same traceability convention used by thepersistency FIT cases under
feature_integration_tests/test_cases.Deliberately skipped tests
These document real, observed behaviour of the current vehicle/example rather
than hiding gaps:
test_service_discovery_is_order_independent— starting the consumer beforethe provider races the provider's shared-memory setup with this vehicle;
proxy construction / first-sample reads intermittently fail. Service
discovery is still exercised on every run by
test_event_exchange_delivers_valid_data.test_generic_skeleton_interoperates_with_typed_proxy— the genericskeleton delivers its first sample twice, tripping the receiver's
ordering/count check; the typed skeleton is unaffected.
test_mixed_criticality_acl_isolationon QNX only — see Limitations.Limitations
allowedConsumerenforcement is ashared-memory ACL keyed on the consumer's real UID, so exercising it needs a
consumer running under a UID excluded from the allow-list. On QNX, LoLa's
MessagePassingServiceendpoint registration itself requires privilege, soa consumer launched under a lower-privilege UID (
on -u <uid>) aborts atmessage-passing setup before reaching the shared-memory ACL check. A
control run in which the excluded UID was explicitly added to
allowedConsumerfailed identically — confirming this is a generic QNXIPC-privilege limitation, not
allowedConsumerenforcement. The denialtherefore cannot be attributed to the ACL on QNX, so the test skips there;
it runs on Linux, where an unprivileged UID can still bring up its endpoint
and so reaches the ACL check the assertions rely on.
Verification
Run on both target configs:
--config=itf-qnx-x86_64): 8 passed, 3 skipped.test_mixed_criticality_acl_isolationskips here for the reason underLimitations; the other two skips are the vehicle-limitation cases above.
--config=linux-x86_64, which is what CI's "Linux —Build & Integration Test" job runs): 9 passed, 2 skipped.
test_mixed_criticality_acl_isolationruns on this config and passes — theexcluded UID reaches shared-memory open and is denied with an
ACL/permission diagnostic, confirming the denial is attributable to
allowedConsumerenforcement.JUnit XML (
bazel-testlogs/.../itf/test.xml).