Files
clang-p2996/llvm/test/tools/llvm-ar/error-opening-permission.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

16 lines
504 B
Plaintext

## Unsupported on windows as marking files "unreadable"
## is non-trivial on windows.
# UNSUPPORTED: system-windows
# REQUIRES: non-root-user
# RUN: rm -rf %t && mkdir -p %t
# RUN: echo file1 > %t/1.txt
## No Permission:
# RUN: llvm-ar rc %t/permission.b %t/1.txt
# RUN: chmod 100 %t/permission.b
# RUN: not llvm-ar p %t/permission.b 2>&1 | \
# RUN: FileCheck %s --check-prefix=NO-PERMISSION -DARCHIVE=%t/permission.b -DMSG=%errc_EACCES
# NO-PERMISSION: error: unable to open '[[ARCHIVE]]': [[MSG]]