File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 8
8
"os"
9
9
"runtime"
10
10
"testing"
11
+ "time"
11
12
12
13
"github.com/golang-fips/openssl-fips/openssl"
13
14
)
@@ -42,7 +43,12 @@ func TestMain(m *testing.M) {
42
43
fmt .Println ("OpenSSL version:" , openssl .VersionText ())
43
44
fmt .Println ("FIPS enabled:" , openssl .FIPS ())
44
45
status := m .Run ()
45
- runtime .GC ()
46
+ for i := 0 ; i < 5 ; i ++ {
47
+ // Run GC a few times to avoid false positives in leak detection.
48
+ runtime .GC ()
49
+ // Sleep a bit to let the finalizers run.
50
+ time .Sleep (10 * time .Millisecond )
51
+ }
46
52
openssl .CheckLeaks ()
47
53
os .Exit (status )
48
54
}
Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ rm -rf "openssl-$version"
48
48
mv " openssl-$tag " " openssl-$version "
49
49
50
50
cd " openssl-$version "
51
- ./config $config
51
+ # -d makes a debug build which helps with debugging memory issues and
52
+ # other problems. It's not necessary for normal use.
53
+ ./config -d $config
52
54
make -j$( nproc) $make
53
55
54
56
cp -H ./libcrypto.so " /usr/lib/libcrypto.so.${version} "
You can’t perform that action at this time.
0 commit comments