[compiler-rt] r260230 - [msan] Run the tests for each supported arch and suffix each one to distinguish them.

Evgenii Stepanov via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 16:26:50 PST 2016


This is strange. I've started a clean build on cmake-aarch64-42vma,
but it still does not run the MSan tests.


On Fri, Feb 12, 2016 at 9:06 AM, Daniel Sanders
<Daniel.Sanders at imgtec.com> wrote:
> At this point, the fix has been re-committed (r260679) with a fix for the cmake-aarch64-42vma problem. It's not clear what exactly caused that since no tests are running the '-default' suffix which I had hoped would narrow it down.
>
> This has improved matters but has not completely resolved the problem. My X86_64 machine is running both ThreadSanitizer-Unit and MemorySanitizer-Unit during check-tsan and check-msan. However, cmake-aarch64-42vma only seems to be running ThreadSanitizer-Unit during check-all.
>
> Would you like me to revert the tsan and msan changes (r260679, r260230, and  r259512)? Or just the msan ones (r260230, and part of r260679)?
>
>> -----Original Message-----
>> From: Daniel Sanders
>> Sent: 12 February 2016 12:16
>> To: Evgenii Stepanov; Alexey Samsonov; Renato Golin
>> (renato.golin at linaro.org)
>> Cc: llvm-commits at lists.llvm.org
>> Subject: RE: [compiler-rt] r260230 - [msan] Run the tests for each supported
>> arch and suffix each one to distinguish them.
>>
>> I've had to revert this fix because of http://lab.llvm.org:8011/builders/clang-
>> cmake-aarch64-42vma/builds/5879. There's no obvious reason it should fail in
>> the way it does but it's the only commit on the blamelist. I suspect stale
>> lit*.cfg's from previous builds at the moment.
>>
>> > -----Original Message-----
>> > From: Daniel Sanders
>> > Sent: 12 February 2016 10:44
>> > To: Evgenii Stepanov; Alexey Samsonov
>> > Cc: llvm-commits at lists.llvm.org
>> > Subject: RE: [compiler-rt] r260230 - [msan] Run the tests for each
>> supported
>> > arch and suffix each one to distinguish them.
>> >
>> > Hi Evgenii,
>> >
>> > I see what the problem is. The previous code was relying on lit's testsuite
>> > discovery to find the unit tests. Now that the main tests are in a
>> subdirectory
>> > it doesn't find the unit tests.
>> > I've fixed msan and tsan in r260669. lsan and dfsan don't seem to have unit
>> > tests and sanitizer_common is already running its unit tests so those three
>> > don't need to be fixed.
>> >
>> > Sorry for not noticing this.
>> > ________________________________________
>> > From: Evgenii Stepanov [eugeni.stepanov at gmail.com]
>> > Sent: 11 February 2016 21:57
>> > To: Alexey Samsonov
>> > Cc: Daniel Sanders; llvm-commits at lists.llvm.org
>> > Subject: Re: [compiler-rt] r260230 - [msan] Run the tests for each
>> supported
>> > arch and suffix each one to distinguish them.
>> >
>> > Hi,
>> >
>> > I don't know what's going on and if the problem is in this CL yet, but
>> > on x86_64 Linux msan_test.cc is no longer run as part of "check-msan"
>> > target.
>> >
>> > On Wed, Feb 10, 2016 at 3:59 PM, Alexey Samsonov via llvm-commits
>> > <llvm-commits at lists.llvm.org> wrote:
>> > >
>> > > On Wed, Feb 10, 2016 at 2:46 AM, Daniel Sanders
>> > <Daniel.Sanders at imgtec.com>
>> > > wrote:
>> > >>
>> > >> It works well enough for the 3.8 release. It marks the test unsupported
>> > >> for all supported targets if any of them is mips64. This means it will
>> > >> incorrectly mark mips (32-bit) unsupported as well but this is ok because
>> > >> the whole of msan is unsupported for mips (32-bit) at the moment.
>> > >>
>> > >>
>> > >>
>> > >> I'll commit the 'UNSUPPORTED:mips64-supported-target' to the branch
>> > since
>> > >> that seems like the obvious thing to do and is a safer bet than merging
>> this
>> > >> and D17045 this late in the release process.
>> > >
>> > >
>> > > Sounds good, thanks!
>> > >
>> > >>
>> > >>
>> > >>
>> > >> Thanks
>> > >>
>> > >>
>> > >>
>> > >> From: Alexey Samsonov [mailto:vonosmas at gmail.com]
>> > >> Sent: 10 February 2016 01:01
>> > >> To: Daniel Sanders
>> > >> Cc: llvm-commits at lists.llvm.org; Hans Wennborg
>> > >> Subject: Re: [compiler-rt] r260230 - [msan] Run the tests for each
>> > >> supported arch and suffix each one to distinguish them.
>> > >>
>> > >>
>> > >>
>> > >> I'm curious if you can use a simpler workaround to disable this test in
>> > >> the release branch: will adding
>> > >>
>> > >> UNSUPPORTED:mips64-supported-target
>> > >>
>> > >> work there?
>> > >>
>> > >>
>> > >>
>> > >> (I agree that http://reviews.llvm.org/D17045 is cleaner fix).
>> > >>
>> > >>
>> > >>
>> > >> On Tue, Feb 9, 2016 at 3:15 PM, Daniel Sanders
>> > <Daniel.Sanders at imgtec.com>
>> > >> wrote:
>> > >>
>> > >> Hi,
>> > >>
>> > >> Is it ok to merge this to the 3.8 release? It turns out I need part of it
>> > >> (specifically the ${arch} variable from the loop) to fix the hanging test on
>> > >> our big-endian target (see http://reviews.llvm.org/D17045).
>> > >>
>> > >> ________________________________________
>> > >> From: llvm-commits [llvm-commits-bounces at lists.llvm.org] on behalf of
>> > >> Daniel Sanders via llvm-commits [llvm-commits at lists.llvm.org]
>> > >> Sent: 09 February 2016 16:18
>> > >> To: llvm-commits at lists.llvm.org
>> > >> Subject: [compiler-rt] r260230 - [msan] Run the tests for each supported
>> > >> arch and suffix each one to distinguish them.
>> > >>
>> > >>
>> > >> Author: dsanders
>> > >> Date: Tue Feb  9 10:18:15 2016
>> > >> New Revision: 260230
>> > >>
>> > >> URL: http://llvm.org/viewvc/llvm-project?rev=260230&view=rev
>> > >> Log:
>> > >> [msan] Run the tests for each supported arch and suffix each one to
>> > >> distinguish them.
>> > >>
>> > >> Summary:
>> > >> Previously, the tests only ran for the 64-bit equivalent of the default
>> > >> target
>> > >> (see -m64).
>> > >> Given the supported architecture list only contains 64-bit targets, this
>> > >> happens
>> > >> to work out the same as the supported targets in most cases but may
>> > matter
>> > >> for
>> > >> X86_64/X86_64h on Darwin.
>> > >>
>> > >> For other targets, the practical effect is that the test names contain the
>> > >> architecture. This resolves some confusion when msan tests fail since
>> > >> their
>> > >> name no longer implies that they are trying to test the default target.
>> > >>
>> > >> Reviewers: samsonov
>> > >>
>> > >> Subscribers: tberghammer, danalbert, srhines, llvm-commits
>> > >>
>> > >> Differential Revision: http://reviews.llvm.org/D16855
>> > >>
>> > >> Modified:
>> > >>     compiler-rt/trunk/test/msan/CMakeLists.txt
>> > >>     compiler-rt/trunk/test/msan/lit.cfg
>> > >>     compiler-rt/trunk/test/msan/lit.site.cfg.in
>> > >>
>> > >> Modified: compiler-rt/trunk/test/msan/CMakeLists.txt
>> > >> URL:
>> > >> http://llvm.org/viewvc/llvm-project/compiler-
>> >
>> rt/trunk/test/msan/CMakeLists.txt?rev=260230&r1=260229&r2=260230&vie
>> > w=diff
>> > >>
>> > >>
>> >
>> ==========================================================
>> > ====================
>> > >> --- compiler-rt/trunk/test/msan/CMakeLists.txt (original)
>> > >> +++ compiler-rt/trunk/test/msan/CMakeLists.txt Tue Feb  9 10:18:15
>> 2016
>> > >> @@ -1,8 +1,32 @@
>> > >>  set(MSAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
>> > >>
>> > >> -configure_lit_site_cfg(
>> > >> -  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
>> > >> -  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
>> > >> +set(MSAN_TESTSUITES)
>> > >> +
>> > >> +set(MSAN_TEST_ARCH ${MSAN_SUPPORTED_ARCH})
>> > >> +if(APPLE)
>> > >> +  darwin_filter_host_archs(MSAN_SUPPORTED_ARCH
>> > MSAN_TEST_ARCH)
>> > >> +endif()
>> > >> +
>> > >> +foreach(arch ${MSAN_TEST_ARCH})
>> > >> +  string(TOLOWER "-${arch}" MSAN_TEST_CONFIG_SUFFIX)
>> > >> +  if(ANDROID OR ${arch} MATCHES "arm|aarch64")
>> > >> +    # This is only true if we are cross-compiling.
>> > >> +    # Build all tests with host compiler and use host tools.
>> > >> +    set(MSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
>> > >> +    set(MSAN_TEST_TARGET_CFLAGS
>> > ${COMPILER_RT_TEST_COMPILER_CFLAGS})
>> > >> +  else()
>> > >> +    get_target_flags_for_arch(${arch} MSAN_TEST_TARGET_CFLAGS)
>> > >> +    string(REPLACE ";" " " MSAN_TEST_TARGET_CFLAGS
>> > >> "${MSAN_TEST_TARGET_CFLAGS}")
>> > >> +  endif()
>> > >> +
>> > >> +  string(TOUPPER ${arch} ARCH_UPPER_CASE)
>> > >> +  set(CONFIG_NAME ${ARCH_UPPER_CASE}Config)
>> > >> +
>> > >> +  configure_lit_site_cfg(
>> > >> +    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
>> > >> +    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg)
>> > >> +  list(APPEND MSAN_TESTSUITES
>> > ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
>> > >> +endforeach()
>> > >>
>> > >>  set(MSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
>> > >>  if(NOT COMPILER_RT_STANDALONE_BUILD)
>> > >> @@ -17,7 +41,7 @@ if(COMPILER_RT_INCLUDE_TESTS AND COMPILE
>> > >>  endif()
>> > >>
>> > >>  add_lit_testsuite(check-msan "Running the MemorySanitizer tests"
>> > >> -  ${CMAKE_CURRENT_BINARY_DIR}
>> > >> +  ${MSAN_TESTSUITES}
>> > >>    DEPENDS ${MSAN_TEST_DEPS}
>> > >>    )
>> > >>  set_target_properties(check-msan PROPERTIES FOLDER "MSan tests")
>> > >>
>> > >> Modified: compiler-rt/trunk/test/msan/lit.cfg
>> > >> URL:
>> > >> http://llvm.org/viewvc/llvm-project/compiler-
>> > rt/trunk/test/msan/lit.cfg?rev=260230&r1=260229&r2=260230&view=diff
>> > >>
>> > >>
>> >
>> ==========================================================
>> > ====================
>> > >> --- compiler-rt/trunk/test/msan/lit.cfg (original)
>> > >> +++ compiler-rt/trunk/test/msan/lit.cfg Tue Feb  9 10:18:15 2016
>> > >> @@ -3,17 +3,18 @@
>> > >>  import os
>> > >>
>> > >>  # Setup config name.
>> > >> -config.name = 'MemorySanitizer'
>> > >> +config.name = 'MemorySanitizer' + config.name_suffix
>> > >>
>> > >>  # Setup source root.
>> > >>  config.test_source_root = os.path.dirname(__file__)
>> > >>
>> > >>  # Setup default compiler flags used with -fsanitize=memory option.
>> > >> -clang_msan_cflags = ["-fsanitize=memory",
>> > >> -                     "-mno-omit-leaf-frame-pointer",
>> > >> -                     "-fno-omit-frame-pointer",
>> > >> -                     "-fno-optimize-sibling-calls",
>> > >> -                     "-m64"] + config.debug_info_flags
>> > >> +clang_msan_cflags = (["-fsanitize=memory",
>> > >> +                      "-mno-omit-leaf-frame-pointer",
>> > >> +                      "-fno-omit-frame-pointer",
>> > >> +                      "-fno-optimize-sibling-calls"] +
>> > >> +                      [config.target_cflags] +
>> > >> +                      config.debug_info_flags)
>> > >>  # Some Msan tests leverage backtrace() which requires libexecinfo on
>> > >> FreeBSD.
>> > >>  if config.host_os == 'FreeBSD':
>> > >>    clang_msan_cflags += ["-lexecinfo"]
>> > >>
>> > >> Modified: compiler-rt/trunk/test/msan/lit.site.cfg.in
>> > >> URL:
>> > >> http://llvm.org/viewvc/llvm-project/compiler-
>> >
>> rt/trunk/test/msan/lit.site.cfg.in?rev=260230&r1=260229&r2=260230&view=
>> > diff
>> > >>
>> > >>
>> >
>> ==========================================================
>> > ====================
>> > >> --- compiler-rt/trunk/test/msan/lit.site.cfg.in (original)
>> > >> +++ compiler-rt/trunk/test/msan/lit.site.cfg.in Tue Feb  9 10:18:15 2016
>> > >> @@ -1,5 +1,11 @@
>> > >> +## Autogenerated by LLVM/Clang configuration.
>> > >> +# Do not edit!
>> > >> +
>> > >>  # Load common config for all compiler-rt lit tests.
>> > >>  lit_config.load_config(config,
>> > >> "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
>> > >>
>> > >> +# Tool-specific config options.
>> > >> +config.name_suffix = "@MSAN_TEST_CONFIG_SUFFIX@"
>> > >> +config.target_cflags = "@MSAN_TEST_TARGET_CFLAGS@"
>> > >>  # Load tool-specific config that would do the real work.
>> > >>  lit_config.load_config(config, "@MSAN_LIT_SOURCE_DIR@/lit.cfg")
>> > >>
>> > >>
>> > >> _______________________________________________
>> > >> llvm-commits mailing list
>> > >> llvm-commits at lists.llvm.org
>> > >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>> > >>
>> > >>
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >>
>> > >> Alexey Samsonov
>> > >> vonosmas at gmail.com
>> > >
>> > >
>> > >
>> > >
>> > > --
>> > > Alexey Samsonov
>> > > vonosmas at gmail.com
>> > >
>> > > _______________________________________________
>> > > llvm-commits mailing list
>> > > llvm-commits at lists.llvm.org
>> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>> > >


More information about the llvm-commits mailing list