[InstCombine] Remove insertRangeTest code that handles the equality case.
[llvm-complete.git] / test / tools / llvm-objcopy / ELF / mirror-permissions-unix.test
blobce6e79b1f2bca74dfb40b8cb47d94e7ab6fac43c
1 ## Test that permissions for ouput files are mirrored
2 ## from their input files.
4 ## The Unix version of this test must use umask(1) because
5 ## llvm-objcopy respects the umask in setting output permissions.
6 ## Setting the umask to 0 ensures deterministic permissions across
7 ## test environments.
8 # UNSUPPORTED: system-windows
10 # RUN: touch %t
11 # RUN: chmod 0777 %t
12 # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0777
13 # RUN: chmod 0666 %t
14 # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0666
15 # RUN: chmod 0640 %t
16 # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0640
18 ## Set umask to be permissive of all permissions,
19 ## only test mirroring of permissions.
20 # RUN: umask 0
22 # RUN: yaml2obj %s -o %t
24 # RUN: chmod 0777 %t
25 # RUN: llvm-objcopy %t %t1
26 # RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms
27 # RUN: cmp %t1.perms %t.0777
29 # RUN: chmod 0666 %t
30 # RUN: llvm-objcopy %t %t1
31 # RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms
32 # RUN: cmp %t1.perms %t.0666
34 # RUN: chmod 0640 %t
35 # RUN: llvm-objcopy %t %t1
36 # RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms
37 # RUN: cmp %t1.perms %t.0640
39 ## Don't set the permission of a character special file, otherwise there will
40 ## be an EPERM error (or worse: root may change the permission).
41 # RUN: ls -l /dev/null | cut -f 1 -d ' ' > %tnull.perms
42 # RUN: llvm-objcopy %t /dev/null
43 # RUN: ls -l /dev/null | cut -f 1 -d ' ' | diff - %tnull.perms
45 --- !ELF
46 FileHeader:
47   Class:   ELFCLASS64
48   Data:    ELFDATA2LSB
49   Type:    ET_EXEC
50   Machine: EM_X86_64