Skip to content

[sanitizer] Use /tmp/ not /tmp/dir/ in tests #117759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

jdenny-ornl
Copy link
Collaborator

Tests fail if the user doesn't own /tmp/dir/. On hosts with multiple users running the test suite, who owns /tmp/dir/ can become a race.

Tests fail if the user doesn't own /tmp/dir/.  On hosts with multiple
users running the test suite, who owns /tmp/dir/ can become a race.
@llvmbot
Copy link
Member

llvmbot commented Nov 26, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Joel E. Denny (jdenny-ornl)

Changes

Tests fail if the user doesn't own /tmp/dir/. On hosts with multiple users running the test suite, who owns /tmp/dir/ can become a race.


Full diff: https://github.com/llvm/llvm-project/pull/117759.diff

1 Files Affected:

  • (modified) compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp (+1-1)
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp
index 7afa5e43795bcf..97337ef13e6f41 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_libc_test.cpp
@@ -346,7 +346,7 @@ TEST(SanitizerCommon, ReportFile) {
   ReportFile report_file = {&report_file_mu, kStderrFd, "", "", 0};
   char tmpfile[128];
   temp_file_name(tmpfile, sizeof(tmpfile),
-                 "dir/sanitizer_common.reportfile.tmp.");
+                 "sanitizer_common.reportfile.tmp.");
   report_file.SetReportPath(tmpfile);
   const char *path = report_file.GetReportPath();
   EXPECT_EQ(internal_strncmp(tmpfile, path, strlen(tmpfile)), 0);

Copy link

github-actions bot commented Nov 26, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@vitalybuka vitalybuka merged commit 81349b8 into llvm:main Nov 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants