numam-dpdk/app
Olivier Matz a7e88f1782 app/test: fix reentrancy autotest
The previous code in func_reentrancy autotest was doing in parallel
something close to:

  name = "common_name";
  do several times {
      obj = allocate_an_object(name)   // obj = ring, mempool, hash, lpm, ...
      if (obj == NULL && lookup(name) == NULL)
          return TEST_FAIL;
  }

This code is not safe. For instance:

   mempool_create() is called on core 0, it creates a ring. At the same
   time on core 1, mempool_create() is called too and the creation of the
   ring fails (EEXIST). But the mempool lookup can fail on core 1 if
   the mempool is not added in the list by core 0.

This commit fixes the func_reentrancy autotest that now works with all
tested class of objects.

Fixes: 104a92bd02 ("app: add reentrancy tests")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2016-04-06 17:30:51 +02:00
..
cmdline_test app/cmdline_test: add missing dependencies 2015-12-03 00:02:26 +01:00
proc_info config: remove useless explicit includes of generated header 2016-02-10 22:43:38 +01:00
test app/test: fix reentrancy autotest 2016-04-06 17:30:51 +02:00
test-acl acl: add NEON optimization for ARMv8 2015-11-18 22:44:01 +01:00
test-pipeline ethdev: use constants for link state 2016-04-01 21:38:34 +02:00
test-pmd ethdev: add 100G link speed 2016-04-01 21:38:34 +02:00
Makefile config: remove EAL flags for OS environment 2016-03-05 11:09:31 +01:00