validation: lock: tuning the iteration number
validation: lock: tuning the iteration number

fixing: https://bugs.linaro.org/show_bug.cgi?id=2108

The no_lock_functional_test does not really tests the ODP functionality:
Instead, it actually checks that race conditions can be created between
concurrent running threads (by making these threads writing shared
variables without lock, and later noting the value written was changed by
some of the concurrent threads).
This test therefore validates other tests: if this test passes -i.e. if
we do have race condition- then if the following tests suppress these
race conditions by using some synchronization mechanism, these
synchronization mechanisms can be said to be efficient.
If, on the other hand, the no_lock_functional_test "fails", it says
that the following tests are really inconclusive as the effect of the
tested synchronization mechanism is not proven.

When running with valgrind, no_lock_functional_test failed, probably
because the extra execution time introduced by valgrind itself made
the chance to run the critical section of the different threads "at
the same time" much less probable.

The simple solution is to increase the critical section running time
(by largely increasing the number of iterations performed).
The solution taken here is actually to tune the critical section running
time (currentely to ITER_MPLY_FACTOR=3 times the time needed to note
the first race condition).
This means that the test will take longer to run with valgrind,
but will remain short without valgrind.

Signed-off-by: Christophe Milard <99616a981fa4477cda708a70f78076761c0c9f1c@linaro.org>
Reviewed-and-tested-by: Bill Fischofer <52f3c909d51cc5d355a68a403df6906b3c1a8f83@linaro.org>
Signed-off-by: Mike Holmes <ed44c09f4d7f698f5510adc894a872c73e08c8bd@linaro.org>

ravineet-singh/odp,ravineet-singh/odp,erachmi/odp,ravineet-singh/odp,mike-holmes-linaro/odp,nmorey/odp,dkrot/odp,erachmi/odp,mike-holmes-linaro/odp,erachmi/odp,dkrot/odp,mike-holmes-linaro/odp,nmorey/odp,mike-holmes-linaro/odp,nmorey/odp,ravineet-singh/odp,erachmi/odp,nmorey/odp,dkrot/odp,dkrot/odp