diff options
author | Rui Ueyama <ruiu@google.com> | 2016-10-26 01:07:26 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-10-26 01:07:26 +0000 |
commit | 2241b84f4808f84a513fd9c27246877198d13c16 (patch) | |
tree | 34db26c51cc30e9dac601f8fb6334a37952139de | |
parent | fda59e5851215850f9b9b534bfd8bda579089029 (diff) | |
download | bcm5719-llvm-2241b84f4808f84a513fd9c27246877198d13c16.tar.gz bcm5719-llvm-2241b84f4808f84a513fd9c27246877198d13c16.zip |
Use printf instead of "echo -e" or "echo -n".
Not all echo commands support "-e". On the other hand, printf
command is in POSIX, so it's more portable than "echo -e".
llvm-svn: 285151
-rw-r--r-- | llvm/test/Object/archive-format.test | 8 | ||||
-rw-r--r-- | llvm/test/tools/sanstats/elf.test | 38 |
2 files changed, 23 insertions, 23 deletions
diff --git a/llvm/test/Object/archive-format.test b/llvm/test/Object/archive-format.test index 70458d51be1..b9562a36d67 100644 --- a/llvm/test/Object/archive-format.test +++ b/llvm/test/Object/archive-format.test @@ -4,11 +4,11 @@ string table or not. RUN: mkdir -p %t RUN: cd %t -RUN: echo -n bar. > 0123456789abcde -RUN: echo -n zed. > 0123456789abcdef +RUN: printf bar. > 0123456789abcde +RUN: printf zed. > 0123456789abcdef RUN: mkdir -p foo -RUN: echo -n bar2 > foo/0123456789abcde -RUN: echo -n zed2 > foo/0123456789abcdef +RUN: printf bar2 > foo/0123456789abcde +RUN: printf zed2 > foo/0123456789abcdef RUN: rm -f %t.a RUN: llvm-ar --format=gnu rc %t.a 0123456789abcde 0123456789abcdef foo/0123456789abcde foo/0123456789abcdef diff --git a/llvm/test/tools/sanstats/elf.test b/llvm/test/tools/sanstats/elf.test index 91651bc3f9d..ab90b50020f 100644 --- a/llvm/test/tools/sanstats/elf.test +++ b/llvm/test/tools/sanstats/elf.test @@ -1,27 +1,27 @@ # RUN: yaml2obj %s > %t1.o # RUN: yaml2obj %s > %t2.o -# RUN: echo -ne "\x04" > %t.stats +# RUN: printf "\x04" > %t.stats -# RUN: echo -n "%t1.o" >> %t.stats -# RUN: echo -ne "\x00" >> %t.stats -# RUN: echo -ne "\x01\x00\x00\x00\x01\x00\x00\x00" >> %t.stats -# RUN: echo -ne "\x11\x00\x00\x00\x02\x00\x00\x20" >> %t.stats -# RUN: echo -ne "\x21\x00\x00\x00\x03\x00\x00\x40" >> %t.stats -# RUN: echo -ne "\x01\x00\x00\x00\x04\x00\x00\x60" >> %t.stats -# RUN: echo -ne "\x11\x00\x00\x00\x05\x00\x00\x80" >> %t.stats -# RUN: echo -ne "\x21\x00\x00\x00\x06\x00\x00\xa0" >> %t.stats -# RUN: echo -ne "\x00\x00\x00\x00\x00\x00\x00\x00" >> %t.stats +# RUN: printf "%%s" "%t1.o" >> %t.stats +# RUN: printf "\x00" >> %t.stats +# RUN: printf "\x01\x00\x00\x00\x01\x00\x00\x00" >> %t.stats +# RUN: printf "\x11\x00\x00\x00\x02\x00\x00\x20" >> %t.stats +# RUN: printf "\x21\x00\x00\x00\x03\x00\x00\x40" >> %t.stats +# RUN: printf "\x01\x00\x00\x00\x04\x00\x00\x60" >> %t.stats +# RUN: printf "\x11\x00\x00\x00\x05\x00\x00\x80" >> %t.stats +# RUN: printf "\x21\x00\x00\x00\x06\x00\x00\xa0" >> %t.stats +# RUN: printf "\x00\x00\x00\x00\x00\x00\x00\x00" >> %t.stats -# RUN: echo -n "%t2.o" >> %t.stats -# RUN: echo -ne "\x00" >> %t.stats -# RUN: echo -ne "\x21\x00\x00\x00\x07\x00\x00\x00" >> %t.stats -# RUN: echo -ne "\x11\x00\x00\x00\x08\x00\x00\x20" >> %t.stats -# RUN: echo -ne "\x01\x00\x00\x00\x09\x00\x00\x40" >> %t.stats -# RUN: echo -ne "\x21\x00\x00\x00\x0b\x00\x00\x60" >> %t.stats -# RUN: echo -ne "\x11\x00\x00\x00\x0c\x00\x00\x80" >> %t.stats -# RUN: echo -ne "\x01\x00\x00\x00\x0e\x00\x00\xa0" >> %t.stats -# RUN: echo -ne "\x00\x00\x00\x00\x00\x00\x00\x00" >> %t.stats +# RUN: printf "%%s" "%t2.o" >> %t.stats +# RUN: printf "\x00" >> %t.stats +# RUN: printf "\x21\x00\x00\x00\x07\x00\x00\x00" >> %t.stats +# RUN: printf "\x11\x00\x00\x00\x08\x00\x00\x20" >> %t.stats +# RUN: printf "\x01\x00\x00\x00\x09\x00\x00\x40" >> %t.stats +# RUN: printf "\x21\x00\x00\x00\x0b\x00\x00\x60" >> %t.stats +# RUN: printf "\x11\x00\x00\x00\x0c\x00\x00\x80" >> %t.stats +# RUN: printf "\x01\x00\x00\x00\x0e\x00\x00\xa0" >> %t.stats +# RUN: printf "\x00\x00\x00\x00\x00\x00\x00\x00" >> %t.stats # RUN: sanstats %t.stats | FileCheck %s |