llvm-project/llvm/test/tools/llvm-ifs/fail-file-write.test
Tom Stellard 05216544a3
[llvm] Add support for running tests as root (#75285)
There are a few test that check access permissions, so they need to be
disabled when running the tests as root.

The most common use case for running tests as root is inside of a
container. GitHub Actions, for example, only supports running the root
user inside of containers, so this change is necessary in order to run
the tests inside of a container running in the GitHub Actions
environment.
2024-01-04 11:25:09 -08:00

20 lines
616 B
Plaintext

## Test failing to write output file on non-windows platforms.
# UNSUPPORTED: system-windows
# REQUIRES: non-root-user
# RUN: rm -rf %t.TestDir
# RUN: mkdir %t.TestDir
# RUN: touch %t.TestDir/Output.TestFile
# RUN: chmod 400 %t.TestDir
# RUN: not llvm-ifs --output-elf=%t.TestDir/Output.TestFile %s 2>&1 | FileCheck -DMSG=%errc_EACCES %s --check-prefix=ERR
# RUN: chmod 777 %t.TestDir
# RUN: rm -rf %t.TestDir
--- !ifs-v1
IfsVersion: 3.0
Target: { ObjectFormat: ELF, Arch: AArch64, Endianness: little, BitWidth: 64 }
Symbols: []
...
# ERR: [[MSG]] when trying to open `{{.*}}.TestDir/Output.TestFile` for writing