Test CompOS more directly.

Rather than using "vm --daemonize ..." to test, which is a slightly
unrealistic environment and doesn't exercise much of our client-side
code, use composd where we can.

A side-effect of this is that we no longer need to disable selinux for
the tests.

This is a partial revert of commit
6aff4f827839325647a43d3a884e6e3d97075d54, and thus a partial re-submit
of commit a00d792a8f7f4bca3d4deae34abbbc0dcca02f2b, changing only
ComposTestCase. This doesn't address the remanining changes to
ComposKeyTestCase, fixed, since they are higher risk and less urgent.

More significantly I've restricted the check for exact binary match to
vdex files only. The other artifacts currently differ because the fd
numbers used in the two runs are baked into them and differ.

Additionally I've tried to handle adb disconnection. In the old tests
the VM kept running until after we did our checks when we killed
it. In the new tests it gets killed by the service manager at some
indeterminate time after composd_cmd exits, and when it does the adb
connection drops, causing various weird failures. To try to avoid that
I'm deliberately killing it when we're done with it, trying to guard
against it exiting spontaneously in the meantime by doing the ADB
reconnection incantation slightly obsessively.

Bug: 200924405
Test: atest ComposTestCase (locally, on acloud, in presubmit)
Change-Id: Ia56ce4b7305d14d6b759ede0d612eb3095559576
3 files changed
tree: a489ecdb8ffda3af28f0ed61051da3389dba6c11
  1. apex/
  2. apkdmverity/
  3. apkverify/
  4. authfs/
  5. binder_common/
  6. compos/
  7. demo/
  8. docs/
  9. idsig/
  10. javalib/
  11. launcher/
  12. libs/
  13. microdroid/
  14. microdroid_manager/
  15. pvmfw/
  16. tests/
  17. virtualizationservice/
  18. vm/
  19. vmconfig/
  20. zipfuse/
  21. .clang-format
  22. Android.bp
  23. OWNERS
  24. PREUPLOAD.cfg
  25. README.md
  26. TEST_MAPPING
README.md

Virtualization

This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.