]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: fix FTBFS of unittest_seastar_perfcounters on arm64 25647/head
authorKefu Chai <kchai@redhat.com>
Thu, 20 Dec 2018 10:49:43 +0000 (18:49 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 20 Dec 2018 10:50:17 +0000 (18:50 +0800)
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 <kchai@redhat.com>
src/test/crimson/test_perfcounters.cc

index da8cc8f31da67c01e84a29fb0bfae44779314b06..d5c8bb8bb684a09ae7cdcb78d80128704c7e1521 100644 (file)
@@ -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");
+           }
         }
       });
     });