diff options
author | tb <> | 2023-04-19 15:34:23 +0000 |
---|---|---|
committer | tb <> | 2023-04-19 15:34:23 +0000 |
commit | f254a71386ffa09116825ad7be0183ea0443ed8b (patch) | |
tree | f957f7a0a5fe35499f6ef245ce4a923629cd547f /src/regress/lib | |
parent | 584ae0479395cc62c3c913674b07fc3ad6cf7bae (diff) | |
download | openbsd-f254a71386ffa09116825ad7be0183ea0443ed8b.tar.gz openbsd-f254a71386ffa09116825ad7be0183ea0443ed8b.tar.bz2 openbsd-f254a71386ffa09116825ad7be0183ea0443ed8b.zip |
interop: work around extreme REGRESS_SKIP_SLOW slowness
A few years back beck introduced REGRESS_SKIP_SLOW dances with the idea
that this should speed up the interop tests for us devs because this also
checked interop between opensslX and opensslY, which we don't particularly
care about. This never really worked. On a mac m1 mini the result is this:
REGRESS_SKIP_SLOW unset
9m56.69s real 3m42.24s user 3m00.70s system
REGRESS_SKIP_SLOW=yes
11m04.61s real 7m29.61s user 1m40.29s system
The problem is that REGRESS_SKIP_SLOW simply wasn't designed to handle
the huge number of tests we have here. There are many nested .for loops
resulting in several thousand tests. Each test has a name of length ~80.
REGRESS_SKIP_SLOW concatenates them into a several hundred kilobytes
long string in REGRESS_SKIP_TARGETS, iterates over all regress targets and
tests with ".if ${REGRESS_SKIP_TARGETS:M${RT}}" if it should skip them.
This means that during a regress run, make spends a lot of time linearly
scanning a huge string.
I ran into this when I added OpenSSL 3.0 tests to the already existing
1.0.2 and 1.1 tests with the result that with REGRESS_SLOW_TARGTS set
it took the better part of an hour while without it it took about 15 min.
The hack here is simply to avoid using REGRESS_SLOW_TARGTES here and
handle the situation differently.
patch, REGRESS_SKIP_SLOW=yes
5m42.32s real 2m09.98s user 1m45.21s system
The real solution would be to fix this in bsd.regress.mk, which someone
who understands make well is very welcome to do. For now, I'm happy with
this.
Debugged with jsing a few months ago
Diffstat (limited to 'src/regress/lib')
-rw-r--r-- | src/regress/lib/libssl/interop/cert/Makefile | 11 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/cipher/Makefile | 14 | ||||
-rw-r--r-- | src/regress/lib/libssl/interop/version/Makefile | 14 |
3 files changed, 31 insertions, 8 deletions
diff --git a/src/regress/lib/libssl/interop/cert/Makefile b/src/regress/lib/libssl/interop/cert/Makefile index 32b7a4f4f1..47f4422d6e 100644 --- a/src/regress/lib/libssl/interop/cert/Makefile +++ b/src/regress/lib/libssl/interop/cert/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.9 2023/02/01 14:39:09 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.10 2023/04/19 15:34:23 tb Exp $ |
2 | 2 | ||
3 | # Connect a client to a server. Both can be current libressl, or | 3 | # Connect a client to a server. Both can be current libressl, or |
4 | # openssl 1.1 or 3.0. Create client and server certificates | 4 | # openssl 1.1 or 3.0. Create client and server certificates |
@@ -39,7 +39,8 @@ FAIL_${cca}_${sca}_${ccert}_${scert}_${cv}_${sv} = ! | |||
39 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") | 39 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") |
40 | REGRESS_TARGETS += run-cert-client-${clib}-${cca}-${ccert}-${cv}-server-${slib}-${sca}-${scert}-${sv} | 40 | REGRESS_TARGETS += run-cert-client-${clib}-${cca}-${ccert}-${cv}-server-${slib}-${sca}-${scert}-${sv} |
41 | .else | 41 | .else |
42 | REGRESS_SLOW_TARGETS += run-cert-client-${clib}-${cca}-${ccert}-${cv}-server-${slib}-${sca}-${scert}-${sv} | 42 | # Don't use REGRESS_SLOW_TARGETS since its handling in bsd.regress.mk is slow. |
43 | SLOW_TARGETS += run-cert-client-${clib}-${cca}-${ccert}-${cv}-server-${slib}-${sca}-${scert}-${sv} | ||
43 | .endif | 44 | .endif |
44 | 45 | ||
45 | run-cert-client-${clib}-${cca}-${ccert}-${cv}-server-${slib}-${sca}-${scert}-${sv}: \ | 46 | run-cert-client-${clib}-${cca}-${ccert}-${cv}-server-${slib}-${sca}-${scert}-${sv}: \ |
@@ -76,6 +77,12 @@ run-cert-client-${clib}-${cca}-${ccert}-${cv}-server-${slib}-${sca}-${scert}-${s | |||
76 | .endfor | 77 | .endfor |
77 | .endfor | 78 | .endfor |
78 | 79 | ||
80 | .include <bsd.own.mk> | ||
81 | REGRESS_SKIP_SLOW ?= no | ||
82 | .if ${REGRESS_SKIP_SLOW:L} != "yes" | ||
83 | REGRESS_TARGETS += ${SLOW_TARGETS} | ||
84 | .endif | ||
85 | |||
79 | REGRESS_TARGETS += run-bob | 86 | REGRESS_TARGETS += run-bob |
80 | run-bob: | 87 | run-bob: |
81 | @echo Bob, be happy! Tests finished. | 88 | @echo Bob, be happy! Tests finished. |
diff --git a/src/regress/lib/libssl/interop/cipher/Makefile b/src/regress/lib/libssl/interop/cipher/Makefile index 3cb4330d31..85d927a92d 100644 --- a/src/regress/lib/libssl/interop/cipher/Makefile +++ b/src/regress/lib/libssl/interop/cipher/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.11 2023/02/01 14:39:09 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.12 2023/04/19 15:34:23 tb Exp $ |
2 | 2 | ||
3 | # Connect a client to a server. Both can be current libressl, or | 3 | # Connect a client to a server. Both can be current libressl, or |
4 | # openssl 1.1 or 3.0. Create lists of supported ciphers | 4 | # openssl 1.1 or 3.0. Create lists of supported ciphers |
@@ -105,7 +105,8 @@ DHPARAM_${cipher}_${slib} = | |||
105 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") | 105 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") |
106 | REGRESS_TARGETS += run-cipher-${cipher}-client-${clib}-server-${slib} | 106 | REGRESS_TARGETS += run-cipher-${cipher}-client-${clib}-server-${slib} |
107 | .else | 107 | .else |
108 | REGRESS_SLOW_TARGETS += run-cipher-${cipher}-client-${clib}-server-${slib} | 108 | # Don't use REGRESS_SLOW_TARGETS since its handling in bsd.regress.mk is slow. |
109 | SLOW_TARGETS += run-cipher-${cipher}-client-${clib}-server-${slib} | ||
109 | .endif | 110 | .endif |
110 | run-cipher-${cipher}-client-${clib}-server-${slib} \ | 111 | run-cipher-${cipher}-client-${clib}-server-${slib} \ |
111 | client-cipher-${cipher}-client-${clib}-server-${slib}.out \ | 112 | client-cipher-${cipher}-client-${clib}-server-${slib}.out \ |
@@ -127,7 +128,8 @@ server-cipher-${cipher}-client-${clib}-server-${slib}.out: dh.param \ | |||
127 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") | 128 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") |
128 | REGRESS_TARGETS += check-cipher-${cipher}-client-${clib}-server-${slib} | 129 | REGRESS_TARGETS += check-cipher-${cipher}-client-${clib}-server-${slib} |
129 | .else | 130 | .else |
130 | REGRESS_SLOW_TARGETS += check-cipher-${cipher}-client-${clib}-server-${slib} | 131 | # Don't use REGRESS_SLOW_TARGETS since its handling in bsd.regress.mk is slow. |
132 | SLOW_TARGETS += check-cipher-${cipher}-client-${clib}-server-${slib} | ||
131 | .endif | 133 | .endif |
132 | check-cipher-${cipher}-client-${clib}-server-${slib}: \ | 134 | check-cipher-${cipher}-client-${clib}-server-${slib}: \ |
133 | client-cipher-${cipher}-client-${clib}-server-${slib}.out \ | 135 | client-cipher-${cipher}-client-${clib}-server-${slib}.out \ |
@@ -161,4 +163,10 @@ check-cipher-${cipher}-client-${clib}-server-${slib}: \ | |||
161 | .endfor | 163 | .endfor |
162 | .endfor | 164 | .endfor |
163 | 165 | ||
166 | .include <bsd.own.mk> | ||
167 | REGRESS_SKIP_SLOW ?= no | ||
168 | .if ${REGRESS_SKIP_SLOW:L} != "yes" | ||
169 | REGRESS_TARGETS += ${SLOW_TARGETS} | ||
170 | .endif | ||
171 | |||
164 | .include <bsd.regress.mk> | 172 | .include <bsd.regress.mk> |
diff --git a/src/regress/lib/libssl/interop/version/Makefile b/src/regress/lib/libssl/interop/version/Makefile index 1e0af57a66..9d0ae418ba 100644 --- a/src/regress/lib/libssl/interop/version/Makefile +++ b/src/regress/lib/libssl/interop/version/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.5 2023/02/01 14:39:09 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.6 2023/04/19 15:34:23 tb Exp $ |
2 | 2 | ||
3 | # Connect a client to a server. Both can be current libressl, or | 3 | # Connect a client to a server. Both can be current libressl, or |
4 | # openssl 1.1 or openssl 3.0. Pin client or server to a fixed TLS | 4 | # openssl 1.1 or openssl 3.0. Pin client or server to a fixed TLS |
@@ -37,7 +37,8 @@ FAIL_${cver}_${sver} = ! | |||
37 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") | 37 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") |
38 | REGRESS_TARGETS += run-version-client-${clib}-${cver}-server-${slib}-${sver} | 38 | REGRESS_TARGETS += run-version-client-${clib}-${cver}-server-${slib}-${sver} |
39 | .else | 39 | .else |
40 | REGRESS_SLOW_TARGETS += run-version-client-${clib}-${cver}-server-${slib}-${sver} | 40 | # Don't use REGRESS_SLOW_TARGETS since its handling in bsd.regress.mk is slow. |
41 | SLOW_TARGETS += run-version-client-${clib}-${cver}-server-${slib}-${sver} | ||
41 | .endif | 42 | .endif |
42 | 43 | ||
43 | run-version-client-${clib}-${cver}-server-${slib}-${sver} \ | 44 | run-version-client-${clib}-${cver}-server-${slib}-${sver} \ |
@@ -65,7 +66,8 @@ server-version-client-${clib}-${cver}-server-${slib}-${sver}.out: \ | |||
65 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") | 66 | .if ("${clib}" == "libressl" || "${slib}" == "libressl") |
66 | REGRESS_TARGETS += check-version-client-${clib}-${cver}-server-${slib}-${sver} | 67 | REGRESS_TARGETS += check-version-client-${clib}-${cver}-server-${slib}-${sver} |
67 | .else | 68 | .else |
68 | REGRESS_SLOW_TARGETS += check-version-client-${clib}-${cver}-server-${slib}-${sver} | 69 | # Don't use REGRESS_SLOW_TARGETS since its handling in bsd.regress.mk is slow. |
70 | SLOW_TARGETS += check-version-client-${clib}-${cver}-server-${slib}-${sver} | ||
69 | .endif | 71 | .endif |
70 | 72 | ||
71 | check-version-client-${clib}-${cver}-server-${slib}-${sver}: \ | 73 | check-version-client-${clib}-${cver}-server-${slib}-${sver}: \ |
@@ -98,4 +100,10 @@ check-version-client-${clib}-${cver}-server-${slib}-${sver}: \ | |||
98 | .endfor | 100 | .endfor |
99 | .endfor | 101 | .endfor |
100 | 102 | ||
103 | .include <bsd.own.mk> | ||
104 | REGRESS_SKIP_SLOW ?= no | ||
105 | .if ${REGRESS_SKIP_SLOW:L} != "yes" | ||
106 | REGRESS_TARGETS += ${SLOW_TARGETS} | ||
107 | .endif | ||
108 | |||
101 | .include <bsd.regress.mk> | 109 | .include <bsd.regress.mk> |