[PATCH] D156340: [BOLT][test] Add missing stderr redirections

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 08:43:13 PDT 2023


Amir created this revision.
Amir added a reviewer: bolt.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

BOLT-ERROR and BOLT-WARNING messages are output to stderr which is not captured
by piping to FileCheck. Redirect stderr to stdout to fix that in tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156340

Files:
  bolt/test/X86/issue26.s
  bolt/test/X86/issue26.test
  bolt/test/runtime/X86/exceptions-instrumentation.test
  bolt/test/runtime/meta-merge-fdata.test


Index: bolt/test/runtime/meta-merge-fdata.test
===================================================================
--- bolt/test/runtime/meta-merge-fdata.test
+++ bolt/test/runtime/meta-merge-fdata.test
@@ -22,7 +22,7 @@
 # Check that BOLT works with this profile
 RUN: llvm-bolt merge-fdata -o %t.bolt --data %t.fdata1 \
 RUN:   --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \
-RUN:   --split-functions \
+RUN:   --split-functions 2>&1 \
 RUN:   | FileCheck %s --check-prefix=CHECK-BOLT1
 CHECK-BOLT1-NOT: invalid (possibly stale) profile
 
@@ -44,7 +44,7 @@
 # Optimize using merged fdata
 RUN: llvm-bolt merge-fdata -o %t.opt --data %t.fdata.base \
 RUN:   --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \
-RUN:   --split-functions \
+RUN:   --split-functions 2>&1 \
 RUN:   | FileCheck %s --check-prefix=CHECK-BOLT2
 CHECK-BOLT2-NOT: invalid (possibly stale) profile
 
Index: bolt/test/runtime/X86/exceptions-instrumentation.test
===================================================================
--- bolt/test/runtime/X86/exceptions-instrumentation.test
+++ bolt/test/runtime/X86/exceptions-instrumentation.test
@@ -9,7 +9,7 @@
 
 RUN: llvm-bolt %t_exc_split -o %t.exc.bolted --data %t.fdata \
 RUN:   --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \
-RUN:   --split-functions --split-eh=1 \
+RUN:   --split-functions --split-eh=1 2>&1 \
 RUN:   | FileCheck --check-prefix=EXCEPTIONS %s
 EXCEPTIONS-NOT: invalid (possibly stale) profile
 
Index: bolt/test/X86/issue26.test
===================================================================
--- bolt/test/X86/issue26.test
+++ bolt/test/X86/issue26.test
@@ -1,7 +1,7 @@
 # This reproduces issue 26 from our github repo
 
 # RUN: yaml2obj %p/Inputs/issue26.yaml &> %t.exe
-# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out \
+# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out 2>&1 \
 # RUN:    | FileCheck %s
 
 CHECK-NOT: BOLT-WARNING: CFG invalid in XYZ @ .LBB0
Index: bolt/test/X86/issue26.s
===================================================================
--- bolt/test/X86/issue26.s
+++ bolt/test/X86/issue26.s
@@ -7,7 +7,7 @@
 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
 # RUN:   %s -o %t.o
 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
-# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out \
+# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out 2>&1 \
 # RUN:    | FileCheck %s
 
 # CHECK-NOT: BOLT-WARNING: CFG invalid in XYZ @ .LBB0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156340.544385.patch
Type: text/x-patch
Size: 2451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230726/7338bf04/attachment.bin>


More information about the llvm-commits mailing list