[ 
https://issues.apache.org/jira/browse/IMPALA-14540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048597#comment-18048597
 ] 

ASF subversion and git services commented on IMPALA-14540:
----------------------------------------------------------

Commit 25aa95a98d79b15aa2ae82b4ab001bc2d2766fad in impala's branch 
refs/heads/master from Joe McDonnell
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=25aa95a98 ]

IMPALA-14540: Fix dump_breakpad_symbols.py's -b option and add tests

When dump_breakpad_symbols.py switched to Python 3, the -b
option, which specifies a build directory, broke due to
Python 3's distinction between bytes and strings. This impacts
the bin/jenkins/finalize.sh script that runs at the end of
Jenkins jobs.

This fixes the -b option and adds tests for basic scenarios
for dump_breakpad_symbols.py. Specifically, it tests positive
scenarios for -b (build directory), -f (specific binary), and
-i (list provided via stdin). This adds additional validation
of dump_breakpad_symbols.py's inputs (e.g. verifying that the
file/directory exists, etc) and adds negative test cases for
that validation.

Testing:
 - Ran new pytests locally

Change-Id: I8596e994b9d15be33d99e91ecc38f87c22545a08
Reviewed-on: http://gerrit.cloudera.org:8080/23688
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Michael Smith <[email protected]>


> bin/dump_breakpad_symbols.py fails on Python 3 with -b option
> -------------------------------------------------------------
>
>                 Key: IMPALA-14540
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14540
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Infrastructure
>    Affects Versions: Impala 5.0.0
>            Reporter: Joe McDonnell
>            Priority: Major
>             Fix For: Impala 5.0.0
>
>
> When bin/dump_breakpad_symbols.py switched to Python 3, the -b option started 
> failing with this error:
> {noformat}
>  File "bin/dump_breakpad_symbols.py", line 271, in <genexpr>
>     return (BinarySymbolInfo(f, None) for f in find_elf_files(args.build_dir))
>   File "bin/dump_breakpad_symbols.py", line 186, in <genexpr>
>     return (f for f in walk_path(path) if is_elf_file(f))
>   File "bin/dump_breakpad_symbols.py", line 181, in is_elf_file
>     return is_regular_file(path) and 'ELF' in magic.from_file(path)
> TypeError: a bytes-like object is required, not 'str'
> {noformat}
> We should fix this and have tests for this script.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to