[libcxx-commits] [libcxx] cd7f975 - [libc++] NFC: Simplify substitutions by using lit recursive substitutions

David Zarzycki via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 28 18:49:38 PDT 2020


Hi Louis,

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?

Dave


[0+1] Running all regression tests
llvm-lit: /home/dave/s/lp/libcxxabi/test/lit.cfg:58: note: Using configuration variant: libcxxabi
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:322: note: inferred use_system_cxx_lib as: None
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:349: note: inferred use_clang_verify as: True
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:359: note: enabling thread-safety annotations
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:542: note: inferred language dialect as: c++2a
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.
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.
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.
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.
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.
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:438: note: inferred long_tests as: True
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:158: note: Using compiler: /usr/bin/clang++
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:159: note: Using flags: ['-v']
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"']
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']
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']
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']
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'}
llvm-lit: /home/dave/s/lp/libcxx/test/lit.cfg:46: note: Using configuration variant: libcxx
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:322: note: inferred use_system_cxx_lib as: None
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:349: note: inferred use_clang_verify as: True
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:359: note: enabling thread-safety annotations
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:542: note: inferred language dialect as: c++2a
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.
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.
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.
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.
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.
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:438: note: inferred long_tests as: True
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:158: note: Using compiler: /usr/bin/clang++
llvm-lit: /home/dave/s/lp/libcxx/utils/libcxx/test/config.py:159: note: Using flags: ['-v']
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"']
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']
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']
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']
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'}
llvm-lit: /home/dave/s/lp/llvm/utils/lit/lit/llvm/config.py:342: note: using clang: /tmp/_update_lc/r/bin/clang
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
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
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
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
FAIL: Clang :: Driver/cl-response-file.c (9973 of 62557)
******************** TEST 'Clang :: Driver/cl-response-file.c' FAILED ********************
Script:
--
: '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
: '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
--
Exit Code: 1

Command Output (stderr):
--
/home/dave/s/lp/clang/test/Driver/cl-response-file.c:10:11: error: CHECK: expected string not found in input
// CHECK: "-I" "{{.*}}\\Inputs\\cl-response-file\\" "-D" "FOO=2"
          ^
<stdin>:1:1: note: scanning from here
clang version 11.0.0 (https://github.com/llvm/llvm-project.git ba2e72c54ec998123ae1bc001cb782449fafc924)
^
<stdin>:5:1093: note: possible intended match here
 "/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"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^

--

********************
FAIL: LLVM :: Linker/2003-01-30-LinkerTypeRename.ll (40196 of 62557)
******************** TEST 'LLVM :: Linker/2003-01-30-LinkerTypeRename.ll' FAILED ********************
Script:
--
: '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
: '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
: '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
--
Exit Code: 1

Command Output (stderr):
--
/tmp/_update_lc/r/bin/llvm-as: <stdin>:1:1: error: expected top-level entity
/tmp/_update_lc/r/test/Linker/Outputy = type opaque @GV = external global /tmp/_update_lc/r/test/Linker/Outputy*
^

--

********************
FAIL: LLVM :: Linker/2003-06-02-TypeResolveProblem2.ll (40198 of 62557)
******************** TEST 'LLVM :: Linker/2003-06-02-TypeResolveProblem2.ll' FAILED ********************
Script:
--
: '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
: '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
: '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
--
Exit Code: 1

Command Output (stderr):
--
/tmp/_update_lc/r/bin/llvm-as: <stdin>:1:1: error: expected top-level entity
/tmp/_update_lc/r/test/Linker/Output = type i32
^

--

********************
FAIL: LLVM :: Linker/2003-04-26-NullPtrLinkProblem.ll (40204 of 62557)
******************** TEST 'LLVM :: Linker/2003-04-26-NullPtrLinkProblem.ll' FAILED ********************
Script:
--
: 'RUN: at line 7';   printf "\x00" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats
: '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
: '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
: '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
: '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
: '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
: '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
: '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
: '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
: 'RUN: at line 17';   printf "\x00" >> /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.stats
: '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
: '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
: '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
: '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
: '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
: '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
: '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
: '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
: 'RUN: at line 30';   mkdir -p /tmp/_update_lc/r/test/tools/sanstats/Output/elf.test.tmp.dir
: '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
: '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
: '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
: '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
--
Exit Code: 1

Command Output (stderr):
--
/home/dave/s/lp/llvm/test/tools/sanstats/elf.test:38:10: error: CHECK: expected string not found in input
# CHECK: 0x0000000000000000 /tmp{{[/\\]}}f.c:1 f1 cfi-vcall 1
         ^
<stdin>:1:1: note: scanning from here
<error> The file was not recognized as a valid object file
^
<stdin>:6:1: note: possible intended match here
0x0000000000000010 <invalid>:0 <invalid> cfi-icall 5
^

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

10 warning(s) in tests

Testing Time: 148.87s
********************
Failing Tests (8):
    Clang :: Driver/cl-response-file.c
    LLVM :: Linker/2003-01-30-LinkerTypeRename.ll
    LLVM :: Linker/2003-04-26-NullPtrLinkProblem.ll
    LLVM :: Linker/2003-06-02-TypeResolveProblem.ll
    LLVM :: Linker/2003-06-02-TypeResolveProblem2.ll
    LLVM :: Linker/2003-08-23-GlobalVarLinking.ll
    LLVM :: Linker/2003-11-18-TypeResolution.ll
    LLVM :: tools/sanstats/elf.test

  Expected Passes    : 45131
  Expected Failures  : 114
  Unsupported Tests  : 17282
  Unexpected Failures: 8
FAILED: CMakeFiles/check-all




On Fri, Mar 27, 2020, at 11:09 AM, Louis Dionne via libcxx-commits wrote:
> 
> Author: Louis Dionne
> Date: 2020-03-27T11:09:08-04:00
> New Revision: cd7f9751c30092033a5e97591876f972daf61989
> 
> URL: 
> https://github.com/llvm/llvm-project/commit/cd7f9751c30092033a5e97591876f972daf61989
> DIFF: 
> https://github.com/llvm/llvm-project/commit/cd7f9751c30092033a5e97591876f972daf61989.diff
> 
> LOG: [libc++] NFC: Simplify substitutions by using lit recursive substitutions
> 
> Since lit supports expanding substitutions recursively, we can define
> substitutions in terms of other substitutions. This allows us to simplify
> how libc++ substitutions are defined.
> 
> This doesn't change the substitutions at all, it only makes them simpler
> to define.
> 
> Added: 
>     
> 
> Modified: 
>     libcxx/test/lit.cfg
>     libcxx/utils/libcxx/test/config.py
>     libcxx/utils/libcxx/test/format.py
> 
> Removed: 
>     
> 
> 
> ################################################################################
> diff  --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg
> index ed5aa29d9175..e6e0542c2fbe 100644
> --- a/libcxx/test/lit.cfg
> +++ b/libcxx/test/lit.cfg
> @@ -53,3 +53,5 @@ configuration = 
> config_module.Configuration(lit_config, config)
>  configuration.configure()
>  configuration.print_config_info()
>  config.test_format = configuration.get_test_format()
> +
> +lit_config.recursiveExpansionLimit = 10
> 
> diff  --git a/libcxx/utils/libcxx/test/config.py 
> b/libcxx/utils/libcxx/test/config.py
> index 2d0c3deadbc3..66e60cd75cf3 100644
> --- a/libcxx/utils/libcxx/test/config.py
> +++ b/libcxx/utils/libcxx/test/config.py
> @@ -1039,35 +1039,26 @@ def configure_substitutions(self):
>          if self.target_info.is_darwin():
>              # Do not pass DYLD_LIBRARY_PATH to the compiler, linker, 
> etc. as
>              # these tools are not meant to exercise the just-built 
> libraries.
> -            tool_env += 'env DYLD_LIBRARY_PATH="" '
> +            tool_env += 'env DYLD_LIBRARY_PATH=""'
>  
>          sub = self.config.substitutions
> -        cxx_path = tool_env + pipes.quote(self.cxx.path)
>          # Configure compiler substitutions
> -        sub.append(('%{cxx}', cxx_path))
> +        sub.append(('%{cxx}', '{} {}'.format(tool_env, 
> pipes.quote(self.cxx.path))))
>          sub.append(('%{libcxx_src_root}', self.libcxx_src_root))
>          # Configure flags substitutions
> -        flags_str = ' '.join([pipes.quote(f) for f in self.cxx.flags])
> -        compile_flags_str = ' '.join([pipes.quote(f) for f in 
> self.cxx.compile_flags])
> -        link_flags_str = ' '.join([pipes.quote(f) for f in 
> self.cxx.link_flags])
> -        all_flags = '%s %s %s' % (flags_str, compile_flags_str, 
> link_flags_str)
> -        sub.append(('%{flags}', flags_str))
> -        sub.append(('%{compile_flags}', compile_flags_str))
> -        sub.append(('%{link_flags}', link_flags_str))
> +        sub.append(('%{flags}',         ' '.join(map(pipes.quote, 
> self.cxx.flags))))
> +        sub.append(('%{compile_flags}', ' '.join(map(pipes.quote, 
> self.cxx.compile_flags))))
> +        sub.append(('%{link_flags}',    ' '.join(map(pipes.quote, 
> self.cxx.link_flags))))
>          if self.cxx.isVerifySupported():
> -            verify_str = ' ' + ' '.join(self.cxx.verify_flags) + ' '
> -            sub.append(('%{verify}', verify_str))
> -        # Add compile and link shortcuts
> -        compile_str = (cxx_path + ' -o %t.o %s -c ' + flags_str
> -                       + ' ' + compile_flags_str)
> -        build_str = cxx_path + ' -o %t.exe %s ' + all_flags
> +            sub.append(('%{verify}', ' '.join(self.cxx.verify_flags)))
> +        # Add compile and build shortcuts
> +        sub.append(('%{compile}', '%{cxx} -o %t.o %s -c %{flags} 
> %{compile_flags}'))
> +        sub.append(('%{build}',   '%{cxx} -o %t.exe %s %{flags} 
> %{compile_flags} %{link_flags}'))
>          if self.cxx.use_modules:
> -            sub.append(('%{build_module}', build_str))
> +            sub.append(('%{build_module}', '%{build}'))
>          elif self.cxx.modules_flags is not None:
> -            modules_str = ' '.join(self.cxx.modules_flags) + ' '
> -            sub.append(('%{build_module}', build_str + ' ' + 
> modules_str))
> -        sub.append(('%{compile}', compile_str))
> -        sub.append(('%{build}', build_str))
> +            sub.append(('%{build_module}', '%{{build}} {}'.format(' 
> '.join(self.cxx.modules_flags))))
> +
>          # Configure exec prefix substitutions.
>          # Configure run env substitution.
>          codesign_ident = self.get_lit_conf('llvm_codesign_identity', 
> '')
> @@ -1077,13 +1068,11 @@ def configure_substitutions(self):
>                    '--dependencies %%file_dependencies --env %s -- ' %  
> \
>              (pipes.quote(sys.executable), pipes.quote(run_py),
>               codesign_ident, env_vars)
> -        run_str = exec_str + '%t.exe'
>          sub.append(('%{exec}', exec_str))
> -        sub.append(('%{run}', run_str))
> +        sub.append(('%{run}', '%{exec} %t.exe'))
>          # Configure not program substitutions
>          not_py = os.path.join(self.libcxx_src_root, 'utils', 'not.py')
> -        not_str = '%s %s ' % (pipes.quote(sys.executable), 
> pipes.quote(not_py))
> -        sub.append(('%{not} ', not_str))
> +        sub.append(('%{not}', '{} 
> {}'.format(pipes.quote(sys.executable), pipes.quote(not_py))))
>          if self.get_lit_conf('libcxx_gdb'):
>              sub.append(('%{libcxx_gdb}', 
> self.get_lit_conf('libcxx_gdb')))
>  
> 
> diff  --git a/libcxx/utils/libcxx/test/format.py 
> b/libcxx/utils/libcxx/test/format.py
> index 2776af182f71..b5046aba1ca4 100644
> --- a/libcxx/utils/libcxx/test/format.py
> +++ b/libcxx/utils/libcxx/test/format.py
> @@ -124,7 +124,8 @@ def _execute(self, test, lit_config):
>          substitutions = lit.TestRunner.getDefaultSubstitutions(test, 
> tmpDir,
>                                                                 tmpBase)
>          substitutions.append(('%file_dependencies', ' 
> '.join(data_files)))
> -        script = lit.TestRunner.applySubstitutions(script, 
> substitutions)
> +        script = lit.TestRunner.applySubstitutions(script, 
> substitutions,
> +                                                   
> recursion_limit=lit_config.recursiveExpansionLimit)
>  
>          test_cxx = copy.deepcopy(self.cxx)
>          if is_fail_test:
> 
> 
>         
> _______________________________________________
> libcxx-commits mailing list
> libcxx-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits
>


More information about the libcxx-commits mailing list