diff --git a/llvm/test/tools/llvm-profdata/show-prof-size.test b/llvm/test/tools/llvm-profdata/show-prof-size.test index cc9b16aa08cc..a77360c8a673 100644 --- a/llvm/test/tools/llvm-profdata/show-prof-size.test +++ b/llvm/test/tools/llvm-profdata/show-prof-size.test @@ -1,5 +1,5 @@ ; RUN: llvm-profdata merge -sample -extbinary -prof-sym-list=%S/Inputs/profile-symbol-list-1.text %S/Inputs/sample-profile.proftext -o %t.1.output -; RUN: ls -l %t.1.output |tr -s ' ' |cut -f5 -d ' ' > %t.txt +; RUN: wc -c < %t.1.output > %t.txt ; RUN: llvm-profdata show -sample -show-sec-info-only %t.1.output >> %t.txt ; RUN: FileCheck %s --input-file=%t.txt ; Check llvm-profdata shows the correct file size. diff --git a/llvm/test/tools/yaml2obj/ELF/custom-null-section.yaml b/llvm/test/tools/yaml2obj/ELF/custom-null-section.yaml index e8cbb4edb630..93346032b795 100644 --- a/llvm/test/tools/yaml2obj/ELF/custom-null-section.yaml +++ b/llvm/test/tools/yaml2obj/ELF/custom-null-section.yaml @@ -71,8 +71,8 @@ Sections: ## of the first SHT_NULL section. # RUN: yaml2obj --docnum=4 %s -o %t4 -# RUN: ls -l %t3 | tr -s ' ' | cut -d ' ' -f 5 > %t.txt -# RUN: ls -l %t4 | tr -s ' ' | cut -d ' ' -f 5 >> %t.txt +# RUN: wc -c < %t3 > %t.txt +# RUN: wc -c < %t4 >> %t.txt # RUN: FileCheck %s --input-file=%t.txt --check-prefix=SIZE # SIZE: [[FILESIZE:.*]]