Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tests using testing::ValuesIn fail to compile with --config=asan #1449

Open
hzeller opened this issue May 31, 2024 · 0 comments
Open

Some tests using testing::ValuesIn fail to compile with --config=asan #1449

hzeller opened this issue May 31, 2024 · 0 comments
Labels
build Related to build flow, build system, or build macros

Comments

@hzeller
Copy link
Member

hzeller commented May 31, 2024

Currently, --config=asan builds fail to compile for some tests

bazel test --config=asan --keep_going //xls/codegen:block_generator_test //xls/codegen:combinational_generator_test //xls/codegen:finite_state_machine_test //xls/codegen:module_builder_test //xls/codegen:pipeline_generator_test

Interestingly, with regular compile, they work, but with asan, they all have compile-issues with gtest which show up as:

xls/codegen/block_generator_test.cc:1680:22: error: no matching function for call to 'ValuesIn'
 1680 |     testing::Combine(testing::ValuesIn(kDefaultSimulationTargets),
      |                      ^~~~~~~~~~~~~~~~~
external/com_google_googletest/googletest/include/gtest/gtest-param-test.h:508:32: note: expanded from macro 'INSTANTIATE_TEST_SUITE_P'
  508 |       auto t = std::make_tuple(__VA_ARGS__);                                 \
      |                                ^~~~~~~~~~~
external/com_google_googletest/googletest/include/gtest/gtest-param-test.h:304:29: note: candidate template ignored: substitution failure [with T = SimulationTarget, N = 0]
  304 | internal::ParamGenerator<T> ValuesIn(const T (&array)[N]) {
      |                             ^
external/com_google_googletest/googletest/include/gtest/gtest-param-test.h:309:58: note: candidate template ignored: substitution failure [with Container = SimulationTarget[0]]: type 'xls::verilog::SimulationTarget[0]' cannot be used prior to '::' because it has no members
  309 | internal::ParamGenerator<typename Container::value_type> ValuesIn(
      |                                   ~~~~~~~~~              ^
external/com_google_googletest/googletest/include/gtest/gtest-param-test.h:297:1: note: candidate function template not viable: requires 2 arguments, but 1 was provided
  297 | ValuesIn(ForwardIterator begin, ForwardIterator end) {

Maybe something already fixed up-stream in googletest (we're currently using latest released, but maybe we can try latest git hash).

Observed while looking at feasibility of #1447

@hzeller hzeller changed the title Some tests fail to compile with --config=asan Some tests using testing::ValuesIn fail to compile with --config=asan May 31, 2024
@proppy proppy added the build Related to build flow, build system, or build macros label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to build flow, build system, or build macros
Projects
None yet
Development

No branches or pull requests

2 participants