You could do that, but it would require modifying the tests.
Currently,
SipSrvLookupTest runs a separate named process which listens on port
13253, and does not interact in any way with a "real" named on port
53.
Thats good.
What problem are you having with the test?
I see this in system log file
Sep 10 07:44:04 mac named[12319]: zone ./IN: NS '127.0.0.1' has no
address records (A or AAAA)
Sep 10 07:44:04 mac named[12319]: zone ./IN: _sip._udp.test10/SRV
'invalid.com' has no address records (A or AAAA)
Sep 10 07:44:04 mac named[12319]: zone ./IN: _sip._tcp.test11/SRV
'invalid.com' has no address records (A or AAAA)
Sep 10 07:44:04 mac named[12319]: zone ./IN: _sip._udp.test26/SRV
'c2.test25' is a CNAME (illegal)
Sep 10 07:44:04 mac named[12319]: zone ./IN: _sip._tcp.test27/SRV
'c2.test25' is a CNAME (illegal)
Sep 10 07:44:04 mac named[12319]: zone ./IN: _sip._udp.test27/SRV
'c2.test25' is a CNAME (illegal)
and this the result I'm getting from test cases
SipSrvLookup::servers("test4", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 5060, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 6, named 'test4'
Expected results were:
2.1.4.0:5060,1,0.174,1,UDP
Actual results were:
2.1.4.0:5060,1,11.758,1,UDP
SipSrvLookup::servers("test5", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test5.example.com', IP addr =
'2.1.5.0', port = 5999, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 7, named 'test5'
Expected results were:
2.1.5.0:5999,1,0.174,1,UDP
Actual results were:
2.1.5.0:5999,1,11.758,1,UDP
SipSrvLookup::servers("test6", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test6b.example.com', IP addr =
'2.1.6.1', port = 5067, weight = 1, score = 2.028461, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test6a.example.com', IP addr =
'2.1.6.0', port = 5066, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 8, named 'test6'
Expected results were:
2.1.6.0:5066,1,0.174,1,UDP
2.1.6.1:5067,1,0.930,1,UDP
Actual results were:
2.1.6.1:5067,1,2.028,1,UDP
2.1.6.0:5066,1,11.758,1,UDP
SipSrvLookup::servers("test7", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 5060, weight = 1, score = 11.758012, priority = 1,
proto = TCP
[END]
Failed test seq. no. 11, named 'test7'
Expected results were:
2.1.4.0:5060,1,0.174,1,TCP
Actual results were:
2.1.4.0:5060,1,11.758,1,TCP
SipSrvLookup::servers("test8", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test5.example.com', IP addr =
'2.1.5.0', port = 5999, weight = 1, score = 11.758012, priority = 1,
proto = TCP
[END]
Failed test seq. no. 12, named 'test8'
Expected results were:
2.1.5.0:5999,1,0.174,1,TCP
Actual results were:
2.1.5.0:5999,1,11.758,1,TCP
SipSrvLookup::servers("test9", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test6b.example.com', IP addr =
'2.1.6.1', port = 5067, weight = 1, score = 2.028461, priority = 1,
proto = TCP
SipSrvLookupTest::lookup host = 'test6a.example.com', IP addr =
'2.1.6.0', port = 5066, weight = 1, score = 11.758012, priority = 1,
proto = TCP
[END]
Failed test seq. no. 13, named 'test9'
Expected results were:
2.1.6.0:5066,1,0.174,1,TCP
2.1.6.1:5067,1,0.930,1,TCP
Actual results were:
2.1.6.1:5067,1,2.028,1,TCP
2.1.6.0:5066,1,11.758,1,TCP
SipSrvLookup::servers("test12", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test6b.example.com', IP addr =
'2.1.6.1', port = 667, weight = 1, score = 2.028461, priority = 1,
proto = TCP
SipSrvLookupTest::lookup host = 'test6a.example.com', IP addr =
'2.1.6.0', port = 666, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 16, named 'test12'
Expected results were:
2.1.6.0:666,1,0.174,1,UDP
2.1.6.1:667,1,0.930,1,TCP
Actual results were:
2.1.6.1:667,1,2.028,1,TCP
2.1.6.0:666,1,11.758,1,UDP
SipSrvLookup::servers("test4", "sip", OsSocket::UDP, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 5060, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 23, named 'test4'
Expected results were:
2.1.4.0:5060,1,0.174,1,UDP
Actual results were:
2.1.4.0:5060,1,11.758,1,UDP
SipSrvLookup::servers("test5", "sip", OsSocket::UDP, -1) returns:
SipSrvLookupTest::lookup host = 'test5.example.com', IP addr =
'2.1.5.0', port = 5999, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 24, named 'test5'
Expected results were:
2.1.5.0:5999,1,0.174,1,UDP
Actual results were:
2.1.5.0:5999,1,11.758,1,UDP
SipSrvLookup::servers("test6", "sip", OsSocket::UDP, -1) returns:
SipSrvLookupTest::lookup host = 'test6b.example.com', IP addr =
'2.1.6.1', port = 5067, weight = 1, score = 2.028461, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test6a.example.com', IP addr =
'2.1.6.0', port = 5066, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 25, named 'test6'
Expected results were:
2.1.6.0:5066,1,0.174,1,UDP
2.1.6.1:5067,1,0.930,1,UDP
Actual results were:
2.1.6.1:5067,1,2.028,1,UDP
2.1.6.0:5066,1,11.758,1,UDP
SipSrvLookup::servers("test12", "sip", OsSocket::UDP, -1) returns:
SipSrvLookupTest::lookup host = 'test6a.example.com', IP addr =
'2.1.6.0', port = 666, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 33, named 'test12'
Expected results were:
2.1.6.0:666,1,0.174,1,UDP
Actual results were:
2.1.6.0:666,1,11.758,1,UDP
SipSrvLookup::servers("test7", "sip", OsSocket::TCP, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 5060, weight = 1, score = 11.758012, priority = 1,
proto = TCP
[END]
Failed test seq. no. 45, named 'test7'
Expected results were:
2.1.4.0:5060,1,0.174,1,TCP
Actual results were:
2.1.4.0:5060,1,11.758,1,TCP
SipSrvLookup::servers("test8", "sip", OsSocket::TCP, -1) returns:
SipSrvLookupTest::lookup host = 'test5.example.com', IP addr =
'2.1.5.0', port = 5999, weight = 1, score = 11.758012, priority = 1,
proto = TCP
[END]
Failed test seq. no. 46, named 'test8'
Expected results were:
2.1.5.0:5999,1,0.174,1,TCP
Actual results were:
2.1.5.0:5999,1,11.758,1,TCP
SipSrvLookup::servers("test9", "sip", OsSocket::TCP, -1) returns:
SipSrvLookupTest::lookup host = 'test6b.example.com', IP addr =
'2.1.6.1', port = 5067, weight = 1, score = 2.028461, priority = 1,
proto = TCP
SipSrvLookupTest::lookup host = 'test6a.example.com', IP addr =
'2.1.6.0', port = 5066, weight = 1, score = 11.758012, priority = 1,
proto = TCP
[END]
Failed test seq. no. 47, named 'test9'
Expected results were:
2.1.6.0:5066,1,0.174,1,TCP
2.1.6.1:5067,1,0.930,1,TCP
Actual results were:
2.1.6.1:5067,1,2.028,1,TCP
2.1.6.0:5066,1,11.758,1,TCP
SipSrvLookup::servers("test12", "sip", OsSocket::TCP, -1) returns:
SipSrvLookupTest::lookup host = 'test6b.example.com', IP addr =
'2.1.6.1', port = 667, weight = 1, score = 11.758012, priority = 1,
proto = TCP
[END]
Failed test seq. no. 50, named 'test12'
Expected results were:
2.1.6.1:667,1,0.174,1,TCP
Actual results were:
2.1.6.1:667,1,11.758,1,TCP
SipSrvLookup::servers("test20", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8000, weight = 1, score = 11.758012, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8001, weight = 1, score = 2.028461, priority = 2,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8002, weight = 1, score = 0.280236, priority = 3,
proto = UDP
[END]
Failed test seq. no. 62, named 'test20'
Expected results were:
2.1.4.0:8000,1,0.174,1,UDP
2.1.4.0:8001,1,0.930,2,UDP
2.1.4.0:8002,1,0.244,3,UDP
Actual results were:
2.1.4.0:8000,1,11.758,1,UDP
2.1.4.0:8001,1,2.028,2,UDP
2.1.4.0:8002,1,0.280,3,UDP
SipSrvLookup::servers("test21", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8002, weight = 1, score = 0.280236, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8001, weight = 1, score = 2.028461, priority = 2,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8000, weight = 1, score = 11.758012, priority = 3,
proto = UDP
[END]
Failed test seq. no. 63, named 'test21'
Expected results were:
2.1.4.0:8002,1,0.244,1,UDP
2.1.4.0:8001,1,0.930,2,UDP
2.1.4.0:8000,1,0.174,3,UDP
Actual results were:
2.1.4.0:8002,1,0.280,1,UDP
2.1.4.0:8001,1,2.028,2,UDP
2.1.4.0:8000,1,11.758,3,UDP
SipSrvLookup::servers("test22", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8000, weight = 1, score = 2.028461, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8001, weight = 1, score = 11.758012, priority = 2,
proto = TCP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8002, weight = 1, score = 0.280236, priority = 3,
proto = TLS
[END]
Failed test seq. no. 64, named 'test22'
Expected results were:
2.1.4.0:8000,1,0.930,1,UDP
2.1.4.0:8001,1,0.174,2,TCP
2.1.4.0:8002,1,0.244,3,TLS
Actual results were:
2.1.4.0:8000,1,2.028,1,UDP
2.1.4.0:8001,1,11.758,2,TCP
2.1.4.0:8002,1,0.280,3,TLS
SipSrvLookup::servers("test23", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8002, weight = 1, score = 0.280236, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8003, weight = 1, score = 0.779468, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8001, weight = 1, score = 2.028461, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8000, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 65, named 'test23'
Expected results were:
2.1.4.0:8000,1,0.174,1,UDP
2.1.4.0:8003,1,0.225,1,UDP
2.1.4.0:8002,1,0.244,1,UDP
2.1.4.0:8001,1,0.930,1,UDP
Actual results were:
2.1.4.0:8002,1,0.280,1,UDP
2.1.4.0:8003,1,0.779,1,UDP
2.1.4.0:8001,1,2.028,1,UDP
2.1.4.0:8000,1,11.758,1,UDP
SipSrvLookup::servers("test24", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8002, weight = 2, score = 0.140118, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8003, weight = 2, score = 0.389734, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8001, weight = 1, score = 2.028461, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8000, weight = 1, score = 11.758012, priority = 1,
proto = UDP
[END]
Failed test seq. no. 66, named 'test24'
Expected results were:
2.1.4.0:8003,2,0.113,1,UDP
2.1.4.0:8002,2,0.122,1,UDP
2.1.4.0:8000,1,0.174,1,UDP
2.1.4.0:8001,1,0.930,1,UDP
Actual results were:
2.1.4.0:8002,2,0.140,1,UDP
2.1.4.0:8003,2,0.390,1,UDP
2.1.4.0:8001,1,2.028,1,UDP
2.1.4.0:8000,1,11.758,1,UDP
SipSrvLookup::servers("test26", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'c2.test25', IP addr = '1.25.1.0',
port = 5060, weight = 1, score = 11.758012, priority = 1, proto = UDP
[END]
Failed test seq. no. 74, named 'test26'
Expected results were:
1.25.1.0:5060,1,0.174,1,UDP
Actual results were:
1.25.1.0:5060,1,11.758,1,UDP
SipSrvLookup::servers("test27", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'c2.test25', IP addr = '1.25.1.0',
port = 666, weight = 1, score = 2.028461, priority = 1, proto = UDP
SipSrvLookupTest::lookup host = 'c2.test25', IP addr = '1.25.1.0',
port = 667, weight = 1, score = 11.758012, priority = 1, proto = TCP
[END]
Failed test seq. no. 75, named 'test27'
Expected results were:
1.25.1.0:667,1,0.174,1,TCP
1.25.1.0:666,1,0.930,1,UDP
Actual results were:
1.25.1.0:666,1,2.028,1,UDP
1.25.1.0:667,1,11.758,1,TCP
SipSrvLookup::servers("test27", "sip", OsSocket::TCP, -1) returns:
SipSrvLookupTest::lookup host = 'c2.test25', IP addr = '1.25.1.0',
port = 667, weight = 1, score = 11.758012, priority = 1, proto = TCP
[END]
Failed test seq. no. 76, named 'test27'
Expected results were:
1.25.1.0:667,1,0.174,1,TCP
Actual results were:
1.25.1.0:667,1,11.758,1,TCP
SipSrvLookup::servers("test28", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8001, weight = 1, score = 0.280236, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8002, weight = 1, score = 11.758012, priority = 2,
proto = TCP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8003, weight = 1, score = 0.779468, priority = 3,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8004, weight = 1, score = 2.028461, priority = 4,
proto = TCP
[END]
Failed test seq. no. 93, named 'test28'
Expected results were:
2.1.4.0:8001,1,0.244,1,UDP
2.1.4.0:8002,1,0.174,2,TCP
2.1.4.0:8003,1,0.225,3,UDP
2.1.4.0:8004,1,0.930,4,TCP
Actual results were:
2.1.4.0:8001,1,0.280,1,UDP
2.1.4.0:8002,1,11.758,2,TCP
2.1.4.0:8003,1,0.779,3,UDP
2.1.4.0:8004,1,2.028,4,TCP
SipSrvLookup::servers("test29", "sip", OsSocket::UNKNOWN, -1) returns:
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8001, weight = 1000, score = 0.000280, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8003, weight = 10, score = 0.077947, priority = 1,
proto = UDP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8002, weight = 100, score = 0.117580, priority = 1,
proto = TCP
SipSrvLookupTest::lookup host = 'test4.example.com', IP addr =
'2.1.4.0', port = 8004, weight = 1, score = 2.028461, priority = 1,
proto = TCP
[END]
Failed test seq. no. 94, named 'test29'
Expected results were:
2.1.4.0:8001,1000,0.000,1,UDP
2.1.4.0:8002,100,0.002,1,TCP
2.1.4.0:8003,10,0.023,1,UDP
2.1.4.0:8004,1,0.930,1,TCP
Actual results were:
2.1.4.0:8001,1000,0.000,1,UDP
2.1.4.0:8003,10,0.078,1,UDP
2.1.4.0:8002,100,0.118,1,TCP
2.1.4.0:8004,1,2.028,1,TCP
[TEST]:SipSubscribeClientTest1::subscribeHandleTest
Assertion failed: (mSipUdpServer), function sendUdp, file net/
SipUserAgent.cpp, line 1130.
/bin/sh: line 1: 33422 Abort trap
I'm trying to port on Mac OS X so it might not be problem with test
case.
Thanks
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/