pvmfw: Clean up test data for mocking crosvm DT
This CL adds manually generated baseline DT, and make test DTs to
include the baseline DT.
This removes duplicated and fake nodes from test data, and also helps to
test real scenario.
BYPASS_INCLUSIVE_LANGUAGE_REASON='linux,dummy-virt' is kernel arch name
Bug: 277993056, Bug: 311655051
Test: atest libpvmfw.device_assignment.test, launch protected VM
Change-Id: Ifbf7ded418d567420711cd17df6d7365d56f477d
diff --git a/pvmfw/Android.bp b/pvmfw/Android.bp
index 42ff982..d267e2e 100644
--- a/pvmfw/Android.bp
+++ b/pvmfw/Android.bp
@@ -121,37 +121,43 @@
out: ["test_pvmfw_devices_vm_dtbo_without_symbols.dtbo"],
}
+genrule_defaults {
+ name: "test_device_assignment_dts_to_dtb",
+ defaults: ["dts_to_dtb"],
+ srcs: ["testdata/test_crosvm_dt_base.dtsi"],
+}
+
genrule {
name: "test_pvmfw_devices_with_rng",
- defaults: ["dts_to_dtb"],
+ defaults: ["test_device_assignment_dts_to_dtb"],
srcs: ["testdata/test_pvmfw_devices_with_rng.dts"],
out: ["test_pvmfw_devices_with_rng.dtb"],
}
genrule {
name: "test_pvmfw_devices_without_iommus",
- defaults: ["dts_to_dtb"],
+ defaults: ["test_device_assignment_dts_to_dtb"],
srcs: ["testdata/test_pvmfw_devices_without_iommus.dts"],
out: ["test_pvmfw_devices_without_iommus.dtb"],
}
genrule {
name: "test_pvmfw_devices_with_multiple_devices_iommus",
- defaults: ["dts_to_dtb"],
+ defaults: ["test_device_assignment_dts_to_dtb"],
srcs: ["testdata/test_pvmfw_devices_with_multiple_devices_iommus.dts"],
out: ["test_pvmfw_devices_with_multiple_devices_iommus.dtb"],
}
genrule {
name: "test_pvmfw_devices_with_iommu_sharing",
- defaults: ["dts_to_dtb"],
+ defaults: ["test_device_assignment_dts_to_dtb"],
srcs: ["testdata/test_pvmfw_devices_with_iommu_sharing.dts"],
out: ["test_pvmfw_devices_with_iommu_sharing.dtb"],
}
genrule {
name: "test_pvmfw_devices_with_iommu_id_conflict",
- defaults: ["dts_to_dtb"],
+ defaults: ["test_device_assignment_dts_to_dtb"],
srcs: ["testdata/test_pvmfw_devices_with_iommu_id_conflict.dts"],
out: ["test_pvmfw_devices_with_iommu_id_conflict.dtb"],
}