app/test: fix pci registration
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Sat, 1 Nov 2014 20:04:02 +0000 (20:04 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 5 Nov 2014 21:18:31 +0000 (22:18 +0100)
commiteea0730f1873915c415dd96d0d05480d79653798
tree86add85375639828919f5b33c22b2b21d55f8ef8
parentb600409890f5fbef7d909c19fd449ee5490d3109
app/test: fix pci registration

Since commit a155d430119 ("support link bonding device initialization"),
rte_eal_pci_probe() is called in rte_eal_init().
pci_autotest called it to bind devices to the test_driver and test_driver2.
Therefore, the function is called twice and devices already allocated
will cause the test fail.

This patch solves that issue, unregistering all previous drivers before
calling rte_eal_pci_probe() for the first time, so DPDK does not try
to allocate data for the devices, binding them to their previous
drivers again.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test/test_pci.c