[all-commits] [llvm/llvm-project] a831c3: [lld][test] Fix file cleanup in aarch64-build-attr...
David Spickett via All-commits
all-commits at lists.llvm.org
Fri Oct 31 04:32:58 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a831c3fda76366ad8f1de502c05ee3ac719e0a83
https://github.com/llvm/llvm-project/commit/a831c3fda76366ad8f1de502c05ee3ac719e0a83
Author: David Spickett <david.spickett at linaro.org>
Date: 2025-10-31 (Fri, 31 Oct 2025)
Changed paths:
M lld/test/ELF/aarch64-build-attributes.s
Log Message:
-----------
[lld][test] Fix file cleanup in aarch64-build-attributes.s (#164396)
This test seems to have taken the lit documentation at its word:
https://llvm.org/docs/CommandGuide/lit.html#substitutions
"%t temporary file name unique to the test"
%t is in fact the **path** of a file. As suggested by the line below
that describing %basename_t.
This test (I assume) assumed it was just the filename itself and so left
a layout of:
```
$ tree tools/lld/test/
tools/lld/test/
├── CMakeFiles
├── ELF
│ └── Output
│ ├── aarch64-build-attributes.s.tmp
│ │ ├── pauth-bti-gcs.s
│ │ └── pauth-bti-pac.s
│ ├── aarch64-build-attributes.s.tmp.merged.o
│ ├── aarch64-build-attributes.s.tmp1.o
│ ├── aarch64-build-attributes.s.tmp2.o
│ └── aarch64-build-attributes.s.tmp3.o
├── Unit
│ └── lit.site.cfg.py
├── cmake_install.cmake
└── lit.site.cfg.py
```
Note how the 2 .s files are in the temp dir but the .o files are not.
This is fine, it works, but it's going to cost someone time to unpick
when this test actually does fail.
To fix this, remove %t from all the temp file names so they are created
in the temp dir, which is cleaned before each run.
New layout:
```
$ tree tools/lld/test/
tools/lld/test/
├── CMakeFiles
├── ELF
│ └── Output
│ └── aarch64-build-attributes.s.tmp
│ ├── 1.o
│ ├── 2.o
│ ├── 3.o
│ ├── merged.o
│ ├── pauth-bti-gcs.s
│ └── pauth-bti-pac.s
├── Unit
│ └── lit.site.cfg.py
├── cmake_install.cmake
└── lit.site.cfg.py
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list