pci_ut: Add the simple bdf parse test.
Make sure that we can parse domain with 32 bit address. Signed-off-by: Ziye Yang <ziye.yang@intel.com> Change-Id: I83ca08d5156c58b97e96b3884b5c6d6afcd1969a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1536 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
fdd5151e6b
commit
c9afbb3ab2
11
test/env/pci/pci_ut.c
vendored
11
test/env/pci/pci_ut.c
vendored
@ -144,13 +144,16 @@ pci_hook_test(void)
|
||||
uint64_t bar0_paddr, bar0_size;
|
||||
int rc;
|
||||
|
||||
ut_dev.pci.addr.domain = 0x10000;
|
||||
ut_dev.pci.addr.bus = 0x0;
|
||||
ut_dev.pci.addr.dev = 0x1;
|
||||
ut_dev.pci.addr.func = 0x0;
|
||||
ut_dev.pci.id.vendor_id = 0x4;
|
||||
ut_dev.pci.id.device_id = 0x8;
|
||||
|
||||
/* Use add parse for initilization */
|
||||
spdk_pci_addr_parse(&ut_dev.pci.addr, "10000:00:01.0");
|
||||
CU_ASSERT(ut_dev.pci.addr.domain == 0x10000);
|
||||
CU_ASSERT(ut_dev.pci.addr.bus == 0x0);
|
||||
CU_ASSERT(ut_dev.pci.addr.dev == 0x1);
|
||||
CU_ASSERT(ut_dev.pci.addr.func == 0x0);
|
||||
|
||||
ut_dev.pci.map_bar = ut_map_bar;
|
||||
ut_dev.pci.unmap_bar = ut_unmap_bar;
|
||||
ut_dev.pci.cfg_read = ut_cfg_read;
|
||||
|
Loading…
Reference in New Issue
Block a user