Skip to content

Add tests which are verifying comp_req__launch_man__launcher_exit_shutdown - #450

Open
TimoSteuerwaldETAS wants to merge 21 commits into
eclipse-score:mainfrom
etas-contrib:feature/shutdown_tests
Open

Add tests which are verifying comp_req__launch_man__launcher_exit_shutdown#450
TimoSteuerwaldETAS wants to merge 21 commits into
eclipse-score:mainfrom
etas-contrib:feature/shutdown_tests

Conversation

@TimoSteuerwaldETAS

@TimoSteuerwaldETAS TimoSteuerwaldETAS commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Part of #317

comp_req__launch_man__launcher_exit_shutdown
The Launch Manager shall exit after performing shutdown operation by
stopping all the Processes <Process> it owns in the dependency order when requested.

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 22105320-95be-4341-a230-fb232604f0d6
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: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (34 packages loaded, 10 targets configured)

Analyzing: target //:license-check (87 packages loaded, 10 targets configured)

Analyzing: target //:license-check (90 packages loaded, 10 targets configured)

Analyzing: target //:license-check (152 packages loaded, 3161 targets configured)

Analyzing: target //:license-check (162 packages loaded, 6895 targets configured)

Analyzing: target //:license-check (167 packages loaded, 9402 targets configured)

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

Analyzing: target //:license-check (173 packages loaded, 9575 targets configured)

INFO: Analyzed target //:license-check (177 packages loaded, 11589 targets configured).
[14 / 16] [Prepa] Generating Dash formatted dependency file ... ... (2 actions, 0 running)
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: 24.299s, Critical Path: 0.28s
INFO: 16 processes: 4 disk cache hit, 12 internal.
INFO: Build completed successfully, 16 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

The created documentation from the pull request is available at: docu-html

These commits have been squashed together to ease review.
After cherry pick some conflicts have been solved wrong, this is why
there are two additional commits also.

For details please also have a look onto the internal branch in etas-eng
feature/create-process-launch-fit-specification-unverified

The original commit message of this commit:

Add a log message for SIGTERM receival

Move dir tests/integration/lm_shutdown to tests/integration/lm_shutdown_during_rt_switch

Update references accordingly

Add lm_shutdown_during_switch_to_off

A test which verifies that a launch manager shutdown signalled via SIGTERM does not cancel existent switches to off.
Currently does not fail, but should fail. As switch to off gets cancelled and reinitiated by launch manager code.

Let test fail, as switch to off is cancelled by lm

Revert to 1s timeout for lm shutdown & add some comments

Still not 100% stable.

Fix cherry pick odyssey

Former fix for SIGSEGV of old branch
Other ControlClientMocks need to be updated separately.
Comment on lines +48 to +53
# Run the launch manager until component_a signals it is stalling mid-termination
# (file `component_a_terminating`): the switch to run_target_c is then in progress
# but run_target_c has not been activated yet. run_until_file_deployed stops the
# launch manager at that point by sending it a SIGTERM (to the launch manager
# process only, so it performs its own orderly shutdown) and asserts it exits
# cleanly (code 0).

@WilliamRoebuck WilliamRoebuck Aug 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Run the launch manager until component_a signals it is stalling mid-termination
# (file `component_a_terminating`): the switch to run_target_c is then in progress
# but run_target_c has not been activated yet. run_until_file_deployed stops the
# launch manager at that point by sending it a SIGTERM (to the launch manager
# process only, so it performs its own orderly shutdown) and asserts it exits
# cleanly (code 0).
# Run until `component_a_terminating` is deployed so we can request shutdown during
# the transition to run target c

Comment on lines +176 to +177
// TODO: adopt this in the remaining tests/integration/*/*control*.cpp binaries
// that still wait with a bare pause().

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we have a Github issue for this? We could make sure we have one and remove this TODO.

@WilliamRoebuck WilliamRoebuck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good now, my only remaining concerns are the core dump and test wait changes

Comment on lines +49 to +53
# Run the launch manager until component_a signals it is stalling mid-termination
# (file `component_a_terminating`): the explicit switch to Off is then in progress.
# run_until_file_deployed stops the launch manager at that point by sending it a
# SIGTERM (to the launch manager process only, so it performs its own orderly
# shutdown) and asserts it exits cleanly (code 0).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Run the launch manager until component_a signals it is stalling mid-termination
# (file `component_a_terminating`): the explicit switch to Off is then in progress.
# run_until_file_deployed stops the launch manager at that point by sending it a
# SIGTERM (to the launch manager process only, so it performs its own orderly
# shutdown) and asserts it exits cleanly (code 0).
# Run until `component_a_terminating` is deployed so we can send SIGTERM
# to launch manager during the transition to Off

```
The default `core_pattern` differs per system (e.g. `|/wsl-capture-crash ...`
on WSL, `|/lib/systemd/systemd-coredump ...` on systemd hosts, or plain
`core`). Check yours *before* the first run so you know the value to restore.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If this is important to do before running, we should put this operation under a config flag I think. Its very unlikely that anyone will see this before they run tests the first time (after this PR)

Comment on lines +25 to +27
/// @brief How long the process stalls while being terminated, keeping an in-progress
/// run-target switch alive so the test has a deterministic window to send SIGTERM to
/// the launch manager. Must be smaller than the configured shutdown_timeout so the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// @brief How long the process stalls while being terminated, keeping an in-progress
/// run-target switch alive so the test has a deterministic window to send SIGTERM to
/// the launch manager. Must be smaller than the configured shutdown_timeout so the
/// @brief How long the process stalls while being terminated.
/// Must be smaller than the configured shutdown_timeout so the

Comment thread tests/utils/test_helper/test_helper.hpp Outdated
Comment on lines +175 to +183
/// Poll the atomic flag instead of calling pause() directly. A process-directed
/// signal (from kill) is delivered to an arbitrary one of the process's threads
/// that has the signal unblocked. If the test process has more than one thread
/// (e.g. a ControlClient, whose constructor spawns a background IPC thread), the
/// handler may run on a background thread and set exitRequested there. pause()
/// only returns for a signal handled on the calling thread, so a main thread
/// blocked in pause() would not wake - it would stay parked until the launch
/// manager SIGKILLs it at its shutdown_timeout, and never write its XML result.
/// Polling observes the flag regardless of which thread handled the signal.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, but I think that is the key difference. From my testing, a pause on the main thread always takes precedence to pauses on child threads. Though this might be OS dependent. I think this should be a separate issue/PR anyway as it is not needed for this test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants