From 91b62e0e8fd1788c1964403ed34160c47190aad0 Mon Sep 17 00:00:00 2001 From: Jeremy Leconte Date: Mon, 19 Dec 2022 13:47:27 +0100 Subject: [PATCH] Remove global gtest_parallel timeout. It is causing flakiness on win asan bots rtc_unittests. The gtest_parallel timeout is set to 15 minutes but there is already a swarming timeout set to one hour. https://luci-analysis.appspot.com/p/webrtc/clusters/testname-v3/218550890147469e975d34b17d4c6545#recent-failures https://luci-analysis.appspot.com/p/webrtc/clusters/testname-v3/968d49e7d00955cc65fa84dfa54b7c2a#recent-failures There is a comment stating that it's useful because it gets information when the swarming timeout is reached but: * swarming timeouts are more likely to occur on device phone before impacting desktop bots. * if a swarming timeout occurs, isolating which tests take too long shouldn't be too hard. Change-Id: I2089918e8cd266510d58bac8c91d92b6c8e81728 Bug: webrtc:14790 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288384 Reviewed-by: Mirko Bonadei Commit-Queue: Jeremy Leconte Cr-Commit-Position: refs/heads/main@{#38918} --- tools_webrtc/mb/mb.py | 6 ---- tools_webrtc/mb/mb_unittest.py | 54 ---------------------------------- 2 files changed, 60 deletions(-) diff --git a/tools_webrtc/mb/mb.py b/tools_webrtc/mb/mb.py index 762df9a05c..c23e69c09f 100755 --- a/tools_webrtc/mb/mb.py +++ b/tools_webrtc/mb/mb.py @@ -119,16 +119,10 @@ class WebRTCMetaBuildWrapper(mb.MetaBuildWrapper): '../../tools_webrtc/gtest-parallel-wrapper.py', ] output_dir = '${ISOLATED_OUTDIR}/test_logs' - timeout = isolate_map[target].get('timeout', 900) cmdline += [ '../../tools_webrtc/gtest-parallel-wrapper.py', '--output_dir=%s' % output_dir, '--gtest_color=no', - # We tell gtest-parallel to interrupt the test after 900 - # seconds, so it can exit cleanly and report results, - # instead of being interrupted by swarming and not - # reporting anything. - '--timeout=%s' % timeout, ] if test_type == 'non_parallel_console_test_launcher': # Still use the gtest-parallel-wrapper.py script since we diff --git a/tools_webrtc/mb/mb_unittest.py b/tools_webrtc/mb/mb_unittest.py index 40c12eda17..583fefd87e 100755 --- a/tools_webrtc/mb/mb_unittest.py +++ b/tools_webrtc/mb/mb_unittest.py @@ -381,55 +381,6 @@ class UnitTest(unittest.TestCase): '--store-tombstones', ]) - def test_gen_timeout(self): - test_files = { - '/tmp/swarming_targets': - 'foo_unittests\n', - '/fake_src/testing/buildbot/gn_isolate_map.pyl': - ("{'foo_unittests': {" - " 'label': '//foo:foo_unittests'," - " 'type': 'non_parallel_console_test_launcher'," - " 'timeout': 500," - "}}\n"), - '/fake_src/out/Default/foo_unittests.runtime_deps': ("foo_unittests\n"), - } - mbw = self.check([ - 'gen', '-c', 'debug_goma', '//out/Default', '--swarming-targets-file', - '/tmp/swarming_targets', '--isolate-map-file', - '/fake_src/testing/buildbot/gn_isolate_map.pyl' - ], - files=test_files, - ret=0) - - isolate_file = mbw.files['/fake_src/out/Default/foo_unittests.isolate'] - isolate_file_contents = ast.literal_eval(isolate_file) - files = isolate_file_contents['variables']['files'] - command = isolate_file_contents['variables']['command'] - - self.assertEqual(files, [ - '../../.vpython3', - '../../testing/test_env.py', - '../../third_party/gtest-parallel/gtest-parallel', - '../../third_party/gtest-parallel/gtest_parallel.py', - '../../tools_webrtc/gtest-parallel-wrapper.py', - 'foo_unittests', - ]) - self.assertEqual(command, [ - 'vpython3', - '../../testing/test_env.py', - '../../tools_webrtc/gtest-parallel-wrapper.py', - '--output_dir=${ISOLATED_OUTDIR}/test_logs', - '--gtest_color=no', - '--timeout=500', - '--workers=1', - '--retry_failed=3', - './foo_unittests', - '--asan=0', - '--lsan=0', - '--msan=0', - '--tsan=0', - ]) - def test_gen_script(self): test_files = { '/tmp/swarming_targets': @@ -538,7 +489,6 @@ class UnitTest(unittest.TestCase): '../../tools_webrtc/gtest-parallel-wrapper.py', '--output_dir=${ISOLATED_OUTDIR}/test_logs', '--gtest_color=no', - '--timeout=900', '--workers=1', '--retry_failed=3', './foo_unittests', @@ -590,7 +540,6 @@ class UnitTest(unittest.TestCase): '../../tools_webrtc/gtest-parallel-wrapper.py', '--output_dir=${ISOLATED_OUTDIR}/test_logs', '--gtest_color=no', - '--timeout=900', '--retry_failed=3', './foo_unittests', '--asan=0', @@ -642,7 +591,6 @@ class UnitTest(unittest.TestCase): '../../tools_webrtc/gtest-parallel-wrapper.py', '--output_dir=${ISOLATED_OUTDIR}/test_logs', '--gtest_color=no', - '--timeout=900', '--retry_failed=3', r'.\unittests.exe', '--asan=0', @@ -689,7 +637,6 @@ class UnitTest(unittest.TestCase): '../../tools_webrtc/gtest-parallel-wrapper.py', '--output_dir=${ISOLATED_OUTDIR}/test_logs', '--gtest_color=no', - '--timeout=900', '--retry_failed=3', './foo_unittests', '--asan=0', @@ -743,7 +690,6 @@ class UnitTest(unittest.TestCase): '../../tools_webrtc/gtest-parallel-wrapper.py', '--output_dir=${ISOLATED_OUTDIR}/test_logs', '--gtest_color=no', - '--timeout=900', '--retry_failed=3', './foo_unittests', '--asan=0',