51 lines · plain
1## The Unix version of this test must use umask(1) because2## llvm-dwarfutil respects the umask in setting output permissions.3## Setting the umask to 0 ensures deterministic permissions across4## test environments.5# UNSUPPORTED: system-windows6 7# RUN: touch %t8# RUN: chmod 0777 %t9# RUN: ls -l %t | cut -f 1 -d ' ' > %t.077710# RUN: chmod 0666 %t11# RUN: ls -l %t | cut -f 1 -d ' ' > %t.066612# RUN: chmod 0640 %t13# RUN: ls -l %t | cut -f 1 -d ' ' > %t.064014 15## Set umask to be permissive of all permissions,16## only test mirroring of permissions.17# RUN: umask 018 19# RUN: yaml2obj %s -o %t20 21# RUN: chmod 0777 %t22# RUN: llvm-dwarfutil --no-garbage-collection %t %t123# RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms24# RUN: cmp %t1.perms %t.077725# RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t %t226# RUN: ls -l %t2 | cut -f 1 -d ' ' > %t2.perms27# RUN: cmp %t2.perms %t.077728 29# RUN: chmod 0666 %t30# RUN: llvm-dwarfutil --no-garbage-collection %t %t131# RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms32# RUN: cmp %t1.perms %t.066633# RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t %t234# RUN: ls -l %t2 | cut -f 1 -d ' ' > %t2.perms35# RUN: cmp %t2.perms %t.066636 37# RUN: chmod 0640 %t38# RUN: llvm-dwarfutil --no-garbage-collection %t %t139# RUN: ls -l %t1 | cut -f 1 -d ' ' > %t1.perms40# RUN: cmp %t1.perms %t.064041# RUN: llvm-dwarfutil --garbage-collection --separate-debug-file %t %t242# RUN: ls -l %t2 | cut -f 1 -d ' ' > %t2.perms43# RUN: cmp %t2.perms %t.064044 45--- !ELF46FileHeader:47 Class: ELFCLASS6448 Data: ELFDATA2LSB49 Type: ET_EXEC50 Machine: EM_X86_6451