src/devices/bus/drivers/pci/test/unit/allocation_tests.cc
// Since text allocations lack a valid resource they should fail when
// CreateVMObject is called
Since text allocations lack a valid resource they should fail when
CreateVMObject is called
Since text allocations lack a valid resource they should fail when CreateVMObject is called
TEST(PciAllocationTest, VmoCreationFailure) {
  FakePciroot pciroot;
  ddk::PcirootProtocolClient client(pciroot.proto());
  zx::vmo vmo;
  PciRootAllocator root(client, PCI_ADDRESS_SPACE_MEMORY, false);
  PciAllocator* root_ptr = &root;
  std::unique_ptr<PciAllocation> alloc;
  EXPECT_OK(root_ptr->AllocateWindow(ZX_PAGE_SIZE, &alloc));
  EXPECT_NE(ZX_OK, alloc->CreateVmObject(&vmo));
}
TEST ( PciAllocationTest , VmoCreationFailure ) { FakePciroot pciroot ; ddk :: PcirootProtocolClient client ( pciroot . proto ( ) ) ; zx :: vmo vmo ; PciRootAllocator root ( client , PCI_ADDRESS_SPACE_MEMORY , false ) ; PciAllocator * root_ptr = & root ; std :: unique_ptr < PciAllocation > alloc ; EXPECT_OK ( root_ptr -> AllocateWindow ( ZX_PAGE_SIZE , & alloc ) ) ; EXPECT_NE ( ZX_OK , alloc -> CreateVmObject ( & vmo ) ) ; }
Since text allocations lack a valid resource they should fail when
CreateVMObject is called
Since text allocations lack a valid resource they should fail when CreateVMObject is called