Skip to content

added test cases for launch processes and conditional launching#298

Open
Saumya-R wants to merge 3 commits into
eclipse-score:mainfrom
qorix-group:saumya_lifecycle_integration_test_1
Open

added test cases for launch processes and conditional launching#298
Saumya-R wants to merge 3 commits into
eclipse-score:mainfrom
qorix-group:saumya_lifecycle_integration_test_1

Conversation

@Saumya-R

@Saumya-R Saumya-R commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This branch introduces lifecycle integration coverage for Launching Processes and Conditional Launching using a real launch_manager daemon setup, updates test infrastructure to reduce false negatives, and refreshes documentation/roadmap artifacts.

Requirement ID Coverage in this PR Verification level
feat_req__lifecycle__waitfor_support Covered by daemon-backed conditional startup checks that wait for supervised process readiness in both lifecycle test classes. Partially verifies (automated integration, daemon-backed)
feat_req__lifecycle__cond_process_start Covered by conditional process startup assertions using real Launch Manager behavior (not stub-only checks). Partially verifies (automated integration, daemon-backed)
feat_req__lifecycle__dependency_check Covered by dependency-gated startup assertions and config dependency declaration checks for rust depending on cpp. Partially verifies (automated integration, daemon-backed)
feat_req__lifecycle__process_ordering Covered by launch ordering validation using process start ticks from /proc to assert dependency-respecting order. Partially verifies (automated integration, daemon-backed)
feat_req__lifecycle__launch_support Covered by startup launch validation that supervised apps are launched under Startup run target. Partially verifies (automated integration, daemon-backed)
feat_req__lifecycle__monitor_abnormal_term Covered by forced termination and restart/recovery behavior checks for supervised apps. Partially verifies (automated integration, daemon-backed)
feat_req__lifecycle__liveliness_detection Covered by manual watchdog flow that stalls process and validates watchdog/liveliness failure diagnostics. Partially verifies (manual integration, daemon-backed)
feat_req__lifecycle__smart_watchdog_config Covered by manual watchdog assertions for supervision timeout/failure transitions. Partially verifies (manual integration, daemon-backed)

@github-actions

Copy link
Copy Markdown

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

Copilot AI 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.

Pull request overview

This PR adds a new Lifecycle “conditional launching” feature-integration test scenario and a Python FIT suite that runs it against both the Rust and C++ scenario runners. It also introduces a Rust “lifecycle-only” Bazel binary variant intended to avoid pulling in persistency-related dependencies for this specific suite, and updates test harness/configuration to support selective scenario builds.

Changes:

  • Added Lifecycle conditional-launching scenarios to the Rust and C++ FIT scenario trees.
  • Added a Python requirements-based FIT suite for conditional launching (parametrized for Rust/C++) plus a shared lifecycle base scenario fixture.
  • Added a Rust lifecycle-only Bazel scenario binary and updated FIT build selection/docs.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pyproject.toml Updates pytest configuration section to tool.pytest.ini_options.
feature_integration_tests/test_scenarios/rust/src/scenarios/mod.rs Registers the new lifecycle scenario group in the Rust scenario tree.
feature_integration_tests/test_scenarios/rust/src/scenarios/lifecycle/mod.rs Adds a lifecycle scenario group (Rust).
feature_integration_tests/test_scenarios/rust/src/scenarios/lifecycle/conditional_launching.rs Implements the Rust conditional-launching scenario input validation/logging.
feature_integration_tests/test_scenarios/rust/src/main.rs Adds lifecycle_only compilation mode and a reduced root group for lifecycle-only builds.
feature_integration_tests/test_scenarios/rust/BUILD Adds rust_lifecycle_test_scenarios Bazel target using --cfg=lifecycle_only.
feature_integration_tests/test_scenarios/cpp/src/scenarios/mod.cpp Registers a lifecycle scenario group (C++).
feature_integration_tests/test_scenarios/cpp/src/scenarios/lifecycle/conditional_launching.h Declares the C++ conditional-launching scenario factory.
feature_integration_tests/test_scenarios/cpp/src/scenarios/lifecycle/conditional_launching.cpp Implements the C++ conditional-launching scenario parsing/logging.
feature_integration_tests/test_cases/tests/lifecycle/test_conditional_launching.py Adds Python FIT assertions for lifecycle conditional launching (Rust/C++).
feature_integration_tests/test_cases/lifecycle_scenario.py Introduces a shared LifecycleScenario base class with a common temp_dir fixture.
feature_integration_tests/test_cases/conftest.py Skips building unselected scenario variants based on the pytest mark expression.
feature_integration_tests/test_cases/BUILD Adds lifecycle_scenario.py to FIT runfiles.
feature_integration_tests/README.md Documents running lifecycle conditional-launching FITs and the lifecycle-only Rust target.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread feature_integration_tests/test_cases/conftest.py
Comment thread feature_integration_tests/README.md Outdated
@Saumya-R
Saumya-R marked this pull request as ready for review July 17, 2026 05:25
@Saumya-R
Saumya-R marked this pull request as draft July 17, 2026 05:57
@Saumya-R Saumya-R changed the title added test cases for conditional launching added test cases for launch processes and conditional launching Jul 21, 2026
@Saumya-R
Saumya-R marked this pull request as ready for review July 21, 2026 06:29
added test case to reject unknown conditions

fixed the readme

added launch manager processes

adding additional test cases for lifecycle
@Saumya-R
Saumya-R force-pushed the saumya_lifecycle_integration_test_1 branch from 816b818 to 1c7d861 Compare July 22, 2026 06:28

@PiotrKorkus PiotrKorkus 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.

also remove duplicated dependency/ordering tests across daemon files

Comment thread pyproject.toml Outdated
Comment thread feature_integration_tests/test_cases/requirements.txt.lock
"RUST_BACKTRACE": "1",
},
pytest_config = "//:pyproject.toml",
tags = ["exclusive"],

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.

why is it needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

lifecycle targets drive a shared launch_manager daemon and one of the rust or cpp times out when ran concurrently.

"daemon_helpers.py",
"fit_scenario.py",
"lifecycle_scenario.py",
"persistency_scenario.py",

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.

why is it here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

cleared the non-required.

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.

those bazel targets are messed up, create a separate targets for rust/cpp lifecycle, pers, orch etc. Group everything under test_suites for cpp and rust.
Just add one more level of test suites by promoting current fit_cpp and fit_rust into test suites

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cleared the mess.

Comment on lines +31 to +42
@add_test_properties(
partially_verifies=[
"feat_req__lifecycle__total_wait_time_support",
"feat_req__lifecycle__polling_interval",
"feat_req__lifecycle__path_condition_check",
"feat_req__lifecycle__env_variable_cond_check",
"feat_req__lifecycle__dependency_check",
],
test_type="requirements-based",
derivation_technique="requirements-analysis",
)
class TestConditionalLaunchingScenario(LifecycleScenario):

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.

so those tests do not verify reqs, they verify the scenario

Comment on lines +368 to +369
if sched is None:
pytest.skip("Could not inspect scheduling metadata via chrt in this environment")

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.

this is always skipped, test never contributes to verifify something

f"(cpp_start={cpp_start}, rust_start={rust_start})"
)

def test_rust_never_runs_without_cpp_running(

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.

but launch manager daemon fixutre always waits for both apps running, how does this test conrtibute to requirements verification? Its test harness check

launch_manager_daemon: dict[str, Any],
version: str,
) -> None:
"""Verify launched process runs with configured effective uid/gid when runtime applies sandbox identity."""

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.

what if gid is not applied? thats a pre condition from the outside, where is it set? Should the test be skipped if that was not prepared?

Comment on lines +404 to +412
def test_config_defines_startup_retry_policy(self, launch_manager_daemon: dict[str, Any], version: str) -> None:
"""Verify lifecycle config defines configurable restart attempts on startup readiness failure."""
config_path = Path(__file__).resolve().parents[3] / "configs" / "lifecycle_daemon_config.json"
config = json.loads(config_path.read_text(encoding="utf-8"))

restart_cfg = config["defaults"]["deployment_config"]["ready_recovery_action"]["restart"]
attempts = restart_cfg.get("number_of_attempts")
assert isinstance(attempts, int), "Expected integer number_of_attempts in ready_recovery_action.restart"
assert attempts >= 0, "Expected non-negative number_of_attempts in startup retry policy"

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.

thats reading json and asserting it, test makes no sense

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

deleted test_config_defines_startup_retry_policy — it only parsed and type-checked JSON, verifying nothing about runtime behavior. retries_configurable and monitor_abnormal_term are now both attributed to test_supervised_app_recovery, which is the one test that actually forces a failure and observes daemon-driven restart.

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