From: Kefu Chai Date: Thu, 20 Dec 2018 10:49:43 +0000 (+0800) Subject: test/crimson: fix FTBFS of unittest_seastar_perfcounters on arm64 X-Git-Tag: v14.1.0~575^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F25647%2Fhead;p=ceph.git test/crimson: fix FTBFS of unittest_seastar_perfcounters on arm64 this should address the GCC bug which causes following failure: /home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/test/crimson/test_perfcounters.cc:35:9: internal compiler error: in tsubst_decomp_names, at cp/pt.c:16537 for (const auto &[path, perf_counter_ref] : by_path) { ^~~ Signed-off-by: Kefu Chai --- diff --git a/src/test/crimson/test_perfcounters.cc b/src/test/crimson/test_perfcounters.cc index da8cc8f31da6..d5c8bb8bb684 100644 --- a/src/test/crimson/test_perfcounters.cc +++ b/src/test/crimson/test_perfcounters.cc @@ -31,12 +31,11 @@ static seastar::future<> test_perfcounters(){ }).then([]{ return ceph::common::sharded_perf_coll().invoke_on_all([] (auto& s){ auto pcc = s.get_perf_collection(); - pcc->with_counters([=](auto& by_path){ - for (const auto &[path, perf_counter_ref] : by_path) { - if (PERF_VAL != perf_counter_ref.perf_counters->get(PERFTEST_INDEX)) { - throw std::runtime_error("perf counter does not match"); - } - (void)path; // silence -Wunused-variable + pcc->with_counters([](auto& by_path){ + for (auto& perf_counter : by_path) { + if (PERF_VAL != perf_counter.second.perf_counters->get(PERFTEST_INDEX)) { + throw std::runtime_error("perf counter does not match"); + } } }); });