[PATCH] D66134: [llvm-size][test] Improve llvm-size testing

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 05:19:59 PDT 2019


MaskRay added inline comments.


================
Comment at: test/tools/llvm-size/archive.test:10
+
+# RUN: llvm-size -B %t1.a | FileCheck %s --implicit-check-not={{.}} --allow-empty
+# RUN: llvm-size -A %t1.a | FileCheck %s --implicit-check-not={{.}} --allow-empty
----------------
`| count 0`


================
Comment at: test/tools/llvm-size/no-input.test:4
+# RUN: not llvm-size %t.blah 2>&1 | FileCheck %s -DFILE=%t.blah --check-prefix=ENOENT
+# ENOENT: {{.*}}llvm-size{{(\.EXE|\.exe)?}}: [[FILE]] {{[Nn]}}o such file or directory
+
----------------
grimar wrote:
> I wonder if it is really important to check the tool executable name?
> For other tools we often just check the "error: filename: text", I am not sure
> that testing the `{{.*}}llvm-size{{(\.EXE|\.exe)?}}` makes a lot of sense? (looks a bit complicated and excessive)
GNU size sets `_bfd_error_program_name` and thus prints `argv[0]: filename: message`.

I don't think duplicating the program name makes a lot of sense.. Though I'm not sure if you'd be happy to change the behavior.


================
Comment at: test/tools/llvm-size/response-file.test:3
+
+# RUN: echo "-t %t" > %t.rsp
+# RUN: yaml2obj %s -o %t
----------------
Does this work on Windows?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66134/new/

https://reviews.llvm.org/D66134





More information about the llvm-commits mailing list