[SERVER-69696] Create optional unified unittest binary reasonable static builds Created: 14/Sep/22  Updated: 11/Feb/23  Resolved: 31/Jan/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Daniel Moody Assignee: Daniel Moody
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-70719 Create single-test unit test binaries... Backlog
Assigned Teams:
Server Development Platform
Participants:

 Description   

We currently build 100+ unittest binaries. This is a problem on static builds, where each unittests links in almost all of the libraries (and therefore a massive amount of debug info). The unittests take prohibitively long to build an require a large amount memory and diskspace.

A simple fix to this problem is to build a single unittests binary which encompasses all the unittest binaries. Our unittest framework is already setup to handle this, as a specific test can be selected from a given binary. This will significantly reduce time, memory and diskspace requirements for building all the unittests. It will also reduce runtime of the tests them selves if the unittest binary is ran directly (instead of selecting individual tests) as the program data is loading into memory once instead of 100+ times.

This could be implemented seamlessly in the sconscripts, so that each unittests does not need to change. only mongo_unittest.py would need significant changes.

The same concept could be applied to the benchmark and integration tests.



 Comments   
Comment by Daniel Moody [ 28/Jan/23 ]

ok lets close it

Comment by Alex Neben [ 28/Jan/23 ]

Gotcha - ok I guess my opinion is that we close the ticket then

Comment by Daniel Moody [ 28/Jan/23 ]

just depends on the coverage we want, we only run unittests in a few builders out of all them, the unittests are less likely to behave different across distro, but maybe across platform. We do not have dynamic link for windows (and probably wont for a long time).

Comment by Alex Neben [ 28/Jan/23 ]

I misunderstood the ticket here. I guess I agree with Drew that we should just try to get dynamic linking for all unit tests. I think we already have that thought right? If so we should close this ticket. Thoughts?

Comment by Daniel Moody [ 28/Jan/23 ]

lld will not really have any affect here, regardless I think we should investigate the issues drew mentioned and estimate how much work it is to fix the existing unit tests to support this.

Comment by Alex Neben [ 28/Jan/23 ]

Now that we are using lld daniel.moody@mongodb.com can you reinvestigate this and see if it is worth doing?

Comment by Alex Neben [ 19/Sep/22 ]

This will be for evergreen rather than having a individual dev doing this

Generated at Thu Feb 08 06:14:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.