Skip to content

Add SDV 1-VM and 2-VM presubmit E2E tests - #3153

Open
SuperStrongDinosaur wants to merge 1 commit into
google:mainfrom
SuperStrongDinosaur:sdv_dhi_presubmit_tests
Open

SuperStrongDinosaur wants to merge 1 commit into
google:mainfrom
SuperStrongDinosaur:sdv_dhi_presubmit_tests

Conversation

@SuperStrongDinosaur

@SuperStrongDinosaur SuperStrongDinosaur commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

This PR introduces end-to-end presubmit test coverage for SDV targets under e2etests/cvd/sdv_tests.

The test suite validates SDV device lifecycle operations (status querying, graceful stop, start, and restart) and multi-VM isolation based on the device-host interaction baseline tests:
- Single-VM lifecycle operations (sdv_fw_baseline_dhi_1vm_test.py)
- Two-VM multi-instance lifecycle and isolation (sdv_fw_baseline_dhi_2vm_test.py)

BUG: b/559633154

@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 8, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 8, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 9, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 9, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 9, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 9, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 9, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 9, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 9, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 9, 2026
@SuperStrongDinosaur SuperStrongDinosaur changed the title Add SDV DHI 1-VM and 2-VM presubmit tests Add SDV 1-VM and 2-VM presubmit E2E tests Sep 10, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 10, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 10, 2026
@SuperStrongDinosaur
SuperStrongDinosaur marked this pull request as ready for review September 10, 2026 15:46
@chihchiachen

chihchiachen commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Instead of treating SDV CF as an outlier, a better approach is to generalize the new test cases so they can optionally support non-SDV CF variants.

So I recommend the following changes:

  • Generalize sdv_1vm_test as lifecycle_test and use it to replace cvd_create_tests.
  • Generalize sdv_2vm_test as isolation_test, apply it to sdv_media + sdv_core, and then clean up the dupplicate config from cvd_load_tests.

@Databean please let me know your thoughts.

@Databean Databean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

a better approach is to generalize the new test cases so they can optionally support non-SDV CF variants.

Most of the tests do look pretty general, except for the GetSyspropStringForDevice parts.

Comment thread e2etests/cvd/common/common.go Outdated
Comment thread e2etests/cvd/common/common.go Outdated
Comment thread e2etests/cvd/common/common.go Outdated
Comment thread e2etests/cvd/common/common.go Outdated
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 15, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 15, 2026
@SuperStrongDinosaur

Copy link
Copy Markdown
Collaborator Author

Instead of treating SDV CF as an outlier, a better approach is to generalize the new test cases so they can optionally support non-SDV CF variants.

So I recommend the following changes:

  • Generalize sdv_1vm_test as lifecycle_test and use it to replace cvd_create_tests.
  • Generalize sdv_2vm_test as isolation_test, apply it to sdv_media + sdv_core, and then clean up the dupplicate config from cvd_load_tests.

@Databean please let me know your thoughts.

Thanks for the feedback @chihchiachen. Generalizing the lifecycle and multi-instance isolation tests across other CF targets is definitely a right long-term direction. In this PR, my goal is to have the foundational presubmit coverage required specifically for SDV targets without affecting existing CI pipelines

Now that the CVD lifecycle methods are decoupled into free functions under e2etests/cvd/common/cvd.go, we can build a generalized lifecycle_test and isolation_test in a dedicated follow-up PR once we define common identity checks for standard CF

@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:force-run Trigger a presubmit build unconditionally. label Sep 16, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:force-run Trigger a presubmit build unconditionally. label Sep 16, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 16, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 16, 2026
@SuperStrongDinosaur
SuperStrongDinosaur force-pushed the sdv_dhi_presubmit_tests branch 2 times, most recently from a3c31b3 to af687c9 Compare September 17, 2026 13:52
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 17, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 17, 2026
Comment thread e2etests/cvd/sdv_tests/sdv_2vm_test.go Outdated
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 21, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 21, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 21, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 21, 2026
@SuperStrongDinosaur SuperStrongDinosaur added kokoro:run Run e2e tests. kokoro:force-run Trigger a presubmit build unconditionally. and removed kokoro:run Run e2e tests. labels Sep 22, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:force-run Trigger a presubmit build unconditionally. label Sep 22, 2026
Integrate Software Defined Vehicle (SDV) test coverage into
android-cuttlefish presubmit, validating lifecycle operations
and multi-instance isolation based on Android platform testing:
- Single-VM lifecycle operations (status, stop, start, restart).
- Two-VM environment creation and secondary instance lifecycle
  with primary instance isolation checks.

Summary of changes:
- Add //cvd/sdv_tests:sdv_tests Go E2E test target under e2etests/cvd.
- Implement 1-VM SDV test covering image fetch, boot, status check,
  stop/start lifecycle, and restart lifecycle with sysprop validation.
- Implement 2-VM SDV test (SDV Core ins-1 on 127.0.0.1:6520 and SDV Media
  ins-2 on 127.0.0.1:6521) covering multi-VM creation via load config,
  status verification, and ins-2 stop/start and restart lifecycle with
  ins-1 isolation checks.
- Exclude sdv_tests from containerized kokoro_podcvd via podcvd_excluded tag.
- Add common CVD helpers in e2etests/cvd/common/cvd.go:
  - TestContext receiver methods and free functions:
    CVDStop, CVDStart, CVDRestart, CVDStatus
    CVDInstanceStop, CVDInstanceStart, CVDInstanceRestart, CVDInstanceStatus
  - Robust ParseCVDStatusJSON handling array, group object, and single object formats
    without vulnerability to log prefixes
  - Add unit tests for ParseCVDStatusJSON in e2etests/cvd/common/cvd_test.go
- Add common test helpers in e2etests/cvd/common/common.go:
  - Early adb server startup in SetUp
  - RunAdbWaitForDeviceSerial for targeted device adb transport synchronization
  - WaitForDeviceOffline using Go context timeout and standard adb wait-for-disconnect
  - GetSyspropStringForDevice for explicit serial-targeted sysprop reads

Test:
- bazel test //cvd/common:common_test
- bazel build //cvd/...
- bazel test //cvd/sdv_tests:sdv_tests (in Kokoro presubmit environment)

BUG=507906785
TAG=agy
CONV=e15765ae-4a0e-4b45-a7f2-07dad2ac1459
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:run Run e2e tests. label Sep 22, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:run Run e2e tests. label Sep 22, 2026
@SuperStrongDinosaur SuperStrongDinosaur added the kokoro:force-run Trigger a presubmit build unconditionally. label Sep 22, 2026
@GoogleCuttlefishTesterBot GoogleCuttlefishTesterBot removed the kokoro:force-run Trigger a presubmit build unconditionally. label Sep 22, 2026

This branch has not been deployed

No deployments
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.

4 participants