[PATCH] D51648: [UBSan] Partially fix `test/ubsan/TestCases/Misc/log-path_test.cc` so that it can run on devices.

Filipe Cabecinhas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 5 06:45:22 PDT 2018


filcab added a comment.

I don't think this is acceptable.
We have no guarantees we even have a shell on the devices. The run script might be doing all sort of things for commands to run on the device.

Our approach has usually been to translate paths between host and device on our run script (or, in some tests, to add some code for our platform only). This is ok for us, but not everyone has the ability to have the host filesystem available.

If we *really* need something like this (what's going on when calling cat later? How do the files show up on the host?), maybe a %run_rm (or %device_rm, or whatever) would be better. Then platforms can do what they want and, if iossim_run and android_run can handle the rm command, they can add a substitution %device_rm -> %run rm.

Thank you,
Filipe



================
Comment at: test/ubsan/TestCases/Misc/log-path_test.cc:15
 // RUN: rm -f %t.log.*
+// RUN: %run rm -f '%t.log.*'
 // RUN: %env_ubsan_opts=log_path='"%t.log"' %run %t -4 2> %t.out
----------------
The device might not have a shell. And might be unable to run an rm command even if it has a shell.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D51648





More information about the llvm-commits mailing list