Make sure that runToFinish() returns after VM dies

There is a gap between vm.stop() call to complete VM shutdown. So it
could be the case that runToFinish() returns before VM dies, which may
cause confusion. To ensure that, mExecutorService.shutdown() is now only
called from onDied() callback. This also makes the test robust by
implicitly checking whether onDied() is called or not.

Bug: 238692795
Test: atest MicrodroidTests
Change-Id: I4204ff443f3415c6795598c325e03b8bd8fc1f25
1 file changed
tree: 43f98c279be8bc7712bcb82376f7175a46d0e56b
  1. .prebuilt_info/
  2. apex/
  3. apkdmverity/
  4. authfs/
  5. avmd/
  6. compos/
  7. demo/
  8. docs/
  9. javalib/
  10. launcher/
  11. libs/
  12. microdroid/
  13. microdroid_manager/
  14. pvmfw/
  15. rialto/
  16. tests/
  17. virtualizationservice/
  18. vm/
  19. vmbase/
  20. vmclient/
  21. zipfuse/
  22. .clang-format
  23. .gitignore
  24. Android.bp
  25. OWNERS
  26. PREUPLOAD.cfg
  27. README.md
  28. 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.