The do_mon_command() method was calling the mocked mon_command() which
has a default action that calls do_mon_command(), creating an infinite
recursion that caused a segmentation fault due to stack overflow.
Fixed by calling TestRadosClient::mon_command() (the base class
implementation) instead of the mocked version.
This resolves the segfault in unittest_librbd when running the
run-rbd-unit-tests.sh script.
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
int do_mon_command(const std::vector<std::string>& cmd,
const bufferlist &inbl, bufferlist *outbl,
std::string *outs) {
- return mon_command(cmd, inbl, outbl, outs);
+ return TestRadosClient::mon_command(cmd, inbl, outbl, outs);
}
MOCK_METHOD0(wait_for_latest_osd_map, int());