[PATCH] D65342: add 'a' to chmod in llvm-lipo executability tests

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 11:40:07 PDT 2019


inglorion created this revision.
inglorion added reviewers: smeenai, hans.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65342

Files:
  llvm/test/tools/llvm-lipo/create-executable.test
  llvm/test/tools/llvm-lipo/thin-executable-universal-binary.test


Index: llvm/test/tools/llvm-lipo/thin-executable-universal-binary.test
===================================================================
--- llvm/test/tools/llvm-lipo/thin-executable-universal-binary.test
+++ llvm/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
 
Index: llvm/test/tools/llvm-lipo/create-executable.test
===================================================================
--- llvm/test/tools/llvm-lipo/create-executable.test
+++ llvm/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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65342.211974.patch
Type: text/x-patch
Size: 1410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190726/346b850a/attachment.bin>


More information about the llvm-commits mailing list