[all-commits] [llvm/llvm-project] a05874: [sanitizer_common][test] Remove second SanitizerCo...
Rainer Orth via All-commits
all-commits at lists.llvm.org
Tue Feb 11 00:02:27 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a0587414cbb1520cfd7e886de1d18c408539ac9f
https://github.com/llvm/llvm-project/commit/a0587414cbb1520cfd7e886de1d18c408539ac9f
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2025-02-11 (Tue, 11 Feb 2025)
Changed paths:
M compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp
Log Message:
-----------
[sanitizer_common][test] Remove second SanitizerCommon.ReportFile tem… (#126509)
…p file
The `SanitizerCommon.ReportFile` test leaves a temp file behind on every
run. While this is not a problem for manual builds, on buildbots those
files accumulate over time, interfering with other bots on the same
system.
The files in question are named like
`sanitizer_common.reportfile.tmp.XXXXXX.<pid>`. The issue can be seen in
Solaris `truss` output:
```
22633: fstatat64(AT_FDCWD, "/tmp/sanitizer_common.reportfile.tmp.rzVEja", 0xFEFFBAD0, AT_SYMLINK_NOFOLLOW) Err#2 ENOENT
22633: openat64(AT_FDCWD, "/tmp/sanitizer_common.reportfile.tmp.rzVEja", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
22633: openat64(AT_FDCWD, "/tmp/sanitizer_common.reportfile.tmp.rzVEja.22633", O_WRONLY|O_CREAT|O_TRUNC, 0660) = 4
22633: unlinkat(AT_FDCWD, "/tmp/sanitizer_common.reportfile.tmp.rzVEja", 0) = 0
```
The first temp file, created by `temp_file_name`, is removed at the end
of the test, the second one, created in `ReportFile::GetReportPath`
using `OpenFile`, is not.
This patch fixes this, simply removing the file.
Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.
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