[compiler-rt] 7f32ddc - [MemProf] Reenable test with fix for bot failures

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 09:00:24 PST 2020


Author: Teresa Johnson
Date: 2020-11-02T09:00:04-08:00
New Revision: 7f32ddc99b30fbd79a7b2ee2ddccdf3810c9f9a6

URL: https://github.com/llvm/llvm-project/commit/7f32ddc99b30fbd79a7b2ee2ddccdf3810c9f9a6
DIFF: https://github.com/llvm/llvm-project/commit/7f32ddc99b30fbd79a7b2ee2ddccdf3810c9f9a6.diff

LOG: [MemProf] Reenable test with fix for bot failures

The issue was unexpected macro expansion when the bot's test output
directory contained a token matching a build system macro (e.g.
"linux"). Switch to using a hardcoded path, which is invalid but is
sufficient for ensuring that the path is passed down to the runtime.

Differential Revision: https://reviews.llvm.org/D90466

Added: 
    

Modified: 
    compiler-rt/test/memprof/TestCases/log_path_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/memprof/TestCases/log_path_test.cpp b/compiler-rt/test/memprof/TestCases/log_path_test.cpp
index 298c182be0c8..44fa3781e879 100644
--- a/compiler-rt/test/memprof/TestCases/log_path_test.cpp
+++ b/compiler-rt/test/memprof/TestCases/log_path_test.cpp
@@ -19,11 +19,13 @@
 // RUN:   not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LONG --dump-input=always
 
 // Specifying the log name via the __memprof_profile_filename variable.
-// Temporarily disable until bot failures fixed
-// %clangxx_memprof  %s -o %t -DPROFILE_NAME_VAR="%t.log2"
-// rm -f %t.log2.*
-// %run %t
-// FileCheck %s --check-prefix=CHECK-GOOD --dump-input=always < %t.log2.*
+// Note we use an invalid path since that is sufficient for checking that the
+// specified __memprof_profile_filename value is passed through to the runtime.
+// Using an automatically generated name via %t can cause weird issues with
+// unexpected macro expansion if the path includes tokens that match a build
+// system macro (e.g. "linux").
+// RUN: %clangxx_memprof  %s -o %t -DPROFILE_NAME_VAR="/dev/null/INVALID"
+// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-INVALID --dump-input=always
 
 #ifdef PROFILE_NAME_VAR
 #define xstr(s) str(s)


        


More information about the llvm-commits mailing list