Skip to content

test(cda): exercise simulated ECU through gateway - #97

Merged
FScholPer merged 1 commit into
mainfrom
local/s3-reference-tester
Nov 25, 2026
Merged

FScholPer merged 1 commit into
mainfrom
local/s3-reference-tester

Conversation

@alexmohr

@alexmohr alexmohr commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add the simulator-backed reference tester flow to diagnostics Linux CI.

  • Start the ECU simulator with the pinned CDA's own testcontainer/docker-compose.yml and run the actual gateway and CDA against it.
  • Through the gateway, verify ECU identification, seeded fault details, a clear rejected without a lock and accepted with one, the TimeCircuits routine lifecycle and stop, and a hard reset back to the default session. Check the diagnostic requests the simulator recorded and its final state.
  • Run it in the On PR test job with score/opensovd-cda/tests/ecu_sim_ci.sh, through the //score/opensovd-cda:simulator_test JUnit target, so its report reaches the documentation's test-reports. Like upstream, the simulator runs privileged on the fixed network 172.42.0.0/16, so the script is meant for throwaway CI runners.
  • Add five CDA component requirements for faults, asynchronous operations, ECU locks, lock enforcement and the UDS service mapping. Each states the behavior the integration relies on and refines an upstream CDA requirement; the existing HTTP port requirement is rewritten the same way. The simulator test verifies the five, together with the gateway's single entry point and forwarding.
  • Write both CDA test configurations with one helper from a plain multi-line TOML template.

Checklist

  • I have tested my changes locally
  • I have added or updated documentation
  • I have linked related issues or discussions
  • I have added or updated tests

Related

Part of #66 (S3); follows #79 and #86. The issue also tracks the reference integration deployment, so this PR does not close it.

Notes for Reviewers

  • The Core client performs the GET and PUT requests. A test-only curl helper sends POST and DELETE requests because the pinned client has no generic methods for them.
  • The simulator now runs in the test job of On PR, which the docs build and the "On PR mergeable" check depend on. A failing simulator run therefore blocks both. ShellCheck and actionlint pass on the changed files.
  • The regular Bazel tests stay bus-free: only the manual simulator_test_binary target enables the ecu_simulator feature.
  • The pinned CDA reports routine execution as completed on each positive results response, including intermediate simulator progress; the test checks the actual progress values separately.

Alexander Mohr alexander.m.mohr@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.8.2) and connecting to it...
INFO: Invocation ID: 3865dc92-616b-4111-b518-fa093608f9a6
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (26 packages loaded, 14 targets configured)

Analyzing: target //:license-check (53 packages loaded, 14 targets configured)

Analyzing: target //:license-check (95 packages loaded, 14 targets configured)

Analyzing: target //:license-check (95 packages loaded, 14 targets configured)

Analyzing: target //:license-check (154 packages loaded, 2260 targets configured)

Analyzing: target //:license-check (158 packages loaded, 3258 targets configured)

Analyzing: target //:license-check (158 packages loaded, 3258 targets configured)

Analyzing: target //:license-check (158 packages loaded, 3258 targets configured)

Analyzing: target //:license-check (172 packages loaded, 6307 targets configured)

Analyzing: target //:license-check (177 packages loaded, 9720 targets configured)

Analyzing: target //:license-check (177 packages loaded, 9720 targets configured)

Analyzing: target //:license-check (180 packages loaded, 9846 targets configured)

Analyzing: target //:license-check (185 packages loaded, 15942 targets configured)

INFO: Analyzed target //:license-check (185 packages loaded, 15957 targets configured).
[13 / 17] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions, 1 running)
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 2 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
[16 / 17] [Prepa] Building license.check.license_check.jar ()
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 48.000s, Critical Path: 2.70s
INFO: 17 processes: 12 internal, 4 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 17 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-97: https://eclipse-score.github.io/diagnostics/pr-97/

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The manual simulator run bypasses requirement-aware JUnit reporting, so its results are not captured as verification evidence in the documentation’s test-report artifacts.

1 open issue
What changed in this PR

Adds simulator-backed Linux CI coverage for the gateway-to-CDA diagnostic flow, advancing the reference tester work in #66 beyond the earlier bus-free checks.

Changes:

  • Tests live identification, fault details and clearing, routine execution and stopping, and ECU reset through the gateway.
  • Provisions an isolated simulator fixture and verifies diagnostic frames, final state, and cleanup behavior.
  • Integrates the fixture into Linux CI and documents its prerequisites and reproducibility limits.

The prescribed Bazel tests and pre-commit hooks were not run in this review environment.

File Description
score/​opensovd-cda/​tests/​integration.rs Adds simulator-backed diagnostic checks through the gateway.
score/​opensovd-cda/​tests/​ecu_sim_ci.sh Manages the simulator, runs checks, and cleans up resources.
score/​opensovd-cda/​tests/​ecu_sim_ci_test.py Tests fixture cleanup, failure handling, and container restrictions.
score/​opensovd-cda/​BUILD Registers the Python fixture lifecycle tests.
README.md Documents simulator coverage, prerequisites, and limitations.
.github/​workflows/​build_linux.yml Runs the simulator fixture in Linux CI.

Review effort: Balanced

Comment thread score/opensovd-cda/tests/ecu_sim_ci.sh Resolved
@alexmohr
alexmohr force-pushed the local/s3-reference-tester branch 2 times, most recently from bf7ac11 to a951e35 Compare November 25, 2026 07:52
@alexmohr
alexmohr requested a balanced review from Copilot November 25, 2026 08:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The privileged Docker/DoIP flow remains untested on Linux and cannot be exercised here, requiring human review of its first Linux CI run for bridge discovery, diagnostic exchanges, simulator state, and failure cleanup.

1 open issue

Review effort: Balanced

@alexmohr
alexmohr force-pushed the local/s3-reference-tester branch 4 times, most recently from 2b5848d to f1010b7 Compare November 25, 2026 08:54
@alexmohr
alexmohr requested a balanced review from Copilot November 25, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The simulator checks run after the passing JUnit report is written, so their failures can still leave linked requirements marked as verified and supply misleading passing evidence to documentation.

2 open issues

Review effort: Balanced

Comment thread score/opensovd-cda/tests/ecu_sim_ci.sh Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Stop requirements incorrectly mandate a stopped response body for every routine, excluding the supported HTTP 204 response when a successful Stop returns no output data.

2 open issues
1 resolved since last review

Review effort: Balanced

Add simulator_reads_through_gateway, which drives the CDA's ECU
simulator through the gateway and the CDA: live VIN, seeded fault with
snapshot and extended data, clearing with and without a lock, the
TimeCircuits routine lifecycle, and a hard reset back to the default
session. The test is behind the ecu_simulator feature and only built by
the manual simulator_test_binary target, so the regular tests stay
bus-free.

The test seeds the fault through the simulator's control API and
finally checks the requests the simulator recorded and its final state,
so a run that never reached the ECU cannot pass. The On PR workflow
runs it with ecu_sim_ci.sh, which starts the ecu-sim service of the
pinned CDA's testcontainer/docker-compose.yml and runs the
simulator_test JUnit target. Every failure is in that report, which
reaches the documentation's test-reports.

The test verifies the gateway's single entry point and forwarding, and
five new CDA requirements for faults, asynchronous operations, ECU
locks, lock enforcement and the UDS service mapping. Like the existing
HTTP port requirement, which is rewritten the same way, each states the
behavior the integration relies on and refines an upstream CDA
requirement.

Both CDA test configurations are now written by one write_config
helper from a plain multi-line TOML template.

Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The merge-blocking flow depends on unverified privileged Docker networking and host-to-simulator DoIP discovery, requiring confirmation from a successful Linux CI run and its requirement-linked JUnit report.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@alexmohr
alexmohr marked this pull request as ready for review November 25, 2026 09:27
@FScholPer
FScholPer added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit be063fe Nov 25, 2026
13 checks passed
@FScholPer
FScholPer deleted the local/s3-reference-tester branch November 25, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants