Skip to content

Commit

Permalink
turn concurrentMap test futures into nightly tests
Browse files Browse the repository at this point in the history
Previously, we were locking down the expected memleak behavior for these
tests. Not all of our nightly jobs run futures but we would still like
to run these as correctness tests.

We also have infrastructure for detecting tests that leak memory so
it's better to leverage that rather than having these as futures
anyway.

So, I've rewritten these to not pass `--memLeaks` and then added some
separate "memLeak" only tests.

---
Signed-off-by: Andy Stone <[email protected]>
  • Loading branch information
stonea committed Jun 28, 2024
1 parent d8a66b4 commit 41d4cff
Show file tree
Hide file tree
Showing 19 changed files with 175 additions and 6 deletions.
4 changes: 4 additions & 0 deletions test/library/packages/ConcurrentMap/memLeakTests/PREDIFF
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

sed -E "s/0x[0-9a-f]*/prediffed/" <$2 >$2.predifftmp
mv $2.predifftmp $2
7 changes: 7 additions & 0 deletions test/library/packages/ConcurrentMap/memLeakTests/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This directory is locking down that we currently have a memory leak for
ConcurrentMap. These tests symlink to equivalent correctness tests and can be
removed once this leak is fixed.

We only symlink to the a subset of these tests where the
allocations/deallocations are deterministic (this should be sufficient for
memory tracking purposes).
24 changes: 24 additions & 0 deletions test/library/packages/ConcurrentMap/memLeakTests/testAddSet.good
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{1: -1}

================================================= Memory Leaks ==================================================
Allocated Memory (Bytes) Number Size Total Description Address
=================================================================================================================
testAddSet.chpl:5 1 160 160 Bucket(int(64),int(64)) prediffed
testAddSet.chpl:3 1 88 88 Buckets(int(64),int(64)) prediffed
testAddSet.chpl:3 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(int(64),int(64))?,false,true)prediffed
testAddSet.chpl:3 1 24 24 _token prediffed
testAddSet.chpl:3 1 24 24 _token prediffed
testAddSet.chpl:3 1 24 24 _token prediffed
testAddSet.chpl:3 1 24 24 _token prediffed
testAddSet.chpl:3 1 24 24 _token prediffed
testAddSet.chpl:3 1 24 24 _token prediffed
testAddSet.chpl:32 1 24 24 _token prediffed
testAddSet.chpl:32 1 24 24 _token prediffed
testAddSet.chpl:32 1 24 24 _token prediffed
testAddSet.chpl:32 1 24 24 _token prediffed
testAddSet.chpl:32 1 24 24 _token prediffed
testAddSet.chpl:32 1 24 24 _token prediffed
testAddSet.chpl:3 1024 8 8192 array elements prediffed
testAddSet.chpl:3 1 72 72 domain(1,int(64),one) prediffed
=================================================================================================================

23 changes: 23 additions & 0 deletions test/library/packages/ConcurrentMap/memLeakTests/testClear.good
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{}

================================================= Memory Leaks ==================================================
Allocated Memory (Bytes) Number Size Total Description Address
=================================================================================================================
testClear.chpl:4 1 88 88 Buckets(string,int(64)) prediffed
testClear.chpl:4 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(string,int(64))?,false,true)prediffed
testClear.chpl:4 1 24 24 _token prediffed
testClear.chpl:4 1 24 24 _token prediffed
testClear.chpl:4 1 24 24 _token prediffed
testClear.chpl:4 1 24 24 _token prediffed
testClear.chpl:4 1 24 24 _token prediffed
testClear.chpl:4 1 24 24 _token prediffed
testClear.chpl:12 1 24 24 _token prediffed
testClear.chpl:12 1 24 24 _token prediffed
testClear.chpl:12 1 24 24 _token prediffed
testClear.chpl:12 1 24 24 _token prediffed
testClear.chpl:12 1 24 24 _token prediffed
testClear.chpl:12 1 24 24 _token prediffed
testClear.chpl:4 1024 8 8192 array elements prediffed
testClear.chpl:4 1 72 72 domain(1,int(64),one) prediffed
=================================================================================================================

86 changes: 86 additions & 0 deletions test/library/packages/ConcurrentMap/memLeakTests/testEquality.good
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
true
false
false
true

================================================= Memory Leaks ==================================================
Allocated Memory (Bytes) Number Size Total Description Address
=================================================================================================================
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:9 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:10 1 160 160 Bucket(int(64),int(64)) prediffed
testEquality.chpl:3 1 88 88 Buckets(int(64),int(64)) prediffed
testEquality.chpl:4 1 88 88 Buckets(int(64),int(64)) prediffed
testEquality.chpl:3 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(int(64),int(64))?,false,true)prediffed
testEquality.chpl:4 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(int(64),int(64))?,false,true)prediffed
testEquality.chpl:3 1 24 24 _token prediffed
testEquality.chpl:3 1 24 24 _token prediffed
testEquality.chpl:3 1 24 24 _token prediffed
testEquality.chpl:3 1 24 24 _token prediffed
testEquality.chpl:3 1 24 24 _token prediffed
testEquality.chpl:3 1 24 24 _token prediffed
testEquality.chpl:4 1 24 24 _token prediffed
testEquality.chpl:4 1 24 24 _token prediffed
testEquality.chpl:4 1 24 24 _token prediffed
testEquality.chpl:4 1 24 24 _token prediffed
testEquality.chpl:4 1 24 24 _token prediffed
testEquality.chpl:4 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:13 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:14 1 24 24 _token prediffed
testEquality.chpl:19 1 24 24 _token prediffed
testEquality.chpl:19 1 24 24 _token prediffed
testEquality.chpl:19 1 24 24 _token prediffed
testEquality.chpl:19 1 24 24 _token prediffed
testEquality.chpl:19 1 24 24 _token prediffed
testEquality.chpl:19 1 24 24 _token prediffed
testEquality.chpl:20 1 24 24 _token prediffed
testEquality.chpl:20 1 24 24 _token prediffed
testEquality.chpl:20 1 24 24 _token prediffed
testEquality.chpl:20 1 24 24 _token prediffed
testEquality.chpl:20 1 24 24 _token prediffed
testEquality.chpl:20 1 24 24 _token prediffed
testEquality.chpl:3 1024 8 8192 array elements prediffed
testEquality.chpl:4 1024 8 8192 array elements prediffed
testEquality.chpl:3 1 72 72 domain(1,int(64),one) prediffed
testEquality.chpl:4 1 72 72 domain(1,int(64),one) prediffed
=================================================================================================================

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
1
{two: 2}

================================================= Memory Leaks ==================================================
Allocated Memory (Bytes) Number Size Total Description Address
=================================================================================================================
testGetRemove.chpl:11 1 416 416 Bucket(string,int(64)) prediffed
testGetRemove.chpl:7 1 88 88 Buckets(string,int(64)) prediffed
testGetRemove.chpl:7 1 128 128 [domain(1,int(64),one)] AtomicObject(unmanaged Base(string,int(64))?,false,true)prediffed
testGetRemove.chpl:7 1 24 24 _token prediffed
testGetRemove.chpl:7 1 24 24 _token prediffed
testGetRemove.chpl:7 1 24 24 _token prediffed
testGetRemove.chpl:7 1 24 24 _token prediffed
testGetRemove.chpl:7 1 24 24 _token prediffed
testGetRemove.chpl:7 1 24 24 _token prediffed
testGetRemove.chpl:16 1 24 24 _token prediffed
testGetRemove.chpl:16 1 24 24 _token prediffed
testGetRemove.chpl:16 1 24 24 _token prediffed
testGetRemove.chpl:16 1 24 24 _token prediffed
testGetRemove.chpl:16 1 24 24 _token prediffed
testGetRemove.chpl:16 1 24 24 _token prediffed
testGetRemove.chpl:7 1024 8 8192 array elements prediffed
testGetRemove.chpl:7 1 72 72 domain(1,int(64),one) prediffed
testGetRemove.chpl:11 1 8 8 string copy data prediffed
=================================================================================================================

Empty file.
1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testAddSet.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testClear.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testContains.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testEquality.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testExtend.future

This file was deleted.

1 change: 0 additions & 1 deletion test/library/packages/ConcurrentMap/testGetRemove.future

This file was deleted.

0 comments on commit 41d4cff

Please sign in to comment.