xref: /llvm-project/llvm/test/tools/llvm-ifs/fail-file-write.test (revision 05216544a34eaf7aabf45df5f64d1c6c3e4e06c6)
1## Test failing to write output file on non-windows platforms.
2
3# UNSUPPORTED: system-windows
4# REQUIRES: non-root-user
5# RUN: rm -rf %t.TestDir
6# RUN: mkdir %t.TestDir
7# RUN: touch %t.TestDir/Output.TestFile
8# RUN: chmod 400 %t.TestDir
9# RUN: not llvm-ifs --output-elf=%t.TestDir/Output.TestFile %s 2>&1 | FileCheck -DMSG=%errc_EACCES %s --check-prefix=ERR
10# RUN: chmod 777 %t.TestDir
11# RUN: rm -rf %t.TestDir
12
13--- !ifs-v1
14IfsVersion: 3.0
15Target: { ObjectFormat: ELF, Arch: AArch64, Endianness: little, BitWidth: 64 }
16Symbols: []
17...
18
19# ERR: [[MSG]] when trying to open `{{.*}}.TestDir/Output.TestFile` for writing
20