test/atomic: fix 128-bit atomic test with many cores
authorDavid Christensen <drc@linux.vnet.ibm.com>
Wed, 8 Sep 2021 17:48:20 +0000 (10:48 -0700)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 14 Oct 2021 15:20:49 +0000 (17:20 +0200)
commit17a042376be17f6c615b93b189a53eaca1b8bd48
tree5fd0c62ad1bbb88d41a3c497c5b1d1c6dd0a5239
parentb698651b916a430ff4e0ef209c3dd0e55ae9a675
test/atomic: fix 128-bit atomic test with many cores

When checking the results of the rte_atomic128_cmp_exchange() function,
current code compares the values of a uint32_t and a uint64_t variable.
If the number of lcores used by the test is large, or the value of the
iteration count N is increased, the variable size mismatch can cause a
false test failure.  Modify the comparison to compare uint64_t values.

Fixes: fa3253c534b1 ("test/atomic: add 128-bit atomic compare exchange test")
Cc: stable@dpdk.org
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
app/test/test_atomic.c