[libcxx-commits] [PATCH] D69170: [libcxx] [test] Run `chmod +x` on executables when testing via SSH

Sergej Jaskiewicz via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 18 11:16:38 PDT 2019


broadwaylamb marked 2 inline comments as done.
broadwaylamb added inline comments.


================
Comment at: libcxx/utils/libcxx/test/executor.py:162
+
+            # When testing executables that were cross-compiled on Windows for
+            # Linux, we may need to explicitly set the execution permission to
----------------
ldionne wrote:
> Do I understand correctly: the problem is that files are created on Windows and then `scp`'d to Linux, but there is no executable bit set on Windows so the files arrive on Linux as not executable?
Yes, exactly.


================
Comment at: libcxx/utils/libcxx/test/executor.py:165
+            # avoid the 'Permission denied' error:
+            chmod_cmd = ['chmod', '+x', target_exe_path]
+
----------------
ldionne wrote:
> You're assuming that we have `chmod` on the system, but what if we're instead remotely executing binaries compiled on Linux for Windows (not sure that's even a thing, but you get the point)?
In D68275 I made `Executor` depend on the target info object, so we can ask if the target system is not Windows, and only then set the executable bit.

But if there are better solutions, I'm ready to investigate them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69170/new/

https://reviews.llvm.org/D69170





More information about the libcxx-commits mailing list