[PATCH] D31454: [XRay][compiler-rt] Use llvm-xray in FDR mode tests

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 15:33:05 PDT 2017


dberris added inline comments.


================
Comment at: compiler-rt/trunk/test/xray/TestCases/Linux/fdr-thread-order.cc:3
+// 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: %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.*
----------------
eugenis wrote:
> > ls fdr-thread-order.* | head -1
> 
> How is that supposed to work?
> 
> This test never cleans old logs, so they just accumulate in the current directory, and then this line picks one basically at random.
The line after should take care of that, except for when the tests start failing. I've not found a way with lit to determine a cleanup mechanism that isn't order-dependent -- is there a feature that's useful there? Or is there a better way of spelling this so that the cleanup happens reliably?


Repository:
  rL LLVM

https://reviews.llvm.org/D31454





More information about the llvm-commits mailing list