envoy icon indicating copy to clipboard operation
envoy copied to clipboard

Update googletest to 1.15.2

Open asedeno opened this issue 1 year ago • 5 comments

This picks up nearly four years of changes in googletest.

googletest has updated to abseil flags^1.

The most notable difference is that unrecognized flags result in a flag parsing error, and are not returned to the user though a modified argc/argv, unless they appear after the positional argument delimiter ("--").

For example, to pass a non-Abseil flag, you would have to do ./mytest --gtest_color=false -- --myflag=myvalue

After this upgrade, to set Envoy's CLI arguments in tests requires passing them after --. For example,

bazel test //test/common/common:logger_test --test_arg="--" --test_arg="-l trace"

Per googletest documentation^2, it is strongly recommended that death tests have names ending in DeathTest rather than simply Test.

Some death tests behave better when run in a threadsafe manner^3. This is a trade-off that costs speed. The flag has been set in tests where it made a difference.

When building with bazel and abseil, googletest uses re2^4. The switch to re2 means that . does not match newline by default. This prefixes regex that need it with (?s) to change that behavior^5.

Risk Level: low — test only Testing: Updates

asedeno avatar Oct 18 '24 19:10 asedeno

As a reminder, PRs marked as draft will not be automatically assigned reviewers, or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/36699 was opened by asedeno.

see: more, trace.

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch). envoyproxy/dependency-shepherds assignee is @mattklein123

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/36699 was opened by asedeno.

see: more, trace.

cc: @phlax @adisuissa @yanavlasov x-ref #33219

asedeno avatar Oct 18 '24 19:10 asedeno

Fun. Coverage tests are failing because the disk is full. From df-post:

Filesystem      Size  Used Avail Use% Mounted on                                                                                     
/dev/root        73G   73G   16M 100% /                                                                                                            
tmpfs           7.9G  172K  7.9G   1% /dev/shm                                                                                                     
tmpfs           3.2G  1.1M  3.2G   1% /run                                                                                                         
tmpfs           5.0M     0  5.0M   0% /run/lock                                                                                                    
/dev/sdb15      105M  6.1M   99M   6% /boot/efi                                                                                                    
/dev/sda1        74G  4.1G   66G   6% /mnt                                                                                                         
tmpfs           1.6G   12K  1.6G   1% /run/user/1001                                                                                               

asedeno avatar Oct 19 '24 03:10 asedeno

clang and gcc are being killed building some targets. We can iterate and keep bumping up the rbe_pools for targets one by one, but I don't like it.

asedeno avatar Oct 19 '24 14:10 asedeno

Fun. Coverage tests are failing because the disk is full

hmm - i added the diskspace-hack (ie delete some of the default installed cruft before running) so i would have hoped this didnt happen - lmc again ...

clang and gcc are being killed building some targets. We can iterate and keep bumping up the rbe_pools for targets one by one, but I don't like it.

i have some tooling to identify which jobs need more mem by profiling a complete run with everything running on max mem workers, but tbh, with most of the problematic tasks already identified, doing what you are doing is probably more reliable and less time consuming

phlax avatar Oct 21 '24 11:10 phlax

so diskspace hack is running and frees up a fair amount of space but evidently not enough

Disk space before cruft removal
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        73G   58G   16G  80% /
tmpfs           7.9G  172K  7.9G   1% /dev/shm
tmpfs           3.2G  1.1M  3.2G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda15      105M  6.1M   99M   6% /boot/efi
/dev/sdb1        74G  4.1G   66G   6% /mnt
tmpfs           1.6G   12K  1.6G   1% /run/user/1001
Removing: /opt/hostedtoolcache ...
Removing: /usr/local/lib/android ...
Removing: /usr/local/.ghcup ...
Disk after cruft removal
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        73G   36G   37G  50% /
tmpfs           7.9G  172K  7.9G   1% /dev/shm
tmpfs           3.2G  1.1M  3.2G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda15      105M  6.1M   99M   6% /boot/efi
/dev/sdb1        74G  4.1G   66G   6% /mnt
tmpfs           1.6G   12K  1.6G   1% /run/user/1001

i guess we just need to rm -rf even more paths to free space - i can raise a PR for that now

phlax avatar Oct 21 '24 11:10 phlax

In the last Mobile/ASAN run, //test/common:internal_engine_test failed to compile and it's already set to run on 4core.

asedeno avatar Oct 22 '24 03:10 asedeno

Still OOMing. Waiting on further resources.

asedeno avatar Nov 11 '24 20:11 asedeno

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

github-actions[bot] avatar Dec 15 '24 20:12 github-actions[bot]

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

github-actions[bot] avatar Dec 23 '24 00:12 github-actions[bot]