[dpdk-dev,02/13] devargs: fix unittest
Checks
Commit Message
Since the scan-mode of the bus is now based on the bus configuration it
isn't possible to have blacklisted and whitelisted devices existing for
the same bus. This fixes the unittest to reflect that.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
test/test/test_devargs.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
@@ -68,13 +68,15 @@ test_devargs(void)
goto fail;
if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "0000:5:00.0") < 0)
goto fail;
- if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI, "04:00.0,arg=val") < 0)
+ if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI, "04:00.0,arg=val")
+ == 0)
goto fail;
- if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI, "0000:01:00.1") < 0)
+ if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI, "0000:01:00.1")
+ == 0)
goto fail;
if (rte_eal_devargs_type_count(RTE_DEVTYPE_WHITELISTED_PCI) != 2)
goto fail;
- if (rte_eal_devargs_type_count(RTE_DEVTYPE_BLACKLISTED_PCI) != 2)
+ if (rte_eal_devargs_type_count(RTE_DEVTYPE_BLACKLISTED_PCI) != 0)
goto fail;
if (rte_eal_devargs_type_count(RTE_DEVTYPE_VIRTUAL) != 0)
goto fail;