-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: speed up builds with single-binary test bundles #14772
Conversation
251a405
to
8ff4573
Compare
Analysis of PR #14772 at 2bdff798: Test 500 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Note that this test has failed in 9 different CI jobs (the link just goes to one of them). Test 504 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Note that this test has failed in 9 different CI jobs (the link just goes to one of them). Test 501 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Note that this test has failed in 9 different CI jobs (the link just goes to one of them). Test 502 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Note that this test has failed in 9 different CI jobs (the link just goes to one of them). Test 507 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Note that this test has failed in 9 different CI jobs (the link just goes to one of them). Test 508 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Note that this test has failed in 9 different CI jobs (the link just goes to one of them). Test 510 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Note that this test has failed in 9 different CI jobs (the link just goes to one of them). There are more failures, but that's enough from Gha. Generated by Testclutch |
a09ae03
to
3741f97
Compare
3df946f
to
3a3a268
Compare
This is ready now for the most part. Remains is to set it up in CI without enabling these features by default. It may make building and running tests more "accessible". |
4c20cb4
to
d84875b
Compare
073d0b5
to
89fa5f4
Compare
098c2f0
to
089782c
Compare
318e04d
to
2f8f53e
Compare
6720052
to
0f7a05c
Compare
Apart from one pending question/decision: #14772 (comment), (The same optimization can be done for |
This reverts commit 11cccf8. Still slow: - FreeBSD autotools +36s - FreeBSD cmake +1m
I don't follow. Why would they? Are the bundled versions of the tests executing more/other code than the "regular" builds? |
They don't, besides a short lookup / dispatch in It was curious the bundles caught two new leaks, that were never caught before. But this was more like a wild guess to explain it, and to not break something by accident. |
I have not seen those fixes so I cannot comment on why they were not found before. Can you point them out for me? I suspect maybe it rather indicatives that we might have include problems or something in the affected tests. |
The two sub-commits with the fixes:
|
As I suspected, fix here: #15007 I'll ponder on a system where this can be caught better. |
Oh right, indeed, nice catch! |
Disable dependency tracking and enable unity + test bundles for the `configure-libssh` job that was missed in earlier commits. Follow-up to 71cf0d1 curl#14772 Follow-up to dff6619 curl#14975
…ilds - lib557: suppress `-Wformat-overflow` warning in source. Fixes: ``` lib557.c: In function ‘test_float_formatting’: lib557.c:1408:37: error: ‘%*f’ directive output of 2147483648 bytes exceeds ‘INT_MAX’ [-Werror=format-overflow=] 1408 | curl_msnprintf(buf, sizeof(buf), "%*f", INT_MIN, 9.1); | ^~~ lib557.c:1408:3: note: ‘curl_msnprintf’ output 2147483649 bytes 1408 | curl_msnprintf(buf, sizeof(buf), "%*f", INT_MIN, 9.1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Ref: https://app.circleci.com/pipelines/github/curl/curl/10226/workflows/87642ee9-cda6-4916-8206-c82aac5f595e/jobs/107669?invite=true#step-106-40996_46 The root cause of why this option gets enabled remains undiscovered. Reported-by: Daniel Stenberg Fixes #15008 Follow-up to 71cf0d1 #14772 - build: drop `-Wno-format-overflow` from picky warning list. These options only get used with picky warnings enabled. Follow-up to 145f87b #14598 - unit1652: suppress in source (and not rely on picky warnings anymore.) Closes #15012
Test build step speed-up (3x): 18s -> 6s Follow-up to 71cf0d1 curl#14772
Add support for single-block binaries that contain all libtests and
unit tests respectively.
Enable with:
--enable-test-bundles
-DCURL_TEST_BUNDLES=ON
(They are compatible with
--enable-unity
and-DCMAKE_UNITY_BUILD=ON
options, for further speed-up.)
Makes libtests and unit tests build fast, needing little disk space
even in static mode. Similar to CMake unity mode, but with a custom
script, also supporting autotools builds.
The price is having to deal with symbols/macros colliding between
lib*.c
andunit*.c
sources. Maybe with naming conventions or othersolutions this can be improved gradually and reduce the need for manual
intervention by
mk-bundle.mk
. I've included a script that does the bulkof detecting name collisions.
Also:
bufref
structure in
unit_stop()
that was allocated inunit_setup()
.Similar test suite builds with autotools default and cmake+bundle+unity:
https://github.com/curl/curl/actions/runs/10705668823/job/29681617374
https://github.com/curl/curl/actions/runs/10705668813/job/29681632885
https://github.com/curl/curl/actions/runs/10705668811/job/29681607915
https://github.com/curl/curl/actions/runs/10705668809/job/29681609965
https://github.com/curl/curl/actions/runs/10705668808/job/29681624295
https://github.com/curl/curl/actions/runs/10705668808/job/29681628787
Autotools test suite builds compared between master →
--enable-test-bundles
:https://github.com/curl/curl/actions/runs/10710030193/job/29695932185
https://github.com/curl/curl/actions/runs/10967831456/job/30458220344
https://github.com/curl/curl/actions/runs/10710030195/job/29695938444
https://github.com/curl/curl/actions/runs/10967831452/job/30458225762
https://github.com/curl/curl/actions/runs/10710030198/job/29695928401
https://github.com/curl/curl/actions/runs/10967831458/job/30458212692
https://github.com/curl/curl/actions/runs/10710030212/job/29695928213
https://github.com/curl/curl/actions/runs/10967831453/job/30458213268
https://github.com/curl/curl/actions/runs/10710030190/job/29704850591
https://github.com/curl/curl/actions/runs/10967831449/job/30459280005
https://github.com/curl/curl/actions/runs/10710030190/job/29704852058
https://github.com/curl/curl/actions/runs/10967831449/job/30459280862
https://dev.azure.com/daniel0244/curl/_build/results?buildId=25546&view=logs&j=b58b8c59-0f61-52e9-0f9e-fad562a1e77f&t=0f9230a7-3b10-53ca-9938-700ece377c5e
https://dev.azure.com/daniel0244/curl/_build/results?buildId=25547&view=logs&jobId=39473db1-3945-55d5-deb5-c218fad88dce&j=b58b8c59-0f61-52e9-0f9e-fad562a1e77f&t=0f9230a7-3b10-53ca-9938-700ece377c5e
https://dev.azure.com/daniel0244/curl/_build/results?buildId=25546&view=logs&j=9d58b9ac-e1e6-53b6-f83a-1f9f1d912522&t=a6b38d83-e7cf-5a9b-c762-a178412717b7
https://dev.azure.com/daniel0244/curl/_build/results?buildId=25547&view=logs&jobId=39473db1-3945-55d5-deb5-c218fad88dce&j=9d58b9ac-e1e6-53b6-f83a-1f9f1d912522&t=a6b38d83-e7cf-5a9b-c762-a178412717b7
Cmake test suite builds compared between master →
-DCURL_TEST_BUNDLES=ON
+ unity:https://github.com/curl/curl/actions/runs/10710030193/job/29695941814
https://github.com/curl/curl/actions/runs/10705668823/job/29681622201
https://github.com/curl/curl/actions/runs/10718264094/job/29719794727
https://github.com/curl/curl/actions/runs/10718653175/job/29721009613
https://github.com/curl/curl/actions/runs/10710030195/job/29695931956
https://github.com/curl/curl/actions/runs/10705668813/job/29681638937
https://github.com/curl/curl/actions/runs/10710030198
https://github.com/curl/curl/actions/runs/10705668811
https://github.com/curl/curl/actions/runs/10710030212/job/29695929075
https://github.com/curl/curl/actions/runs/10705668809/job/29681609965
https://github.com/curl/curl/actions/runs/10710030190/job/29704850996
https://github.com/curl/curl/actions/runs/10705668808/job/29681624295
https://github.com/curl/curl/actions/runs/10710030190/job/29704852219
https://github.com/curl/curl/actions/runs/10705668808/job/29681631393
https://github.com/curl/curl/actions/runs/10710030190/job/29704849763
https://github.com/curl/curl/actions/runs/10705668808/job/29681622329
https://github.com/curl/curl/actions/runs/10710030190/job/29704850411
https://github.com/curl/curl/actions/runs/10705668808/job/29681623313
https://ci.appveyor.com/project/curlorg/curl/builds/50538455
https://ci.appveyor.com/project/curlorg/curl/builds/50536558
Curl_cmalloc()
in test code?runtests.pl -bundle
option with something automatic? This would allow running it directly without having to add-bundle
manually to match such build. [→ FUTURE]cmake build-only
job.linux-mingw, AM/CM gcc
jobs.tests/server
. + mergemk-bundle.pl
,mk-bundle-server.pl
? and perhapsmk-unity.pl
? [→ SEPARATE PR](to give a speed boost for building
tests/servers
)getaddrinfo()
unwanted override yet again.