Re: [PATCH v8 2/9] test: add basic bus infrastructure tests
From: Shreyansh Jain <hidden>
Date: 2017-01-18 06:56:38
-----Original Message----- From: Shreyansh Jain Sent: Wednesday, January 18, 2017 10:42 AM To: 'Thomas Monjalon' <redacted> Cc: dev@dpdk.org Subject: RE: [PATCH v8 2/9] test: add basic bus infrastructure testsquoted
-----Original Message----- From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] Sent: Wednesday, January 18, 2017 4:54 AM To: Shreyansh Jain <redacted> Cc: dev@dpdk.org Subject: Re: [PATCH v8 2/9] test: add basic bus infrastructure tests 2017-01-17 19:07, Shreyansh Jain:quoted
+REGISTER_TEST_COMMAND(bus_autotest, test_bus);You should add it to app/test/autotest_data.pyOk. I will do that.quoted
quoted
+/* Bus list exposed */ +extern struct rte_bus_list rte_bus_list;I think it should be possible to write a test without the real list of registered bus.Yes, it is possible. I just modeled it on test_pci assuming that is a kind of expected/standard. But, it seems probably it is not. I will change the tests.
After sending out this mail I realized the real reason for using the actual lists. Functions like rte_eal_pci_register (for PCI) or rte_bus_register (for Bus), use global lists for registration. Test cases calls these functions for registering dummy device/bus. One way is to not worry about adding these test/dummy devices/buses to original list as they would be unregistered anyway. But, risk is of impacting running list assuming multiple cases need to be run from same application/binary context. Another way is to rewrite these functions locally in test case, but that also means not testing these global registration/de-registration functions. Former method would continue to have symbols exported. Later is not testing some entry/exit functions of a sub-system. You still interested in this change?