From: Bob Haarman Date: Fri, 26 Jul 2019 18:44:06 +0000 (+0000) Subject: add 'a' to chmod in llvm-lipo executability tests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bf57b9730b3bc95165ff7061a5618c8afd48adb;p=llvm add 'a' to chmod in llvm-lipo executability tests Summary: When specifying symbolic permissions with + or -, if none of a/u/g/o are specified, bits set in the umask are not affected. This caused the llvm-lipo executability tests to fail on some systems, e.g. having an umask of 027 would cause chmod -x to not clear the executable bit for others. This change instead uses chmod a-x, which clears all the executable bits regardless of umask. Reviewers: smeenai, hans, anushabasana Reviewed By: smeenai Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65342 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367142 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/tools/llvm-lipo/create-executable.test b/test/tools/llvm-lipo/create-executable.test index 19b3bfef3d4..43e29a71e84 100644 --- a/test/tools/llvm-lipo/create-executable.test +++ b/test/tools/llvm-lipo/create-executable.test @@ -3,11 +3,11 @@ # RUN: yaml2obj %p/Inputs/i386-slice.yaml > %t-i386.o # RUN: yaml2obj %p/Inputs/x86_64-slice.yaml > %t-x86_64.o -# RUN: chmod -x %t-i386.o -# RUN: chmod -x %t-x86_64.o +# RUN: chmod a-x %t-i386.o +# RUN: chmod a-x %t-x86_64.o # RUN: llvm-lipo %t-i386.o %t-x86_64.o -create -output %t-universal.o # RUN: test ! -x %t-universal.o -# RUN: chmod +x %t-i386.o +# RUN: chmod a+x %t-i386.o # RUN: llvm-lipo %t-i386.o %t-x86_64.o -create -output %t-universal.o # RUN: test -x %t-universal.o diff --git a/test/tools/llvm-lipo/thin-executable-universal-binary.test b/test/tools/llvm-lipo/thin-executable-universal-binary.test index 3992373d9e4..20dd1dbc2be 100644 --- a/test/tools/llvm-lipo/thin-executable-universal-binary.test +++ b/test/tools/llvm-lipo/thin-executable-universal-binary.test @@ -2,11 +2,11 @@ # UNSUPPORTED: system-windows # RUN: yaml2obj %s > %t-universal.o -# RUN: chmod -x %t-universal.o +# RUN: chmod a-x %t-universal.o # RUN: llvm-lipo %t-universal.o -thin i386 -output %t32.o # RUN: test ! -x %t32.o -# RUN: chmod +x %t-universal.o +# RUN: chmod a+x %t-universal.o # RUN: llvm-lipo %t-universal.o -thin i386 -output %t32-ex.o # RUN: test -x %t32-ex.o