scripts: cros_generate_breakpad_symbols: Fail more, part 1
We really don't want to ship out builds without good symbol files. If a
beta build fails to produce symbol files, we risk not being able to fix
crashes and risk shipped an unstable "stable" build.
Right now, however, we don't fail the build when we get bad symbols from
Chrome or session_manager or libc because we treat all ELFs the same,
and there are few ELF files we know never generate symbols.
This is part 1 of a three-part process to have
cros_generate_breakpad_symbols be more aggressive about failing the
build when we don't get good symbol files for files that should generate
good symbols. Here, we make an initial cut at separating out the files
that should produce good symbols from those we know will not, and we add
a grepable string that we can use to check what other files need to
moved to the latter list. In part 2, we'll add those other files into
the allowlist and then make bad symbol generation an error. In part 3,
we'll check the generated symbol files from the "expected good" list to
ensure they have all the expected sections.
BUG=b:241470012,b:270240549
TEST=Ran `cros_generate_breakpad_symbols --board=eve`, confirmed no
errors and no "unexpected failure" in output and symbol files seemed
reasonable.
Change-Id: I30add55101e479e26e4ffd5f2730b5c50a4ba880
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4307796
Reviewed-by: Gilberto Contreras <gcontreras@google.com>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
Tested-by: Ian Barkley-Yeung <iby@chromium.org>
diff --git a/scripts/upload_symbols.py b/scripts/upload_symbols.py
index 2190553..96257ed 100644
--- a/scripts/upload_symbols.py
+++ b/scripts/upload_symbols.py
@@ -160,7 +160,9 @@
"""
self.display_path = display_path
self.file_name = file_name
- self.header = cros_generate_breakpad_symbols.ReadSymsHeader(file_name)
+ self.header = cros_generate_breakpad_symbols.ReadSymsHeader(
+ file_name, file_name
+ )
self.status = SymbolFile.INITIAL
@property