From 316eff99ca52348e63eb33d989adedb979e129eb Mon Sep 17 00:00:00 2001 From: Anthony Date: Tue, 26 Mar 2024 14:06:35 -0400 Subject: [PATCH] SDE tests: Add more randomness to the test. By varying the pressure on different buckets we increase the chance of catching hash table bugs. --- src/components/sde/tests/Counting_Set/CountingSet_Lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/sde/tests/Counting_Set/CountingSet_Lib.c b/src/components/sde/tests/Counting_Set/CountingSet_Lib.c index 2b577dd95..e9b2cb647 100644 --- a/src/components/sde/tests/Counting_Set/CountingSet_Lib.c +++ b/src/components/sde/tests/Counting_Set/CountingSet_Lib.c @@ -28,6 +28,10 @@ void libCSet_do_simple_work(void){ for(i=0; i<22390; i++){ int j = i%5222; + long r = random(); + if ( r%23 == 0 ){ + j = r%2287; + } element.id = j; element.x = (float)j*1.037/((float)j+32.1); element.y = (double)(element.x)+145.67/((double)j+0.01);