Skip to content

BenchmarkFilters: fix termination on bench error

closes: #540 (closed)

As noted in https://github.com/google/benchmark/pull/938 in older Google Benchmark versions, when state.SkipWithError is used before the benchmark loop, the following assert error will be printed and the whole benchmark suite will exit.

src/benchmark_runner.cc:120: RunInThread: Check `st.iterations() >= st.max_iterations' failed. Benchmark returned before State::KeepRunning() returned false!

Note that the SkipWithError happens since some benchmarks needs specific cmd flags (such as --tetra)

This solve this issue by:

  1. Simply removing the return after a state.SkipWithError, this has no side effect since it will exit as soon as it enters the benchmark loop.
  2. Fixing the issue (or feature) that triggers the SkipWithError by setting the right input per each of the benchmarks
Edited by Vicente Bolea

Merge request reports

Loading