Commit 22767526 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[1186] Tests are now working on OS X.

parent 54ba29f0
......@@ -71,9 +71,11 @@ TEST_F(IfaceMgrTest, loDetect) {
NakedIfaceMgr * ifacemgr = new NakedIfaceMgr();
IOAddress loAddr("::1");
IOAddress mcastAddr("ff02::1:2");
// bind multicast socket to port 10547
int socket1 = ifacemgr->openSocket("lo", loAddr, 10547);
int socket1 = ifacemgr->openSocket("lo", mcastAddr, 10547);
// this fails on BSD (there's no lo interface there)
// poor man's interface dection
// it will go away as soon as proper interface detection
......@@ -82,7 +84,8 @@ TEST_F(IfaceMgrTest, loDetect) {
cout << "This is Linux, using lo as loopback." << endl;
close(socket1);
} else {
socket1 = ifacemgr->openSocket("lo0", loAddr, 10547);
// this fails on Linux and succeeds on BSD
socket1 = ifacemgr->openSocket("lo0", mcastAddr, 10547);
if (socket1>0) {
sprintf(LOOPBACK, "lo0");
cout << "This is BSD, using lo0 as loopback." << endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment