gpu: nvgpu: unit: atomics: increase reliability

The test atomic_cmpxchg_not_atomic_threaded is failing intermittently.
Increase the iterations to try to increase reliability.

NVGPU-2251

Change-Id: Ib585321a28c21d073acac5b7b8509d3af55316b8
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2127948
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2019-05-30 12:36:12 -04:00
committed by mobile promotions
parent 773c27dab5
commit 937f2a101a

View File

@@ -1431,7 +1431,31 @@ struct atomic_test_args xchg_64_arg = {
.start_val = INT_MAX,
.value = 1,
.loop_count = 10000,
.repeat_count = 2000, /* for threaded test */
.repeat_count = 10000, /* for threaded test */
};
struct atomic_test_args cmpxchg_not_atomic_arg = {
.op = op_cmpxchg,
.type = NOT_ATOMIC,
.start_val = 1,
.value = 1,
.loop_count = 10000,
.repeat_count = 50000, /* for threaded test */
};
struct atomic_test_args cmpxchg_32_arg = {
.op = op_cmpxchg,
.type = ATOMIC_32,
.start_val = 1,
.value = 1,
.loop_count = 10000,
.repeat_count = 50000, /* for threaded test */
};
struct atomic_test_args cmpxchg_64_arg = {
.op = op_cmpxchg,
.type = ATOMIC_64,
.start_val = INT_MAX,
.value = 1,
.loop_count = 10000,
.repeat_count = 50000, /* for threaded test */
};
static struct atomic_test_args add_unless_32_arg = {
/* must loop at least 10 times */
@@ -1482,9 +1506,9 @@ struct unit_module_test atomic_tests[] = {
UNIT_TEST(atomic_add_64_threaded, test_atomic_arithmetic_threaded, &add_64_arg, 0),
UNIT_TEST(atomic_sub_32_threaded, test_atomic_arithmetic_threaded, &sub_32_arg, 0),
UNIT_TEST(atomic_sub_64_threaded, test_atomic_arithmetic_threaded, &sub_64_arg, 0),
UNIT_TEST(atomic_cmpxchg_not_atomic_threaded, test_atomic_arithmetic_threaded, &xchg_not_atomic_arg, 0),
UNIT_TEST(atomic_cmpxchg_32_threaded, test_atomic_arithmetic_threaded, &xchg_32_arg, 0),
UNIT_TEST(atomic_cmpxchg_64_threaded, test_atomic_arithmetic_threaded, &xchg_64_arg, 0),
UNIT_TEST(atomic_cmpxchg_not_atomic_threaded, test_atomic_arithmetic_threaded, &cmpxchg_not_atomic_arg, 0),
UNIT_TEST(atomic_cmpxchg_32_threaded, test_atomic_arithmetic_threaded, &cmpxchg_32_arg, 0),
UNIT_TEST(atomic_cmpxchg_64_threaded, test_atomic_arithmetic_threaded, &cmpxchg_64_arg, 0),
/* Level 1 tests */
UNIT_TEST(atomic_inc_and_test_not_atomic_threaded, test_atomic_arithmetic_and_test_threaded, &inc_and_test_not_atomic_arg, 1),