[PATCH] D154984: [lit] Drop "Script:", make -v and -a imply -vv

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 10:36:44 PDT 2023


ldionne added a comment.

In D154984#4493630 <https://reviews.llvm.org/D154984#4493630>, @jdenny wrote:

> In D154984#4493485 <https://reviews.llvm.org/D154984#4493485>, @Endill wrote:
>
>> LGTM, but I'd wait for more approvals
>
> Thanks for reviewing.  I agree about waiting in case there are use cases for "Script:" I hadn't imagined.

This is non-blocking, but I do use `Script:` a lot to reproduce libc++ test failures. Here's an example:

  FAIL: llvm-libc++-shared.cfg.in :: std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp (1 of 1)
  ******************** TEST 'llvm-libc++-shared.cfg.in :: std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp' FAILED ********************
  Script:
  --
  : 'COMPILED WITH';  <TOOLCHAIN>/usr/bin/clang++ <LLVM>/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp -pthread -isysroot <SDK> --target=arm64-apple-darwin21.4.0 -nostdinc++ -I <LLVM>/build/default/include/c++/v1 -I <LLVM>/build/default/include/c++/v1 -I <LLVM>/libcxx/test/support -std=c++2b LOTS-OF-FLAGS -nostdlib++ -L <LLVM>/build/default/lib -Wl,-rpath,<LLVM>/build/default/lib -lc++ -o <LLVM>/build/default/test/std/Output/proximate.pass.cpp.dir/t.tmp.exe
  : 'EXECUTED AS';  "python3.11" <LLVM>/libcxx/test/../utils/run.py --execdir <LLVM>/build/default/test/std/Output/proximate.pass.cpp.dir --  <LLVM>/build/default/test/std/Output/proximate.pass.cpp.dir/t.tmp.exe
  --
  Exit Code: 250
  
  Command Output (stdout):
  --
  $ ":" "COMPILED WITH"
  $ "<TOOLCHAIN>/usr/bin/clang++" "<LLVM>/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp" "-pthread" "-isysroot" "<SDK>" "--target=arm64-apple-darwin21.4.0" "-nostdinc++" "-I" "<LLVM>/build/default/include/c++/v1" "-I" "<LLVM>/build/default/include/c++/v1" "-I" "<LLVM>/libcxx/test/support" "-std=c++2b" LOTS-OF-FLAGS "-nostdlib++" "-L" "<LLVM>/build/default/lib" "-Wl,-rpath,<LLVM>/build/default/lib" "-lc++" "-o" "<LLVM>/build/default/test/std/Output/proximate.pass.cpp.dir/t.tmp.exe"
  # command stderr:
  ld: warning: object file (<LLVM>/build/default/lib/libc++experimental.a(memory_resource.cpp.o)) was built for newer macOS version (13.3) than being linked (13.0)
  ld: warning: dylib (<LLVM>/build/default/lib/libc++.dylib) was built for newer macOS version (13.3) than being linked (13.0)
  
  $ ":" "EXECUTED AS"
  $ "python3.11" "<LLVM>/libcxx/test/../utils/run.py" "--execdir" "<LLVM>/build/default/test/std/Output/proximate.pass.cpp.dir" "--" "<LLVM>/build/default/test/std/Output/proximate.pass.cpp.dir/t.tmp.exe"
  # command stderr:
  Assertion failed: (!PathEq(output, expect)), function basic_test, file proximate.pass.cpp, line 151.
  
  error: command failed with exit status: 250

There are two properties of `Script` that I like here:

1. It is not quoted. It is easier to copy-paste, modify and run into a terminal to reproduce the issue and iterate outside of Lit.
2. It shows all commands at once instead of showing only the ones that were executed, with output in between. If I want to know how to execute the program that was compiled above, I can easily use `Script` to figure that out. If I only have the `Command Output`, I have to search for `EXECUTED AS` through potentially a lot of output from the first command. And if the first command fails, then I will never know how this would get executed if this were to compile successfully.

I wouldn't say either of these issues should block this patch, however as-is this will cause a small quality-of-life regression for libc++ development. I don't have anything concrete to suggest here, so I'm fine with this, but if you can think of a way to retain either of these properties, it might be worth exploring.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154984



More information about the llvm-commits mailing list