Debian Codegraph @

llvm/test/tools/llvm-dwarfutil/ELF/X86/mirror-permissions-unix.test

raw
1 ## The Unix version of this test must use umask(1) because
2 ## llvm-dwarfutil respects the umask in setting output permissions.
3 ## Setting the umask to 0 ensures deterministic permissions across
4 ## test environments.
5 # UNSUPPORTED: system-windows
6
7 # RUN: touch %t
8 # RUN: chmod 0777 %t
9 # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0777
10 # RUN: chmod 0666 %t
11 # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0666
12 # RUN: chmod 0640 %t
13 # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0640
14
15 ## Set umask to be permissive of all permissions,
16 ## only test mirroring of permissions.
17 # RUN: umask 0
18
19 # RUN: yaml2obj %s -o %t
20
21 # RUN: chmod 0777 %t
22 # RUN: llvm-dwarfutil --no-garbage-collection %t %t1
23 # RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms
24 # RUN: cmp %t1.perms %t.0777
25 # RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t %t2
26 # RUN: ls -l %t2 | cut -f 1 -d ' ' > %t2.perms
27 # RUN: cmp %t2.perms %t.0777
28
29 # RUN: chmod 0666 %t
30 # RUN: llvm-dwarfutil --no-garbage-collection %t %t1
31 # RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms
32 # RUN: cmp %t1.perms %t.0666
33 # RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t %t2
34 # RUN: ls -l %t2 | cut -f 1 -d ' ' > %t2.perms
35 # RUN: cmp %t2.perms %t.0666
36
37 # RUN: chmod 0640 %t
38 # RUN: llvm-dwarfutil --no-garbage-collection %t %t1
39 # RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms
40 # RUN: cmp %t1.perms %t.0640
41 # RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t %t2
42 # RUN: ls -l %t2 | cut -f 1 -d ' ' > %t2.perms
43 # RUN: cmp %t2.perms %t.0640
44
45 --- !ELF
46 FileHeader:
47 Class: ELFCLASS64
48 Data: ELFDATA2LSB
49 Type: ET_EXEC
50 Machine: EM_X86_64