# Ensure that the permissions of the optimized binary file comply with the # system's umask. # This test uses umask, which is Linux specific. REQUIRES: system-linux # RUN: rm -f %t # RUN: touch %t # RUN: chmod 0755 %t # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0755 # RUN: chmod 0600 %t # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0600 # RUN: chmod 0655 %t # RUN: ls -l %t | cut -f 1 -d ' ' > %t.0655 RUN: %clang %cflags %p/Inputs/hello.c -o %t.exe -Wl,-q RUN: umask 0022 RUN: llvm-bolt %t.exe -o %t1 RUN: ls -l %t1 | cut -f 1 -d ' ' | cmp - %t.0755 RUN: umask 0177 RUN: llvm-bolt %t.exe -o %t2 RUN: ls -l %t2 | cut -f 1 -d ' ' | cmp - %t.0600 RUN: umask 0122 RUN: llvm-bolt %t.exe -o %t3 RUN: ls -l %t3 | cut -f 1 -d ' ' | cmp - %t.0655