Close() shouldn't throw

Close() should handle releasing resources when we are no longer using
a VM (since we implement autoCloseable). It shouldn't throw if th VM
is stopped - that just means nothing is being used.

We could get rid of stop(), or give it the same semantics, but I think
it has uses - if the app should be running then stop() throwing shows
something is wrong.

Add tests. Also minor gratuitous simplification in benchmark code.

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