AHM ASAN test adjustment
authorNicholas Ormrod <njormrod@fb.com>
Wed, 7 Jan 2015 17:31:31 +0000 (09:31 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:04 +0000 (11:01 -0800)
Summary:
The AHA-insert-race test case (a) does a LOT of iterations, and
(b) allocated and deallocates a lot of memory on each iteration.

The long iterations, by themselves, take 8s, and should be reduced.
Further, ASAN errors on these tests, since it needs to hold on to memory
for a bit of time and ends up OOMing.

Test Plan:
fbconfig -r 'folly' '--platform-all=gcc-4.8.1-glibc-2.17-fb' '--sanitize=address'
fbmake runtests Ahm.atomic_hash_array_insert_race

Reviewed By: robbert@fb.com

Subscribers: sdwilsh, folly-diffs@

FB internal diff: D1767334

Tasks: 5941888

Signature: t1:1767334:1420612386:4d6f4067b30d1cb7d20bcfeb0f31fac1339ead20

folly/test/AtomicHashMapTest.cpp

index 8a88031e9f2fc24d3ff97c57dd565e3601e36d02..d34c29a7597e9768cf6832685afe3863adb5cf0a 100644 (file)
@@ -606,7 +606,7 @@ void* atomicHashArrayInsertRaceThread(void* j) {
 }
 TEST(Ahm, atomic_hash_array_insert_race) {
   AHA* arr = atomicHashArrayInsertRaceArray.get();
-  int numIterations = 50000, FLAGS_numThreads = 4;
+  int numIterations = 5000, FLAGS_numThreads = 4;
   void* statuses[FLAGS_numThreads];
   for (int i = 0; i < numIterations; i++) {
     arr->clear();