virtmgr: /data/nativetest(64)?/vendor -> CallingPartition::Vendor
Bug: 393087663
Test: TH
Change-Id: I621565cf3ff75bd4234bce1dc261e3d3c44d1f50
diff --git a/android/virtmgr/src/aidl.rs b/android/virtmgr/src/aidl.rs
index e98ab5c..eefaa65 100644
--- a/android/virtmgr/src/aidl.rs
+++ b/android/virtmgr/src/aidl.rs
@@ -487,6 +487,12 @@
if path.starts_with("/system/product/") {
return Ok(CallingPartition::Product);
}
+ if path.starts_with("/data/nativetest/vendor/")
+ || path.starts_with("/data/nativetest64/vendor/")
+ {
+ return Ok(CallingPartition::Vendor);
+ }
+
let partition = {
let mut components = path.components();
let Some(std::path::Component::Normal(partition)) = components.nth(1) else {
@@ -2794,6 +2800,14 @@
}
#[test]
+ fn test_vendor_in_data() {
+ assert_eq!(
+ CallingPartition::Vendor,
+ find_partition(Some(Path::new("/data/nativetest64/vendor/file"))).unwrap()
+ );
+ }
+
+ #[test]
fn early_vm_exe_paths_match_succeeds_with_same_paths() {
let early_vm = EarlyVm {
name: "vm_demo_native_early".to_owned(),