Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd a script to CI to check dynamic symbols in Android binary #8351 #9981
Conversation
| @@ -0,0 +1,12 @@ | |||
| #!/bin/bash | |||
|
|
|||
| ACTUAL_SYMBOLS=$(arm-linux-androideabi-objdump -T target/arm-linux-androideabi/debug/libservo.so | grep "D " | grep "UND" | awk '{ print $NF; }' | tr '\n' ';') | |||
This comment has been minimized.
This comment has been minimized.
cengizIO
Mar 14, 2016
Author
Contributor
I'm not sure about the path of arm-linux-androideabi-objdump tool
This comment has been minimized.
This comment has been minimized.
cengizIO
Mar 14, 2016
Author
Contributor
According to buildbot/master/master.cfg#L219, libservo.so is built in debug mode, with default mach target path.
|
I would much rather see this written in python. |
|
@Ms2ger actually I just tried to follow the pattern in But if you think python is more maintainable, I can convert it. |
|
To make this more robust, we should be agnostic as to the order of the symbols, i.e. for bash adding a call to |
|
@Ms2ger @aneeshusa I've converted it to a python script which is sort order agnostic and much more readable. |
|
@larsbergstrom This doesn't have an assignee at the moment. |
| #/usr/bin/env python | ||
|
|
||
| import sys, re, subprocess | ||
| from sets import Set |
This comment has been minimized.
This comment has been minimized.
aneeshusa
Mar 17, 2016
Member
Sets are built-in since Python 2.6 and you don't need to import them; the sets module isn't even available in Python 3. See https://docs.python.org/2/library/stdtypes.html#set and https://docs.python.org/3/library/stdtypes.html#set.
This comment has been minimized.
This comment has been minimized.
aneeshusa
Mar 17, 2016
Member
Also, I think a frozenset would be appropriate for the allowed_symbols variable.
| if m != None: | ||
| actual_symbols.add(m.group(2)) | ||
|
|
||
| difference = allowed_symbols.difference(actual_symbols) |
This comment has been minimized.
This comment has been minimized.
aneeshusa
Mar 17, 2016
Member
I believe we need to do actual_symbols.difference(allowed_symbols), which can written with syntax sugar as actual_symbols - allowed_symbols. This will take the actual symbols and remove the symbols we know are OK, leaving the symbols that are not OK.
|
@aneeshusa Thanks for handling the python parts of the review! I would also add that there is some output from our
@cengizIO I apologize for not shepherding this review! I didn't notice that it was not assigned and will make sure that sort of thing doesn't slip through the cracks again. Thanks also for your patience in rewriting what was originally supposed to be a cheesy shell script into a much more robust python script. |
|
@aneeshusa and @larsbergstrom thanks for the feedback! Please check latest revision. This is probably my 3rd python script ever. And I didn't know about |
|
@bors-servo r+ |
|
|
Add a script to CI to check dynamic symbols in Android binary #8351 Tries to fix #8351. This is meaningful only with the PR to servo/saltfs Cross PR: servo/saltfs#249 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9981) <!-- Reviewable:end -->
|
|
Call a new script to check dynamic symbols in Android binary #8351 Tries to fix #8351. This is meaningful only with the PR to servo/servo Cross PR: servo/servo#9981 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/249) <!-- Reviewable:end -->
cengizIO commentedMar 14, 2016
Tries to fix #8351.
This is meaningful only with the PR to servo/saltfs
Cross PR: servo/saltfs#249
This change is