[PATCH] D51648: [UBSan] Partially fix `test/ubsan/TestCases/Misc/log-path_test.cc` so that it can run on devices.
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 06:38:52 PDT 2018
delcypher added inline comments.
================
Comment at: test/lit.common.cfg:112
+ lit_config.warning('%device_rm is not implemented')
+ config.substitutions.append( ('%device_rm', 'echo ') )
config.compile_wrapper = ""
----------------
filcab wrote:
> Unsure if this is the best option, but it's ok for now. When I merge this to our tree I might post a patch to omit the warning on platforms that use "emulator" configs but don't need the device_rm.
Sounds good to me.
================
Comment at: test/sanitizer_common/ios_commands/iossim_run.py:21
+ rm_args = []
+ for arg in sys.argv[2:]:
+ if '*' in arg or '?' in arg:
----------------
george.karpenkov wrote:
> @dliew actually, stepping back a bit here, why can't we just do
>
> ```
> subprocess.call(sys.argv[1:])
> ```
>
> ?
>
> whatever shell expansions are there, they would be already expanded by the shell at that point.
One possible reason not to do as you suggest is because file names might contain spaces which we couldn't pass to the shell verbatim without quoting. We also can't quote everything because we need to expand the shell globs. By design `%device_rm` takes shell glob patterns and is charge of expanding them for a device rather than relying on lit's underlying shell.
Repository:
rL LLVM
https://reviews.llvm.org/D51648
More information about the llvm-commits
mailing list