[compiler-rt] r335025 - [XRay] rm GLOB || true -> rm -f

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 19 00:11:34 PDT 2018


Author: maskray
Date: Tue Jun 19 00:11:33 2018
New Revision: 335025

URL: http://llvm.org/viewvc/llvm-project?rev=335025&view=rev
Log:
[XRay] rm GLOB || true -> rm -f

Summary: `rm -f` does not write diagnostic message when there is no file argument.

Reviewers: dberris

Subscribers: delcypher, llvm-commits, #sanitizers

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

Modified:
    compiler-rt/trunk/test/xray/TestCases/Posix/arg1-arg0-logging.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logger.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logging-implicit-this.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/basic-filtering.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/c-test.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode-inmemory.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/fdr-single-thread.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/logging-modes.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/pic_test.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/profiling-multi-threaded.cc
    compiler-rt/trunk/test/xray/TestCases/Posix/profiling-single-threaded.cc

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/arg1-arg0-logging.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/arg1-arg0-logging.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/arg1-arg0-logging.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/arg1-arg0-logging.cc Tue Jun 19 00:11:33 2018
@@ -1,7 +1,7 @@
 // Allow having both the no-arg and arg1 logging implementation live together,
 // and be called in the correct cases.
 //
-// RUN: rm arg0-arg1-logging-* || true
+// RUN: rm -f arg0-arg1-logging-*
 // RUN: %clangxx_xray -std=c++11 %s -o %t
 // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1 xray_logfile_base=arg0-arg1-logging-" %run %t
 //

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logger.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logger.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logger.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logger.cc Tue Jun 19 00:11:33 2018
@@ -2,13 +2,13 @@
 // using a custom logging function.
 //
 // RUN: %clangxx_xray -std=c++11 %s -o %t
-// RUN: rm arg1-logger-* || true
+// RUN: rm -f arg1-logger-*
 // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1 xray_naive_log=true \
 // RUN:    xray_logfile_base=arg1-logger-" %run %t 2>&1 | FileCheck %s
 //
 // After all that, clean up the XRay log file.
 //
-// RUN: rm arg1-logger-* || true
+// RUN: rm -f arg1-logger-*
 //
 // At the time of writing, the ARM trampolines weren't written yet.
 // XFAIL: arm || aarch64 || mips

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logging-implicit-this.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logging-implicit-this.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logging-implicit-this.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/arg1-logging-implicit-this.cc Tue Jun 19 00:11:33 2018
@@ -1,7 +1,7 @@
 // Intercept the implicit 'this' argument of class member functions.
 //
 // RUN: %clangxx_xray -g -std=c++11 %s -o %t
-// RUN: rm log-args-this-* || true
+// RUN: rm -f log-args-this-*
 // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1 xray_logfile_base=log-args-this-" %run %t
 //
 // XFAIL: FreeBSD || arm || aarch64 || mips

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/basic-filtering.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/basic-filtering.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/basic-filtering.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/basic-filtering.cc Tue Jun 19 00:11:33 2018
@@ -2,7 +2,7 @@
 // logging implementation.
 
 // RUN: %clangxx_xray -std=c++11 %s -o %t -g
-// RUN: rm basic-filtering-* || true
+// RUN: rm -f basic-filtering-*
 // RUN: XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 \
 // RUN:     xray_logfile_base=basic-filtering- \
 // RUN:     xray_naive_log_func_duration_threshold_us=1000 \
@@ -11,7 +11,7 @@
 // RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t \
 // RUN:     "`ls basic-filtering-* | head -1`" | \
 // RUN:     FileCheck %s --check-prefix TRACE
-// RUN: rm basic-filtering-* || true
+// RUN: rm -f basic-filtering-*
 //
 // Now check support for the XRAY_BASIC_OPTIONS environment variable.
 // RUN: XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 \
@@ -21,7 +21,7 @@
 // RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t \
 // RUN:     "`ls basic-filtering-* | head -1`" | \
 // RUN:     FileCheck %s --check-prefix TRACE
-// RUN: rm basic-filtering-* || true
+// RUN: rm -f basic-filtering-*
 //
 // REQUIRES: x86_64-target-arch
 // REQUIRES: built-in-llvm-tree

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/c-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/c-test.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/c-test.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/c-test.cc Tue Jun 19 00:11:33 2018
@@ -1,8 +1,8 @@
 // RUN: %clang_xray -g -fxray-modes=xray-basic,xray-fdr,xray-profiling -o %t %s
-// RUN: rm xray-log.c-test.* || true
+// RUN: rm -f xray-log.c-test.*
 // RUN: XRAY_OPTIONS=patch_premain=true:verbosity=1:xray_mode=xray-basic %t \
 // RUN:     2>&1 | FileCheck %s
-// RUN: rm xray-log.c-test.* || true
+// RUN: rm -f xray-log.c-test.*
 //
 // REQUIRES: x86_64-target-arch
 // REQUIRES: built-in-llvm-tree

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode-inmemory.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode-inmemory.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode-inmemory.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode-inmemory.cc Tue Jun 19 00:11:33 2018
@@ -1,12 +1,12 @@
 // RUN: %clangxx_xray -g -std=c++11 %s -o %t -fxray-modes=xray-fdr
-// RUN: rm fdr-inmemory-test-* || true
+// RUN: rm -f fdr-inmemory-test-*
 // RUN: XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-inmemory-test- \
 // RUN:     verbosity=1" \
 // RUN: XRAY_FDR_OPTIONS="no_file_flush=true func_duration_threshold_us=0" \
 // RUN:     %run %t 2>&1 | FileCheck %s
 // RUN: FILES=`find %T -name 'fdr-inmemory-test-*' | wc -l`
 // RUN: [ $FILES -eq 0 ]
-// RUN: rm fdr-inmemory-test-* || true
+// RUN: rm -f fdr-inmemory-test-*
 //
 // REQUIRES: x86_64-target-arch
 // REQUIRES: built-in-llvm-tree

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/fdr-mode.cc Tue Jun 19 00:11:33 2018
@@ -1,6 +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: rm -f fdr-logging-test-*
+// RUN: rm -f fdr-unwrite-test-*
 // RUN: XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-logging-test- \
 // RUN:     xray_mode=xray-fdr verbosity=1" \
 // RUN: XRAY_FDR_OPTIONS="func_duration_threshold_us=0" \

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/fdr-single-thread.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/fdr-single-thread.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/fdr-single-thread.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/fdr-single-thread.cc Tue Jun 19 00:11:33 2018
@@ -1,5 +1,5 @@
 // RUN: %clangxx_xray -g -std=c++11 %s -o %t
-// RUN: rm fdr-logging-1thr-* || true
+// RUN: rm -f fdr-logging-1thr-*
 // RUN: XRAY_OPTIONS=XRAY_OPTIONS="verbosity=1 patch_premain=true \
 // RUN:   xray_naive_log=false xray_fdr_log=true \
 // RUN:   xray_fdr_log_func_duration_threshold_us=0 \

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/logging-modes.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/logging-modes.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/logging-modes.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/logging-modes.cc Tue Jun 19 00:11:33 2018
@@ -1,6 +1,6 @@
 // Check that we can install an implementation associated with a mode.
 //
-// RUN: rm xray-log.logging-modes* || true
+// RUN: rm -f xray-log.logging-modes*
 // RUN: %clangxx_xray -std=c++11 %s -o %t -fxray-modes=none
 // RUN: %run %t | FileCheck %s
 //

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/pic_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/pic_test.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/pic_test.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/pic_test.cc Tue Jun 19 00:11:33 2018
@@ -2,12 +2,12 @@
 
 // RUN: %clangxx_xray -fxray-instrument -std=c++11 -ffunction-sections \
 // RUN:     -fdata-sections -fpic -fpie -Wl,--gc-sections %s -o %t
-// RUN: rm pic-test-logging-* || true
+// RUN: rm -f pic-test-logging-*
 // RUN: XRAY_OPTIONS="patch_premain=true verbosity=1 xray_naive_log=true \
 // RUN:     xray_logfile_base=pic-test-logging-" %run %t 2>&1 | FileCheck %s
 // After all that, clean up the output xray log.
 //
-// RUN: rm pic-test-logging-* || true
+// RUN: rm -f pic-test-logging-*
 
 // UNSUPPORTED: target-is-mips64,target-is-mips64el
 

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/profiling-multi-threaded.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/profiling-multi-threaded.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/profiling-multi-threaded.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/profiling-multi-threaded.cc Tue Jun 19 00:11:33 2018
@@ -3,13 +3,13 @@
 //
 // FIXME: Make -fxray-modes=xray-profiling part of the default?
 // RUN: %clangxx_xray -std=c++11 %s -o %t -fxray-modes=xray-profiling
-// RUN: rm xray-log.profiling-multi-* || true
+// RUN: rm -f xray-log.profiling-multi-*
 // RUN: XRAY_OPTIONS=verbosity=1 \
 // RUN:     XRAY_PROFILING_OPTIONS=no_flush=1 %run %t
 // RUN: XRAY_OPTIONS=verbosity=1 %run %t
 // RUN: PROFILES=`ls xray-log.profiling-multi-* | wc -l`
 // RUN: [ $PROFILES -eq 1 ]
-// RUN: rm xray-log.profiling-multi-* || true
+// RUN: rm -f xray-log.profiling-multi-*
 //
 // UNSUPPORTED: target-is-mips64,target-is-mips64el
 

Modified: compiler-rt/trunk/test/xray/TestCases/Posix/profiling-single-threaded.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/xray/TestCases/Posix/profiling-single-threaded.cc?rev=335025&r1=335024&r2=335025&view=diff
==============================================================================
--- compiler-rt/trunk/test/xray/TestCases/Posix/profiling-single-threaded.cc (original)
+++ compiler-rt/trunk/test/xray/TestCases/Posix/profiling-single-threaded.cc Tue Jun 19 00:11:33 2018
@@ -3,13 +3,13 @@
 //
 // FIXME: Make -fxray-modes=xray-profiling part of the default?
 // RUN: %clangxx_xray -std=c++11 %s -o %t -fxray-modes=xray-profiling
-// RUN: rm xray-log.profiling-single-* || true
+// RUN: rm -f xray-log.profiling-single-*
 // RUN: XRAY_OPTIONS=verbosity=1 \
 // RUN:     XRAY_PROFILING_OPTIONS=no_flush=true %run %t
 // RUN: XRAY_OPTIONS=verbosity=1 %run %t
 // RUN: PROFILES=`ls xray-log.profiling-single-* | wc -l`
 // RUN: [ $PROFILES -eq 2 ]
-// RUN: rm xray-log.profiling-single-* || true
+// RUN: rm -f xray-log.profiling-single-*
 //
 // UNSUPPORTED: target-is-mips64,target-is-mips64el
 




More information about the llvm-commits mailing list