feat: TC8 SOME/IP conformance test suite for someipd#60
Conversation
Wire-level pytest tests verifying someipd against the OA TC8 ECU Test Specification v3.0 Chapter 5: service discovery (phases, reboot, timing), message format, event notification, field lifecycle, and TCP transport. - someipd --tc8-standalone mode: request/response, field GET/SET, UDP and TCP events; offer_event uses ET_FIELD so vsomeip delivers the cached field value to new subscribers immediately on subscribe (is_field in JSON config is not honoured in programmatic offer_event calls) - vsomeip config templates for SD timing and service/event/field/TCP tests, with JSON Schema validation at lint time - Architecture doc, requirements, test specification and OA spec traceability - Bazel port isolation via the env attribute: each target receives unique SD and service ports enabling medium targets to run in parallel; timing-sensitive and reboot lifecycle targets retain the exclusive tag for serial execution
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
- Raise check-added-large-files limit from 50 KB to 125 KB to accommodate large but legitimate TC8 test modules and the RST test specification document - Add REUSE.toml annotation for tests/tc8_conformance/config/*.json so the four vsomeip JSON config files pass reuse-lint-file - Prepend Apache-2.0 SPDX comment headers to the two TC8 README.md files that were missing copyright notices
TC8 conformance tests require special setup (multicast route, env vars) and already run in a dedicated step; avoid double-execution via -tc8 filter.
c507e28 to
63d628d
Compare
63d628d to
8420326
Compare
|
Documentation overall looks very good, reviewed the current state at https://eclipse-score.github.io/inc_someip_gateway/pr-60/architecture/tc8_conformance_testing.html - not in detail, but general sections and impression. Nice! On my local checkout, running the tests works with the expected failures:
$ time bazel test --test_tag_filters=tc8 --test_env=TC8_HOST_IP=127.0.0.1 //tests/tc8_conformance/...Result: real 6m16.073s |
|
I missed setting up the multicast... now the tests run fine locally as well, can confirm. |
mikehaller
left a comment
There was a problem hiding this comment.
As the TC8 Conformity Tests is a complete new part for someip gateway, I'll approve the current state of the PR. It's a very good step forward.
There is one issue regarding the main.cpp where I didn't fully grasp the plans and hence would accept it if it's just temporary.
- Use local json_schema_validator rule instead of @score_communication - Add integrity hashes to download_archive deps for reproducible builds - Add component descriptions for gatewayd and someipd in architecture docs
Use `unshare --user --net` to create a private network namespace per test, eliminating the need for `sudo ip route add` before running TC8 conformance tests. Add `--config=tc8` Bazel config that sets the tag filter, host IP, and --run_under wrapper automatically. Also exclude TC8 from `bazel test //...` via default tag filter and standardize terminology from "real NIC" to "non-loopback interface".
0fae264 to
622244e
Compare
- Add shebang and is_executable = True to json_schema_validator.bzl script output. - Simplify TC8 network namespace wrapper documentation across .bazelrc, RST docs, README.md, and the wrapper script comments - Add a warning on namespace fallback in tc8_net_wrapper.sh
622244e to
cf3a5d8
Compare
e3cf506 to
70b305e
Compare
…ance_test_infrastructure
Simplify the PlantUML hierarchy diagram by removing documentation- artifact nodes (test_specification.rst, traceability.rst) that were mistaken for additional requirement levels. Replace hardcoded /tmp/vsomeip-tc8.log with __TC8_LOG_DIR__ placeholder in all TC8 config templates, substituted at render time with pytest tmp_path.
…ance_test_infrastructure
fc1900a to
bca3b5b
Compare
…ance_test_infrastructure # Conflicts: # MODULE.bazel
…ance_test_infrastructure # Conflicts: # docs/architecture/components.rst
…ance_test_infrastructure
adba8e1 to
47e56ae
Compare
Summary
Adds a TC8 SOME/IP conformance test suite for
someipd, covering the OA TC8 ECU Test Specification. The tests send and receive raw SOME/IP packets over loopback sockets, nogatewaydneeded. A new--tc8-standaloneflag insomeipdlets it offer services directly without the full gateway stack.Scope: 183 test cases across 10 test modules, plus documentation and CI integration.
What's included
Tests (
tests/tc8_conformance/)xfailfor known vsomeip 3.6.1 limitationsDocumentation (
docs/)docs/architecture/tc8_conformance_testing.rst— standalone mode design and test structuredocs/tc8_conformance/requirements.rst— requirements with AUTOSAR PRS traceability IDsdocs/tc8_conformance/test_specification.rst— maps each requirement to test casesdocs/tc8_conformance/traceability.rst— requirement-to-test traceability matrixsomeipd changes (
src/someipd/main.cpp)--tc8-standaloneflag: skips gatewayd IPC, offers test services directlyET_FIELDfor field events so vsomeip sends the initial value on subscribeCI (
.github/workflows/build_and_test_host.yml)--config=tc8(creates a network namespace per test, no sudo needed)Build/config changes
.bazelrc:--config=tc8opt-in configuration; TC8 tests excluded frombazel test //...by defaultjson_schema_validatorupgraded to 2.4.0; removed unusedjsonschemaPython deptests/integration/BUILD.bazel: migrated frompy_pytesttoscore_py_pytest.pre-commit-config.yaml: raised large-file limit from 50KB to 125KB for TC8 test filesTest plan
bazel test --config=tc8 //tests/tc8_conformance/...passes locallybazel build //...andbazel test //...pass (TC8 excluded by default)bazel run //:copyright.checkpassesbazel build //docs/...builds without errors