<div dir="ltr">Yes, fixing the eight tests seems like the simplest solution. Fewer settings or modes of operation is better.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 30, 2020 at 11:03 AM Louis Dionne <<a href="mailto:ldionne@apple.com">ldionne@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><br><div><br><blockquote type="cite"><div>On Mar 30, 2020, at 14:00, Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:</div><br><div><div dir="ltr">The forwarded messages suggest that recursive substitution expansion is only a problem for 8 tests in all of LLVM. I wasn't able to work out which substitutions are causing the issue. I think %clang and %clang_cc1 can coexist, because they are (or should be) regexes: `\b%clang\b`, which does not match `%clang_cc1`.<div><br></div><div>I guess I'd hesitate to mess too much with the config. If we can get by with one object, that seems better.</div></div></div></blockquote><div><br></div><div>I'm not sure what you mean here. Are you trying to say that instead we should fix the 8 failing tests so they can handle recursive substitutions, or that you prefer either options (2) or (3) I proposed, which do not duplicate the LitConfig object. Or did you mean something else?</div><div><br></div><div>Louis</div><br><blockquote type="cite"><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 30, 2020 at 6:21 AM Louis Dionne <<a href="mailto:ldionne@apple.com" target="_blank">ldionne@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">+ Lit folks<br>
<br>
So I'm pretty sure this happens because the Lit Configuration is shared across all the test suites, which means that when I set `lit_config.recursiveExpansionLimit = 10`, it actually gets set for all the test suites, not only for libc++. And for some test suites, it's possible that recursive substitutions mess things up if they use non-delimited substitutions (e.g. %clang and %clang_cc1 would conflict).<br>
<br>
The problem appears to be that there's only one Lit Config shared across all test suites, whereas we make a deep copy of each local config when we enter a new subdirectory. Can some of the CC'd folks comment on whether we should<br>
1. deep copy the Lit Config too for each subdirectory, or<br>
2. move the recursiveExpansionLimit setting to the local config, or<br>
3. make it so that `make check-all` does not try to run Lit in one go on all the test suites.<br>
<br>
Doing (2) seems weird to me, since I think `recursiveExpansionLimit` belongs to the Lit Config more than a local config, but I could be convinced.<br>
<br>
Whatever we agree on, I'll submit a patch.<br>
<br>
Cheers,<br>
Louis<br>
<br>
<br>
<br>
> On Mar 29, 2020, at 21:04, David Zarzycki <<a href="mailto:dave@znu.io" target="_blank">dave@znu.io</a>> wrote:<br>
> <br>
> Hi Louis,<br>
> <br>
> What I'm doing is essentially the documented "how to build LLVM". You can find it in the LLVM getting started guide. So yes, one big CMake setup as documented. If this setup is a surprise to you, then I need to revert this. Here is a reduction of my phased testing setup that demonstrates the regression:<br>
> <br>
> mkdir -p /tmp/x/y/z<br>
> cd /tmp/x/y/z<br>
> cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=FALSE -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DLLVM_ENABLE_PROJECTS="clang;lld;libcxxabi;libcxx" ~/s/lp/llvm<br>
> ninja all check-all<br>
> <br>
> Dave<br>
> <br>
> On Sun, Mar 29, 2020, at 12:36 PM, Louis Dionne wrote:<br>
>> Hi,<br>
>> <br>
>> Sorry, I just saw this. I'm looking at the failures and I have a really <br>
>> hard time understanding how they could be related to a libc++ change, <br>
>> let alone that one. Can you please share exactly how you're configuring <br>
>> your LLVM tree? Do you have additional downstream patches that touch <br>
>> the libc++ and/or libc++abi test suites?<br>
>> <br>
>> The one thing I could imagine is that somehow the <br>
>> `lit_config.recursiveExpansionLimit` that we set in libc++'s lit.cfg is <br>
>> being picked up in other lit configurations too, however I don't think <br>
>> that really makes sense. It does seem like you have a single huge lit <br>
>> test suite for all of LLVM given the output you provide below, where it <br>
>> seems like libcxxabi, libcxx, clang & friends are all in the same CMake <br>
>> target. How do you run your tests?<br>
>> <br>
>> Louis<br>
>> <br>
>>> On Mar 28, 2020, at 21:49, David Zarzycki <<a href="mailto:dave@znu.io" target="_blank">dave@znu.io</a>> wrote:<br>
>>> <br>
>>> Hi Louis,<br>
>>> <br>
>>> Git bisecting has revealed that that this is breaking the first stage of my testing harness (Fedora 31, x86_64, release without assertions). I plan in reverting this but I want to give you a heads up first. Do you think you can find a quick fix?<br>
>>> <br>
>>> Dave<br>
>>> <br>
>>> <br>
>>> [0+1] Running all regression tests<br>
>>> llvm-lit: /home/dave/s/lp/libcxxabi/test/lit.cfg:58: note: Using configuration variant: libcxxabi<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:322: note: inferred use_system_cxx_lib as: None<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:349: note: inferred use_clang_verify as: True<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:359: note: enabling thread-safety annotations<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:542: note: inferred language dialect as: c++2a<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale fr_FR.UTF-8 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale ru_RU.UTF-8 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale zh_CN.UTF-8 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale fr_CA.ISO8859-1 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale cs_CZ.ISO8859-2 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:438: note: inferred long_tests as: True<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:158: note: Using compiler: /usr/bin/clang++<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:159: note: Using flags: ['-v']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:164: note: Using compile flags: ['-Werror=thread-safety', '-DLIBCXXABI_NO_TIMER', '-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS', '-funwind-tables', '-std=c++2a', '-nostdinc++', '-I/home/dave/s/lp/libcxx/include', '-I/home/dave/s/lp/libcxxabi/include', '-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-I/home/dave/s/lp/libcxx/test/support', '-ftemplate-depth=270', '-DLIBCXX_FILESYSTEM_STATIC_TEST_ROOT="/home/dave/s/lp/libcxx/test/std/input.output/filesystems/Inputs/static_test_env"', '-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT="/tmp/_update_lc/r/projects/libcxxabi/test/filesystem/Output/dynamic_env"', '-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER="/usr/bin/python /home/dave/s/lp/libcxx/test/support/filesystem_dynamic_test_helper.py"']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:166: note: Using warnings: ['-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER', '-Wall', '-Wextra', '-Werror', '-Wuser-defined-warnings', '-Wshadow', '-Wno-unused-command-line-argument', '-Wno-attributes', '-Wno-pessimizing-move', '-Wno-c++11-extensions', '-Wno-user-defined-literals', '-Wno-noexcept-type', '-Wsign-compare', '-Wunused-variable', '-Wunused-parameter', '-Wunreachable-code']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:167: note: Using link flags: ['-L/tmp/_update_lc/r/./lib64', '-Wl,-rpath,/tmp/_update_lc/r/./lib64', '-L/tmp/_update_lc/r/./lib64', '-Wl,-rpath,/tmp/_update_lc/r/./lib64', '-nodefaultlibs', '/tmp/_update_lc/r/./lib64/libc++.a', '/tmp/_update_lc/r/./lib64/libc++abi.a', '-lm', '-lgcc_s', '-lgcc', '-lpthread', '-lrt', '-lc', '-lgcc_s', '-lgcc']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:170: note: Using available_features: ['thread-safety', 'libcxxabi-has-system-unwinder', 'c++2a', '-fsized-deallocation', 'libc++', 'clang', 'glibc-2.30', 'linux', 'fdelayed-template-parsing', 'glibc', 'modules-support', 'glibc-2', 'fcoroutines-ts', 'fedora', 'clang-9.0', 'clang-9', 'diagnose-if-support', 'fedora-31', 'clang-9.0.1', 'long_tests', '-faligned-allocation', 'locale.en_US.UTF-8', 'verify-support']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:175: note: Adding environment variables: {'LIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT': '/tmp/_update_lc/r/projects/libcxxabi/test/filesystem/Output/dynamic_env'}<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/test/lit.cfg:46: note: Using configuration variant: libcxx<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:322: note: inferred use_system_cxx_lib as: None<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:349: note: inferred use_clang_verify as: True<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:359: note: enabling thread-safety annotations<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:542: note: inferred language dialect as: c++2a<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale fr_FR.UTF-8 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale ru_RU.UTF-8 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale zh_CN.UTF-8 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale fr_CA.ISO8859-1 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/target_info.py:84: warning: The locale cs_CZ.ISO8859-2 is not supported by your platform. Some tests will be unsupported.<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:438: note: inferred long_tests as: True<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:158: note: Using compiler: /usr/bin/clang++<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:159: note: Using flags: ['-v']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:164: note: Using compile flags: ['-Werror=thread-safety', '-std=c++2a', '-include', '/home/dave/s/lp/libcxx/test/support/nasty_macros.h', '-nostdinc++', '-I/home/dave/s/lp/libcxx/include', '-I/tmp/_update_lc/r/projects/libcxx/include/c++build', '-D__STDC_FORMAT_MACROS', '-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-I/home/dave/s/lp/libcxx/test/support', '-ftemplate-depth=270', '-DLIBCXX_FILESYSTEM_STATIC_TEST_ROOT="/home/dave/s/lp/libcxx/test/std/input.output/filesystems/Inputs/static_test_env"', '-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT="/tmp/_update_lc/r/projects/libcxx/test/filesystem/Output/dynamic_env"', '-DLIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER="/usr/bin/python /home/dave/s/lp/libcxx/test/support/filesystem_dynamic_test_helper.py"']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:166: note: Using warnings: ['-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER', '-Wall', '-Wextra', '-Werror', '-Wuser-defined-warnings', '-Wshadow', '-Wno-unused-command-line-argument', '-Wno-attributes', '-Wno-pessimizing-move', '-Wno-c++11-extensions', '-Wno-user-defined-literals', '-Wno-noexcept-type', '-Wsign-compare', '-Wunused-variable', '-Wunused-parameter', '-Wunreachable-code']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:167: note: Using link flags: ['-L/tmp/_update_lc/r/./lib64', '-Wl,-rpath,/tmp/_update_lc/r/./lib64', '-nodefaultlibs', '-lc++experimental', '/tmp/_update_lc/r/./lib64/libc++.a', '-lc++abi', '-lm', '-lgcc_s', '-lgcc', '-lpthread', '-lrt', '-lc', '-lgcc_s', '-lgcc']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:170: note: Using available_features: ['thread-safety', 'c++2a', '-fsized-deallocation', 'c++experimental', 'libc++', 'clang', 'libatomic', 'glibc-2.30', 'linux', 'fdelayed-template-parsing', 'glibc', 'modules-support', 'glibc-2', 'fcoroutines-ts', 'fedora', 'clang-9.0', 'clang-9', 'diagnose-if-support', 'fedora-31', 'clang-9.0.1', 'long_tests', '-faligned-allocation', 'locale.en_US.UTF-8', 'verify-support']<br>
>>> llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:175: note: Adding environment variables: {'LIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT': '/tmp/_update_lc/r/projects/libcxx/test/filesystem/Output/dynamic_env'}<br>
>>> llvm-lit: /home/dave/s/lp/llvm/utils/lit/lit/llvm/config.py:342: note: using clang: /tmp/_update_lc/r/bin/clang<br>
>>> llvm-lit: /home/dave/s/lp/llvm/utils/lit/lit/llvm/config.py:342: note: using ld.lld: /tmp/_update_lc/r/bin/ld.lld<br>
>>> llvm-lit: /home/dave/s/lp/llvm/utils/lit/lit/llvm/config.py:342: note: using lld-link: /tmp/_update_lc/r/bin/lld-link<br>
>>> llvm-lit: /home/dave/s/lp/llvm/utils/lit/lit/llvm/config.py:342: note: using ld64.lld: /tmp/_update_lc/r/bin/ld64.lld<br>
>>> llvm-lit: /home/dave/s/lp/llvm/utils/lit/lit/llvm/config.py:342: note: using wasm-ld: /tmp/_update_lc/r/bin/wasm-ld<br>
>>> FAIL: Clang :: Driver/cl-response-file.c (9973 of 62557)<br>
>>> ******************** TEST 'Clang :: Driver/cl-response-file.c' FAILED ********************<br>
>>> Script:<br>
>>> --<br>
>>> : 'RUN: at line 7';   printf '/home/dave/s/lp/clang/test/Driver/cl-response-file.c\n' '/I/home/dave/s/lp/clang/test/Driver\Inputs\cl-response-file\ /DFOO=2' > /tmp/_update_lc/r/tools/clang/test/Driver/Output/cl-response-file.c.tmp.rsp<br>
>>> : 'RUN: at line 8';   /tmp/_update_lc/r/bin/clang --driver-mode=cl /c -### @/tmp/_update_lc/r/tools/clang/test/Driver/Output/cl-response-file.c.tmp.rsp -- /home/dave/s/lp/clang/test/Driver/cl-response-file.c 2>&1 | /tmp/_update_lc/r/bin/FileCheck /home/dave/s/lp/clang/test/Driver/cl-response-file.c<br>
>>> --<br>
>>> Exit Code: 1<br>
>>> <br>
>>> Command Output (stderr):<br>
>>> --<br>
>>> /home/dave/s/lp/clang/test/Driver/cl-response-file.c:10:11: error: CHECK: expected string not found in input<br>
>>> // CHECK: "-I" "{{.*}}\\Inputs\\cl-response-file\\" "-D" "FOO=2"<br>
>>>         ^<br>
>>> <stdin>:1:1: note: scanning from here<br>
>>> clang version 11.0.0 (<a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a> ba2e72c54ec998123ae1bc001cb782449fafc924)<br>
>>> ^<br>
>>> <stdin>:5:1093: note: possible intended match here<br>
>>> "/tmp/_update_lc/r/bin/clang-11" "-cc1" "-triple" "x86_64-pc-windows-msvc19.11.0" "-emit-obj" "-mrelax-all" "-mincremental-linker-compatible" "-disable-free" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "cl-response-file.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-mframe-pointer=none" "-relaxed-aliasing" "-fmath-errno" "-fno-rounding-math" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-mllvm" "-x86-asm-syntax=intel" "-D_MT" "-flto-visibility-public-std" "--dependent-lib=libcmt" "--dependent-lib=oldnames" "-stack-protector" "2" "-fms-volatile" "-fdiagnostics-format" "msvc" "-dwarf-column-info" "-resource-dir" "/tmp/_update_lc/r/lib64/clang/11.0.0" "-internal-isystem" "/tmp/_update_lc/r/lib64/clang/11.0.0/include" "-fdebug-compilation-dir" "/tmp/_update_lc/r/tools/clang/test/Driver" "-ferror-limit" "19" "-fmessage-length" "0" "-fno-use-cxa-atexit" "-fms-extensions" "-fms-compatibility" "-fms-compatibility-version=19.11" "-fdelayed-template-parsing" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-faddrsig" "-o" "cl-response-file.obj" "-x" "c" "/home/dave/s/lp/clang/test/Driver/cl-response-file.c"<br>
>>>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^<br>
>>> <br>
>>> --<br>
>>> <br>
>>> ********************<br>
>>> FAIL: LLVM :: Linker/2003-01-30-LinkerTypeRename.ll (40196 of 62557)<br>
>>> ******************** TEST 'LLVM :: Linker/2003-01-30-LinkerTypeRename.ll' FAILED ********************<br>
>>> Script:<br>
>>> --<br>
>>> : 'RUN: at line 4';   echo "/tmp/_update_lc/r/test/Linker/Outputy = type opaque @GV = external global /tmp/_update_lc/r/test/Linker/Outputy*" | /tmp/_update_lc/r/bin/llvm-as > /tmp/_update_lc/r/test/Linker/Output/2003-01-30-LinkerTypeRename.ll.tmp.1.bc<br>
>>> : 'RUN: at line 5';   /tmp/_update_lc/r/bin/llvm-as < /home/dave/s/lp/llvm/test/Linker/2003-01-30-LinkerTypeRename.ll > /tmp/_update_lc/r/test/Linker/Output/2003-01-30-LinkerTypeRename.ll.tmp.2.bc<br>
>>> : 'RUN: at line 6';   /tmp/_update_lc/r/bin/llvm-link /tmp/_update_lc/r/test/Linker/Output/2003-01-30-LinkerTypeRename.ll.tmp.1.bc /tmp/_update_lc/r/test/Linker/Output/2003-01-30-LinkerTypeRename.ll.tmp.2.bc -S | /tmp/_update_lc/r/bin/FileCheck /home/dave/s/lp/llvm/test/Linker/2003-01-30-LinkerTypeRename.ll<br>
>>> --<br>
>>> Exit Code: 1<br>
>>> <br>
>>> Command Output (stderr):<br>
>>> --<br>
>>> /tmp/_update_lc/r/bin/llvm-as: <stdin>:1:1: error: expected top-level entity<br>
>>> /tmp/_update_lc/r/test/Linker/Outputy = type opaque @GV = external global /tmp/_update_lc/r/test/Linker/Outputy*<br>
>>> ^<br>
>>> <br>
>>> --<br>
>>> <br>
>>> ********************<br>
>>> FAIL: LLVM :: Linker/2003-06-02-TypeResolveProblem2.ll (40198 of 62557)<br>
>>> ******************** TEST 'LLVM :: Linker/2003-06-02-TypeResolveProblem2.ll' FAILED ********************<br>
>>> Script:<br>
>>> --<br>
>>> : 'RUN: at line 1';   echo "/tmp/_update_lc/r/test/Linker/Output = type i32" | /tmp/_update_lc/r/bin/llvm-as > /tmp/_update_lc/r/test/Linker/Output/2003-06-02-TypeResolveProblem2.ll.tmp.1.bc<br>
>>> : 'RUN: at line 2';   /tmp/_update_lc/r/bin/llvm-as < /home/dave/s/lp/llvm/test/Linker/2003-06-02-TypeResolveProblem2.ll > /tmp/_update_lc/r/test/Linker/Output/2003-06-02-TypeResolveProblem2.ll.tmp.2.bc<br>
>>> : 'RUN: at line 3';   /tmp/_update_lc/r/bin/llvm-link /tmp/_update_lc/r/test/Linker/Output/2003-06-02-TypeResolveProblem2.ll.tmp.1.bc /tmp/_update_lc/r/test/Linker/Output/2003-06-02-TypeResolveProblem2.ll.tmp.2.bc<br>
>>> --<br>
>>> Exit Code: 1<br>
>>> <br>
>>> Command Output (stderr):<br>
>>> --<br>
>>> /tmp/_update_lc/r/bin/llvm-as: <stdin>:1:1: error: expected top-level entity<br>
>>> /tmp/_update_lc/r/test/Linker/Output = type i32<br>
>>> ^<br>
>>> <br>
>>> --<br>
>>> <br>
>>> ********************<br>
>>> FAIL: LLVM :: Linker/2003-04-26-NullPtrLinkProblem.ll (40204 of 62557)<br>
>>> ******************** TEST 'LLVM :: Linker/2003-04-26-NullPtrLinkProblem.ll' FAILED ********************<br>
>>> Script:<br>
>>> --<br>
>>> : 'RUN: at line 7';   printf "\x00" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 8';   printf "\x01\x00\x00\x00\x01\x00\x00\x00" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 9';   printf "\x11\x00\x00\x00\x02\x00\x00\x20" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 10';   printf "\x21\x00\x00\x00\x03\x00\x00\x40" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 11';   printf "\x01\x00\x00\x00\x04\x00\x00\x60" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 12';   printf "\x11\x00\x00\x00\x05\x00\x00\x80" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 13';   printf "\x21\x00\x00\x00\x06\x00\x00\xa0" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 14';   printf "\x00\x00\x00\x00\x00\x00\x00\x00" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 16';   printf "/home/dave/s/lp/llvm/test/tools/sanstats/elf.test" "/tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp2.o" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 17';   printf "\x00" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 18';   printf "\x21\x00\x00\x00\x07\x00\x00\x00" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 19';   printf "\x11\x00\x00\x00\x08\x00\x00\x20" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 20';   printf "\x01\x00\x00\x00\x09\x00\x00\x40" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 21';   printf "\x21\x00\x00\x00\x0b\x00\x00\x60" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 22';   printf "\x11\x00\x00\x00\x0c\x00\x00\x80" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 23';   printf "\x01\x00\x00\x00\x0e\x00\x00\xa0" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 24';   printf "\x00\x00\x00\x00\x00\x00\x00\x00" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats<br>
>>> : 'RUN: at line 26';   /tmp/_update_lc/r/bin/sanstats /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats | /tmp/_update_lc/r/bin/FileCheck /home/dave/s/lp/llvm/test/tools/sanstats/elf.test<br>
>>> : 'RUN: at line 30';   mkdir -p /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.dir<br>
>>> : 'RUN: at line 31';   mv -f /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp1.o /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp2.o /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.dir<br>
>>> : 'RUN: at line 32';   /tmp/_update_lc/r/bin/sanstats /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats | /tmp/_update_lc/r/bin/FileCheck /home/dave/s/lp/llvm/test/tools/sanstats/elf.test --check-prefix=INVALID<br>
>>> : 'RUN: at line 33';   mv -f /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.dir/copy.stats<br>
>>> : 'RUN: at line 34';   cd /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.dir && /tmp/_update_lc/r/bin/sanstats copy.stats | /tmp/_update_lc/r/bin/FileCheck /home/dave/s/lp/llvm/test/tools/sanstats/elf.test<br>
>>> --<br>
>>> Exit Code: 1<br>
>>> <br>
>>> Command Output (stderr):<br>
>>> --<br>
>>> /home/dave/s/lp/llvm/test/tools/sanstats/elf.test:38:10: error: CHECK: expected string not found in input<br>
>>> # CHECK: 0x0000000000000000 /tmp{{[/\\]}}f.c:1 f1 cfi-vcall 1<br>
>>>        ^<br>
>>> <stdin>:1:1: note: scanning from here<br>
>>> <error> The file was not recognized as a valid object file<br>
>>> ^<br>
>>> <stdin>:6:1: note: possible intended match here<br>
>>> 0x0000000000000010 <invalid>:0 <invalid> cfi-icall 5<br>
>>> ^<br>
>>> <br>
>>> --<br>
>>> <br>
>>> ********************<br>
>>> Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..<br>
>>> <br>
>>> 10 warning(s) in tests<br>
>>> <br>
>>> Testing Time: 148.87s<br>
>>> ********************<br>
>>> Failing Tests (8):<br>
>>>   Clang :: Driver/cl-response-file.c<br>
>>>   LLVM :: Linker/2003-01-30-LinkerTypeRename.ll<br>
>>>   LLVM :: Linker/2003-04-26-NullPtrLinkProblem.ll<br>
>>>   LLVM :: Linker/2003-06-02-TypeResolveProblem.ll<br>
>>>   LLVM :: Linker/2003-06-02-TypeResolveProblem2.ll<br>
>>>   LLVM :: Linker/2003-08-23-GlobalVarLinking.ll<br>
>>>   LLVM :: Linker/2003-11-18-TypeResolution.ll<br>
>>>   LLVM :: tools/sanstats/elf.test<br>
>>> <br>
>>> Expected Passes    : 45131<br>
>>> Expected Failures  : 114<br>
>>> Unsupported Tests  : 17282<br>
>>> Unexpected Failures: 8<br>
>>> FAILED: CMakeFiles/check-all<br>
>>> <br>
>>> <br>
>>> <br>
>>> <br>
>>> On Fri, Mar 27, 2020, at 11:09 AM, Louis Dionne via libcxx-commits wrote:<br>
>>>> <br>
>>>> Author: Louis Dionne<br>
>>>> Date: 2020-03-27T11:09:08-04:00<br>
>>>> New Revision: cd7f9751c30092033a5e97591876f972daf61989<br>
>>>> <br>
>>>> URL: <br>
>>>> <a href="https://github.com/llvm/llvm-project/commit/cd7f9751c30092033a5e97591876f972daf61989" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/cd7f9751c30092033a5e97591876f972daf61989</a><br>
>>>> DIFF: <br>
>>>> <a href="https://github.com/llvm/llvm-project/commit/cd7f9751c30092033a5e97591876f972daf61989.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/cd7f9751c30092033a5e97591876f972daf61989.diff</a><br>
>>>> <br>
>>>> LOG: [libc++] NFC: Simplify substitutions by using lit recursive substitutions<br>
>>>> <br>
>>>> Since lit supports expanding substitutions recursively, we can define<br>
>>>> substitutions in terms of other substitutions. This allows us to simplify<br>
>>>> how libc++ substitutions are defined.<br>
>>>> <br>
>>>> This doesn't change the substitutions at all, it only makes them simpler<br>
>>>> to define.<br>
>>>> <br>
>>>> Added: <br>
>>>> <br>
>>>> <br>
>>>> Modified: <br>
>>>>   libcxx/test/lit.cfg<br>
>>>>   libcxx/utils/libcxx/test/config.py<br>
>>>>   libcxx/utils/libcxx/test/format.py<br>
>>>> <br>
>>>> Removed: <br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> ################################################################################<br>
>>>> diff  --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg<br>
>>>> index ed5aa29d9175..e6e0542c2fbe 100644<br>
>>>> --- a/libcxx/test/lit.cfg<br>
>>>> +++ b/libcxx/test/lit.cfg<br>
>>>> @@ -53,3 +53,5 @@ configuration = <br>
>>>> config_module.Configuration(lit_config, config)<br>
>>>> configuration.configure()<br>
>>>> configuration.print_config_info()<br>
>>>> config.test_format = configuration.get_test_format()<br>
>>>> +<br>
>>>> +lit_config.recursiveExpansionLimit = 10<br>
>>>> <br>
>>>> diff  --git a/libcxx/utils/libcxx/test/config.py <br>
>>>> b/libcxx/utils/libcxx/test/config.py<br>
>>>> index 2d0c3deadbc3..66e60cd75cf3 100644<br>
>>>> --- a/libcxx/utils/libcxx/test/config.py<br>
>>>> +++ b/libcxx/utils/libcxx/test/config.py<br>
>>>> @@ -1039,35 +1039,26 @@ def configure_substitutions(self):<br>
>>>>        if self.target_info.is_darwin():<br>
>>>>            # Do not pass DYLD_LIBRARY_PATH to the compiler, linker, <br>
>>>> etc. as<br>
>>>>            # these tools are not meant to exercise the just-built <br>
>>>> libraries.<br>
>>>> -            tool_env += 'env DYLD_LIBRARY_PATH="" '<br>
>>>> +            tool_env += 'env DYLD_LIBRARY_PATH=""'<br>
>>>> <br>
>>>>        sub = self.config.substitutions<br>
>>>> -        cxx_path = tool_env + pipes.quote(self.cxx.path)<br>
>>>>        # Configure compiler substitutions<br>
>>>> -        sub.append(('%{cxx}', cxx_path))<br>
>>>> +        sub.append(('%{cxx}', '{} {}'.format(tool_env, <br>
>>>> pipes.quote(self.cxx.path))))<br>
>>>>        sub.append(('%{libcxx_src_root}', self.libcxx_src_root))<br>
>>>>        # Configure flags substitutions<br>
>>>> -        flags_str = ' '.join([pipes.quote(f) for f in self.cxx.flags])<br>
>>>> -        compile_flags_str = ' '.join([pipes.quote(f) for f in <br>
>>>> self.cxx.compile_flags])<br>
>>>> -        link_flags_str = ' '.join([pipes.quote(f) for f in <br>
>>>> self.cxx.link_flags])<br>
>>>> -        all_flags = '%s %s %s' % (flags_str, compile_flags_str, <br>
>>>> link_flags_str)<br>
>>>> -        sub.append(('%{flags}', flags_str))<br>
>>>> -        sub.append(('%{compile_flags}', compile_flags_str))<br>
>>>> -        sub.append(('%{link_flags}', link_flags_str))<br>
>>>> +        sub.append(('%{flags}',         ' '.join(map(pipes.quote, <br>
>>>> self.cxx.flags))))<br>
>>>> +        sub.append(('%{compile_flags}', ' '.join(map(pipes.quote, <br>
>>>> self.cxx.compile_flags))))<br>
>>>> +        sub.append(('%{link_flags}',    ' '.join(map(pipes.quote, <br>
>>>> self.cxx.link_flags))))<br>
>>>>        if self.cxx.isVerifySupported():<br>
>>>> -            verify_str = ' ' + ' '.join(self.cxx.verify_flags) + ' '<br>
>>>> -            sub.append(('%{verify}', verify_str))<br>
>>>> -        # Add compile and link shortcuts<br>
>>>> -        compile_str = (cxx_path + ' -o %t.o %s -c ' + flags_str<br>
>>>> -                       + ' ' + compile_flags_str)<br>
>>>> -        build_str = cxx_path + ' -o %t.exe %s ' + all_flags<br>
>>>> +            sub.append(('%{verify}', ' '.join(self.cxx.verify_flags)))<br>
>>>> +        # Add compile and build shortcuts<br>
>>>> +        sub.append(('%{compile}', '%{cxx} -o %t.o %s -c %{flags} <br>
>>>> %{compile_flags}'))<br>
>>>> +        sub.append(('%{build}',   '%{cxx} -o %t.exe %s %{flags} <br>
>>>> %{compile_flags} %{link_flags}'))<br>
>>>>        if self.cxx.use_modules:<br>
>>>> -            sub.append(('%{build_module}', build_str))<br>
>>>> +            sub.append(('%{build_module}', '%{build}'))<br>
>>>>        elif self.cxx.modules_flags is not None:<br>
>>>> -            modules_str = ' '.join(self.cxx.modules_flags) + ' '<br>
>>>> -            sub.append(('%{build_module}', build_str + ' ' + <br>
>>>> modules_str))<br>
>>>> -        sub.append(('%{compile}', compile_str))<br>
>>>> -        sub.append(('%{build}', build_str))<br>
>>>> +            sub.append(('%{build_module}', '%{{build}} {}'.format(' <br>
>>>> '.join(self.cxx.modules_flags))))<br>
>>>> +<br>
>>>>        # Configure exec prefix substitutions.<br>
>>>>        # Configure run env substitution.<br>
>>>>        codesign_ident = self.get_lit_conf('llvm_codesign_identity', <br>
>>>> '')<br>
>>>> @@ -1077,13 +1068,11 @@ def configure_substitutions(self):<br>
>>>>                  '--dependencies %%file_dependencies --env %s -- ' %  <br>
>>>> \<br>
>>>>            (pipes.quote(sys.executable), pipes.quote(run_py),<br>
>>>>             codesign_ident, env_vars)<br>
>>>> -        run_str = exec_str + '%t.exe'<br>
>>>>        sub.append(('%{exec}', exec_str))<br>
>>>> -        sub.append(('%{run}', run_str))<br>
>>>> +        sub.append(('%{run}', '%{exec} %t.exe'))<br>
>>>>        # Configure not program substitutions<br>
>>>>        not_py = os.path.join(self.libcxx_src_root, 'utils', 'not.py')<br>
>>>> -        not_str = '%s %s ' % (pipes.quote(sys.executable), <br>
>>>> pipes.quote(not_py))<br>
>>>> -        sub.append(('%{not} ', not_str))<br>
>>>> +        sub.append(('%{not}', '{} <br>
>>>> {}'.format(pipes.quote(sys.executable), pipes.quote(not_py))))<br>
>>>>        if self.get_lit_conf('libcxx_gdb'):<br>
>>>>            sub.append(('%{libcxx_gdb}', <br>
>>>> self.get_lit_conf('libcxx_gdb')))<br>
>>>> <br>
>>>> <br>
>>>> diff  --git a/libcxx/utils/libcxx/test/format.py <br>
>>>> b/libcxx/utils/libcxx/test/format.py<br>
>>>> index 2776af182f71..b5046aba1ca4 100644<br>
>>>> --- a/libcxx/utils/libcxx/test/format.py<br>
>>>> +++ b/libcxx/utils/libcxx/test/format.py<br>
>>>> @@ -124,7 +124,8 @@ def _execute(self, test, lit_config):<br>
>>>>        substitutions = lit.TestRunner.getDefaultSubstitutions(test, <br>
>>>> tmpDir,<br>
>>>>                                                               tmpBase)<br>
>>>>        substitutions.append(('%file_dependencies', ' <br>
>>>> '.join(data_files)))<br>
>>>> -        script = lit.TestRunner.applySubstitutions(script, <br>
>>>> substitutions)<br>
>>>> +        script = lit.TestRunner.applySubstitutions(script, <br>
>>>> substitutions,<br>
>>>> +                                                   <br>
>>>> recursion_limit=lit_config.recursiveExpansionLimit)<br>
>>>> <br>
>>>>        test_cxx = copy.deepcopy(self.cxx)<br>
>>>>        if is_fail_test:<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> _______________________________________________<br>
>>>> libcxx-commits mailing list<br>
>>>> <a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a><br>
>>>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits</a><br>
>>>> <br>
>> <br>
>> <br>
<br>
</blockquote></div>
</div></blockquote></div><br></div></blockquote></div>