summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2015-07-24 13:57:19 -0700
committerSam Clegg <sbc@chromium.org>2015-07-24 20:59:06 +0000
commit00fa4c68718dde620f944c9482b173ebca016bc5 (patch)
treec5a5264eec7bdd9068cc48c2158c9e949756b41d
parentc5360048981afe1f38bc40949c1782e9f6b8ca4a (diff)
downloadchromium_src-00fa4c68718dde620f944c9482b173ebca016bc5.zip
chromium_src-00fa4c68718dde620f944c9482b173ebca016bc5.tar.gz
chromium_src-00fa4c68718dde620f944c9482b173ebca016bc5.tar.bz2
[NaCl SDK] sel_ldr.py: Run sel_ldr in quiet mode by default
Also, use NACLVERBOSITY=-3 rather than logging to /dev/null. This means we still see LOG_ERROR and LOG_FATAL messages such as segfault information. CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_nacl_sdk;tryserver.chromium.mac:mac_nacl_sdk;tryserver.chromium.win:win_nacl_sdk R=binji@chromium.org Review URL: https://codereview.chromium.org/1256003002 . Cr-Commit-Position: refs/heads/master@{#340332}
-rwxr-xr-xnative_client_sdk/src/tools/sel_ldr.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/native_client_sdk/src/tools/sel_ldr.py b/native_client_sdk/src/tools/sel_ldr.py
index 45dfddc..7384528 100755
--- a/native_client_sdk/src/tools/sel_ldr.py
+++ b/native_client_sdk/src/tools/sel_ldr.py
@@ -111,7 +111,18 @@ def main(argv):
cmd.append('--r_debug=0xXXXXXXXXXXXXXXXX')
cmd.append('--reserved_at_zero=0xXXXXXXXXXXXXXXXX')
- cmd += ['-a', '-B', irt]
+ # This script is provided mostly as way to run binaries during testing, not
+ # to run untrusted code in a production environment. As such we want it be
+ # as invisible as possible. So we pass -q (quiet) to disable most of output
+ # of sel_ldr itself, and -a (disable ACL) to enable local filesystem access.
+ cmd += ['-q', '-a', '-B', irt]
+
+ # Set the default NACLVERBOSITY level LOG_ERROR (-3). This can still be
+ # overridden in the environment if debug information is desired. However
+ # in most cases we don't want the application stdout/stderr polluted with
+ # sel_ldr logging.
+ if 'NACLVERBOSITY' not in os.environ and not options.verbose:
+ os.environ['NACLVERBOSITY'] = "-3"
if options.debug:
cmd.append('-g')
@@ -122,9 +133,6 @@ def main(argv):
if options.passthrough_environment:
cmd.append('-p')
- if not options.verbose:
- cmd += ['-l', os.devnull]
-
if arch == 'arm':
# Use the QEMU arm emulator if available.
qemu_bin = FindQemu()