Make sure a deleted VM stays deleted

If we delete a VM instance it is removed from the weak reference
map. If we then recreate a VM with the same name, we end up with two
VirtualMachine objects, which will inevitably end badly. So make sure
that deletion is sticky.

Added a test to check this (and made sure it correctly failed
initially - which also revealed it wasn't cleaning up properly on
failure).

Bug: 261037705
Test: atest MicrodroidTests
Change-Id: I852d5547a24c770e4b97252be5056e06fe3511af
2 files changed
tree: 894dd5af03ed8991e7d93e54faa914cfd9c5f1b1
  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.