summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/util
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-04-14 19:00:28 +0200
committerTor Egge <Tor.Egge@broadpark.no>2020-04-14 19:34:21 +0200
commitc544baa7eae191a7413a3c6206b9284d9725411f (patch)
treef6a22897b133a7d5164b10fc2c78fa187d55f5ee /searchlib/src/tests/util
parentd8298478feb34ba096ee1452270a92f29f178439 (diff)
Adjust sigbus handler test for Darwin.
Diffstat (limited to 'searchlib/src/tests/util')
-rw-r--r--searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp b/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp
index 658ad17544a..e687eff3ca7 100644
--- a/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp
+++ b/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp
@@ -66,16 +66,22 @@ TEST("Test that sigbus handler can trap synthetic sigbus")
LOG_ABORT("Should never get here");
}
EXPECT_TRUE(sbh.fired());
+#ifdef __APPLE__
+ vespalib::string exp_state = "state=down ts=0.0 operation=sigbus errno=0 code=2 addr=0x0000000000000000\n";
+#else
+ vespalib::string exp_state = "state=down ts=0.0 operation=sigbus errno=0 code=0\n";
+#endif
{
vespalib::string act = readState(sf);
normalizeTimestamp(act);
- EXPECT_EQUAL("state=down ts=0.0 operation=sigbus errno=0 code=0\n",
- act);
+ normalizeAddr(act, nullptr);
+ EXPECT_EQUAL(exp_state, act);
}
{
- strvec exp({"state=down ts=0.0 operation=sigbus errno=0 code=0\n" });
+ strvec exp({exp_state});
std::vector<vespalib::string> act(readHistory("state.history"));
normalizeTimestamps(act);
+ normalizeAddrs(act, nullptr);
TEST_DO(assertHistory(exp, act));
}
}