[PATCH] D32259: [XRay] [compiler-rt] - Fix standalone and non-deterministic test issue

Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 19 23:12:13 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL300822: [XRay] [compiler-rt] - Fix standalone and non-deterministic test issue (authored by kpw).

Changed prior to commit:
  https://reviews.llvm.org/D32259?vs=95885&id=95891#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32259

Files:
  compiler-rt/trunk/test/xray/TestCases/Linux/fdr-mode.cc
  compiler-rt/trunk/test/xray/TestCases/Linux/fdr-thread-order.cc
  compiler-rt/trunk/test/xray/lit.site.cfg.in


Index: compiler-rt/trunk/test/xray/lit.site.cfg.in
===================================================================
--- compiler-rt/trunk/test/xray/lit.site.cfg.in
+++ compiler-rt/trunk/test/xray/lit.site.cfg.in
@@ -5,8 +5,11 @@
 config.xray_lit_source_dir = "@XRAY_LIT_SOURCE_DIR@"
 config.target_cflags = "@XRAY_TEST_TARGET_CFLAGS@"
 config.target_arch = "@XRAY_TEST_TARGET_ARCH@"
-config.built_with_llvm = ("@COMPILER_RT_STANDALONE_BUILD@" == "FALSE")
+config.built_with_llvm = ("@COMPILER_RT_STANDALONE_BUILD@" != "TRUE")
 
+# TODO: Look into whether we can run a capability test on the standalone build to
+# see whether it can run 'llvm-xray convert' instead of turning off tests for a
+# standalone build.
 if config.built_with_llvm:
   config.available_features.add('built-in-llvm-tree')
 
Index: compiler-rt/trunk/test/xray/TestCases/Linux/fdr-mode.cc
===================================================================
--- compiler-rt/trunk/test/xray/TestCases/Linux/fdr-mode.cc
+++ compiler-rt/trunk/test/xray/TestCases/Linux/fdr-mode.cc
@@ -1,4 +1,6 @@
 // RUN: %clangxx_xray -g -std=c++11 %s -o %t
+// RUN: rm fdr-logging-test-* || true
+// RUN: rm fdr-unwrite-test-* || true
 // RUN: XRAY_OPTIONS="patch_premain=false xray_naive_log=false xray_logfile_base=fdr-logging-test- xray_fdr_log=true verbosity=1 xray_fdr_log_func_duration_threshold_us=0" %run %t 2>&1 | FileCheck %s
 // RUN: XRAY_OPTIONS="patch_premain=false xray_naive_log=false xray_logfile_base=fdr-unwrite-test- xray_fdr_log=true verbosity=1 xray_fdr_log_func_duration_threshold_us=5000" %run %t 2>&1 | FileCheck %s
 // RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t "`ls fdr-logging-test-* | head -1`" | FileCheck %s --check-prefix=TRACE
Index: compiler-rt/trunk/test/xray/TestCases/Linux/fdr-thread-order.cc
===================================================================
--- compiler-rt/trunk/test/xray/TestCases/Linux/fdr-thread-order.cc
+++ compiler-rt/trunk/test/xray/TestCases/Linux/fdr-thread-order.cc
@@ -1,5 +1,6 @@
 // RUN: %clangxx_xray -g -std=c++11 %s -o %t
-// RUN: XRAY_OPTIONS="patch_premain=false xray_naive_log=false xray_logfile_base=fdr-thread-order. xray_fdr_log=true verbosity=1" %run %t 2>&1 | FileCheck %s
+// RUN: rm fdr-thread-order.* || true
+// RUN: XRAY_OPTIONS="patch_premain=false xray_naive_log=false xray_logfile_base=fdr-thread-order. xray_fdr_log=true verbosity=1 xray_fdr_log_func_duration_threshold_us=0" %run %t 2>&1 | FileCheck %s
 // RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t "`ls fdr-thread-order.* | head -1`" | FileCheck %s --check-prefix TRACE
 // RUN: rm fdr-thread-order.*
 // FIXME: Make llvm-xray work on non-x86_64 as well.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32259.95891.patch
Type: text/x-patch
Size: 2712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170420/a271ae53/attachment.bin>


More information about the llvm-commits mailing list