GTEST_SKIP() does not return and causes early test exit, which
skips any following cleanup logic.
In this case, the test skipped before releasing my_lock, causing
pthread_mutex_destroy() to fail with EBUSY and trigger a ceph_assert()
in the mutex debug wrapper.
Fix by explicitly unlocking the mutex before calling GTEST_SKIP().
Signed-off-by: Nitzan Mordechai <nmordech@ibm.com>
(cherry picked from commit
26e7bbf68142419d9e2991099e42853c1a7339b4)
ASSERT_EQ(0, info->c->wait_for_complete());
}
int r = info->c->get_return_value();
- cout << "finish " << i << " r = " << r << std::endl;
+ //cout << "finish " << i << " r = " << r << std::endl;
std::scoped_lock l(my_lock);
inflight.erase(i);
}
if (!missed_eio) {
- GTEST_SKIP() << "eio flag missed all ios that already completed";
my_lock.unlock();
+ GTEST_SKIP() << "eio flag missed all ios that already completed";
}
cout << "max_success " << max_success << ", min_failed " << min_failed << std::endl;
ASSERT_TRUE(max_success + 1 == min_failed);