freeswitch/libs/sofia-sip/tests/check_sofia.c

65 lines
1.6 KiB
C
Raw Normal View History

sync to current darcs tree: Tue Nov 20 11:46:34 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * nua_register.c: silenced warning with URL_INIT_AS() on Sun CC Tue Nov 20 11:47:06 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * test_register.c: fixed authentication caching issue Tue Nov 20 12:09:19 EST 2007 Pekka.Pessi@nokia.com * tport: tport_name_is_resolved() now uses host_is_ip_address() Tue Nov 20 12:53:54 EST 2007 Pekka.Pessi@nokia.com * tport.c: fixed EXPENSIVE unresolved bug. Wed Nov 21 07:10:40 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * test_tport.c: skipping tests on TLS if send fails. Wed Nov 21 11:46:42 EST 2007 Pekka.Pessi@nokia.com * test_nta.c: removed dead code Thu Nov 22 08:42:14 EST 2007 Pekka.Pessi@nokia.com * test_nta.c: refactored client side tests Thu Nov 22 09:39:45 EST 2007 Pekka.Pessi@nokia.com * nta: added nta_sip_is_internal(). Tue Nov 27 13:43:41 EST 2007 Pekka.Pessi@nokia.com * test_htable2.c: removed conversion warning Conversion of size_t to isize_t when compiled wihout --disable-size-compat. Wed Nov 21 11:16:04 EST 2007 Daniele Rondina <geaaru at gmail dot com> * nta.c: nta_outgoing_*create() now uses NTATAG_TPORT() even if NTATAG_DEFAULT_PROXY() is set Thu Nov 22 09:36:21 EST 2007 Pekka.Pessi@nokia.com * nta.c: always use tport from NTATAG_TPORT() (even if it is bad) Add tests, too. Thu Nov 22 10:01:33 EST 2007 Pekka.Pessi@nokia.com * nta: added nta_msg_is_internal(). Mon Nov 26 17:08:16 EST 2007 Pekka.Pessi@nokia.com * test_proxy.c: removed memory leaks Mon Nov 26 17:08:35 EST 2007 Pekka.Pessi@nokia.com * test_basic_call.c: fixed --no-proxy tests Mon Nov 26 17:12:27 EST 2007 Pekka.Pessi@nokia.com * sofia-sip/su_wait.h: added su_msg_new(), su_msg_send_to(), su_msg_deinitializer() Reduce overhead from message passing. Mon Nov 26 19:15:41 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * configure.ac: defining HAVE_SOFIA_HTTP Mon Nov 26 19:23:05 EST 2007 Pekka.Pessi@nokia.com * nua: moved message passing into nua_stack.c. Recfactored reference counting. This seems to fix the memory leak within 1.12.7. Wed Nov 28 10:15:07 EST 2007 Pekka.Pessi@nokia.com * test_su.c: removed calls of deprecated (and unimplemented) functions su_clone_pause()/su_clone_resume() Thu Nov 22 09:59:13 EST 2007 Pekka.Pessi@nokia.com * nua_stack.c: more logging on bad authentication Mon Nov 26 19:49:34 EST 2007 Pekka.Pessi@nokia.com * tport.h, tport.c: updated tport_create() docs Thu Nov 29 12:17:40 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * tport: collecting statistics Thu Nov 29 12:21:10 EST 2007 Pekka.Pessi@nokia.com * rules/sofia.am: defining INTERNAL_INCLUDES so it can be used from any subdir utils/Makefile.am, libsofia-sip-ua/nua/Makefile.am: using INCLUDES from sofia.am Thu Nov 29 13:03:44 EST 2007 Pekka.Pessi@nokia.com * nua: moved test_nua contents in ltlibraries Thu Nov 29 13:05:25 EST 2007 Pekka.Pessi@nokia.com * Makefile.am, configure.ac: added subdir tests for Check-based module tests Fri Nov 30 09:03:14 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * nua_session.c: avoid NULL nua_session_state_t pointer in nua_update_client_report Thanks to Fabio Margarido for reporting this problem. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6539 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-12-06 13:44:14 -05:00
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2007 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
/**@CFILE check_sofia.c
*
* @brief Check-driven tester for Sofia SIP User Agent library
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @copyright (C) 2007 Nokia Corporation.
*/
#include "config.h"
#include "check_sofia.h"
#include <stdlib.h>
/* Globals used by <sofia-sip/tstdef.h> */
int tstflags;
sync to current darcs tree: Tue Nov 20 11:46:34 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * nua_register.c: silenced warning with URL_INIT_AS() on Sun CC Tue Nov 20 11:47:06 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * test_register.c: fixed authentication caching issue Tue Nov 20 12:09:19 EST 2007 Pekka.Pessi@nokia.com * tport: tport_name_is_resolved() now uses host_is_ip_address() Tue Nov 20 12:53:54 EST 2007 Pekka.Pessi@nokia.com * tport.c: fixed EXPENSIVE unresolved bug. Wed Nov 21 07:10:40 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * test_tport.c: skipping tests on TLS if send fails. Wed Nov 21 11:46:42 EST 2007 Pekka.Pessi@nokia.com * test_nta.c: removed dead code Thu Nov 22 08:42:14 EST 2007 Pekka.Pessi@nokia.com * test_nta.c: refactored client side tests Thu Nov 22 09:39:45 EST 2007 Pekka.Pessi@nokia.com * nta: added nta_sip_is_internal(). Tue Nov 27 13:43:41 EST 2007 Pekka.Pessi@nokia.com * test_htable2.c: removed conversion warning Conversion of size_t to isize_t when compiled wihout --disable-size-compat. Wed Nov 21 11:16:04 EST 2007 Daniele Rondina <geaaru at gmail dot com> * nta.c: nta_outgoing_*create() now uses NTATAG_TPORT() even if NTATAG_DEFAULT_PROXY() is set Thu Nov 22 09:36:21 EST 2007 Pekka.Pessi@nokia.com * nta.c: always use tport from NTATAG_TPORT() (even if it is bad) Add tests, too. Thu Nov 22 10:01:33 EST 2007 Pekka.Pessi@nokia.com * nta: added nta_msg_is_internal(). Mon Nov 26 17:08:16 EST 2007 Pekka.Pessi@nokia.com * test_proxy.c: removed memory leaks Mon Nov 26 17:08:35 EST 2007 Pekka.Pessi@nokia.com * test_basic_call.c: fixed --no-proxy tests Mon Nov 26 17:12:27 EST 2007 Pekka.Pessi@nokia.com * sofia-sip/su_wait.h: added su_msg_new(), su_msg_send_to(), su_msg_deinitializer() Reduce overhead from message passing. Mon Nov 26 19:15:41 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * configure.ac: defining HAVE_SOFIA_HTTP Mon Nov 26 19:23:05 EST 2007 Pekka.Pessi@nokia.com * nua: moved message passing into nua_stack.c. Recfactored reference counting. This seems to fix the memory leak within 1.12.7. Wed Nov 28 10:15:07 EST 2007 Pekka.Pessi@nokia.com * test_su.c: removed calls of deprecated (and unimplemented) functions su_clone_pause()/su_clone_resume() Thu Nov 22 09:59:13 EST 2007 Pekka.Pessi@nokia.com * nua_stack.c: more logging on bad authentication Mon Nov 26 19:49:34 EST 2007 Pekka.Pessi@nokia.com * tport.h, tport.c: updated tport_create() docs Thu Nov 29 12:17:40 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * tport: collecting statistics Thu Nov 29 12:21:10 EST 2007 Pekka.Pessi@nokia.com * rules/sofia.am: defining INTERNAL_INCLUDES so it can be used from any subdir utils/Makefile.am, libsofia-sip-ua/nua/Makefile.am: using INCLUDES from sofia.am Thu Nov 29 13:03:44 EST 2007 Pekka.Pessi@nokia.com * nua: moved test_nua contents in ltlibraries Thu Nov 29 13:05:25 EST 2007 Pekka.Pessi@nokia.com * Makefile.am, configure.ac: added subdir tests for Check-based module tests Fri Nov 30 09:03:14 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * nua_session.c: avoid NULL nua_session_state_t pointer in nua_update_client_report Thanks to Fabio Margarido for reporting this problem. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6539 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-12-06 13:44:14 -05:00
char const name[] = "check_sofia";
int main(int argc, char *argv[])
{
int failed = 0;
Suite *suite;
SRunner *runner;
suite = suite_for_nua();
runner = srunner_create(suite);
Merge current sofia-sip darcs tree: Thu Dec 13 09:15:04 EST 2007 Pekka.Pessi@nokia.com * libsofia-sip-ua/docs/hide_emails.sh: moved to scripts/ subdir Thu Dec 13 09:15:34 EST 2007 Pekka.Pessi@nokia.com * check_sofia.c: pass xml result file as optional parameter to check_sofia Thu Dec 20 08:13:37 EST 2007 Pekka.Pessi@nokia.com * stun.c: try to avoid using stun handle after returning from discovery callback Crash reported and partial patch by Daniele Rondina. Thu Jan 3 07:11:27 EST 2008 Pekka.Pessi@nokia.com * tport_type_udp.c: using SO_RCVBUFFORCE and SO_SNDBUFFORCE to set rmem/wmem on udp sockets Referring reader to Linux sysctls to TPTAG_UDP_RMEM and TPTAG_UDP_WMEM documentation. Thu Jan 3 07:11:47 EST 2008 Pekka.Pessi@nokia.com * m4/sac-su2.m4: checks for SO_RCVBUFFORCE and SO_SNDBUFFORCE Thu Jan 3 08:19:04 EST 2008 Pekka.Pessi@nokia.com * nta.c: calculate next timeout only after completing current timeout Thanks to Mike Jerris for reporting this problem. Thu Jan 3 11:02:11 EST 2008 Pekka.Pessi@nokia.com * sac-su2.m4: checking for IP_ADD_MEMBERSHIP and IP_MULTICAST_LOOP Thu Jan 3 12:08:39 EST 2008 Pekka.Pessi@nokia.com * tport_type_udp.c: when binding to multicast address, join to the group, too. Use "canonic" IP address (from host-part of the SIP URI) to specify interface. Mon Nov 19 15:01:09 EST 2007 Pekka Pessi <first.lastname@nokia.com> * tport_type_udp.c: made IP_ADD_MEMBERSHIP as portable Fri Jan 4 13:19:01 EST 2008 Pekka.Pessi@nokia.com * test_nta.c: added check for request merging (with both 3261 and 2543 proxies) Fri Jan 4 13:20:35 EST 2008 Pekka.Pessi@nokia.com * nta.c: fixed request merging with RFC 2543 proxies Updated matching of PRACKs with outstanding 100rel, too. Fri Jan 4 15:27:01 EST 2008 Pekka.Pessi@nokia.com * nta.c: follow more closely RFC 3261 request matching rules Fri Jan 4 15:31:22 EST 2008 Pekka.Pessi@nokia.com * nua_session.c: do not clear soa when an overlapping INVITE is received Fri Jan 4 15:32:58 EST 2008 Pekka.Pessi@nokia.com * nua/outbound.c: reduce logging Fri Jan 4 16:51:00 EST 2008 Pekka.Pessi@nokia.com * nua_subnotref.c: accept NOTIFY without Event header Fri Jan 4 16:53:20 EST 2008 Pekka.Pessi@nokia.com * nua_notifier.c: fix problem handing expiration time if NOTIFY is sent before SUBSCRIBE has been responded Fri Jan 4 16:54:08 EST 2008 Pekka.Pessi@nokia.com * nua_notifier.c: allow notifier handle to be shut down if SUBSCRIBE has been accpeted but no NOTIFY has been sent git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7109 d0543943-73ff-0310-b7d9-9358b9ac24b2
2008-01-06 15:15:11 -05:00
if (argv[1]) {
srunner_set_xml(runner, argv[1]);
}
sync to current darcs tree: Tue Nov 20 11:46:34 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * nua_register.c: silenced warning with URL_INIT_AS() on Sun CC Tue Nov 20 11:47:06 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * test_register.c: fixed authentication caching issue Tue Nov 20 12:09:19 EST 2007 Pekka.Pessi@nokia.com * tport: tport_name_is_resolved() now uses host_is_ip_address() Tue Nov 20 12:53:54 EST 2007 Pekka.Pessi@nokia.com * tport.c: fixed EXPENSIVE unresolved bug. Wed Nov 21 07:10:40 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * test_tport.c: skipping tests on TLS if send fails. Wed Nov 21 11:46:42 EST 2007 Pekka.Pessi@nokia.com * test_nta.c: removed dead code Thu Nov 22 08:42:14 EST 2007 Pekka.Pessi@nokia.com * test_nta.c: refactored client side tests Thu Nov 22 09:39:45 EST 2007 Pekka.Pessi@nokia.com * nta: added nta_sip_is_internal(). Tue Nov 27 13:43:41 EST 2007 Pekka.Pessi@nokia.com * test_htable2.c: removed conversion warning Conversion of size_t to isize_t when compiled wihout --disable-size-compat. Wed Nov 21 11:16:04 EST 2007 Daniele Rondina <geaaru at gmail dot com> * nta.c: nta_outgoing_*create() now uses NTATAG_TPORT() even if NTATAG_DEFAULT_PROXY() is set Thu Nov 22 09:36:21 EST 2007 Pekka.Pessi@nokia.com * nta.c: always use tport from NTATAG_TPORT() (even if it is bad) Add tests, too. Thu Nov 22 10:01:33 EST 2007 Pekka.Pessi@nokia.com * nta: added nta_msg_is_internal(). Mon Nov 26 17:08:16 EST 2007 Pekka.Pessi@nokia.com * test_proxy.c: removed memory leaks Mon Nov 26 17:08:35 EST 2007 Pekka.Pessi@nokia.com * test_basic_call.c: fixed --no-proxy tests Mon Nov 26 17:12:27 EST 2007 Pekka.Pessi@nokia.com * sofia-sip/su_wait.h: added su_msg_new(), su_msg_send_to(), su_msg_deinitializer() Reduce overhead from message passing. Mon Nov 26 19:15:41 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * configure.ac: defining HAVE_SOFIA_HTTP Mon Nov 26 19:23:05 EST 2007 Pekka.Pessi@nokia.com * nua: moved message passing into nua_stack.c. Recfactored reference counting. This seems to fix the memory leak within 1.12.7. Wed Nov 28 10:15:07 EST 2007 Pekka.Pessi@nokia.com * test_su.c: removed calls of deprecated (and unimplemented) functions su_clone_pause()/su_clone_resume() Thu Nov 22 09:59:13 EST 2007 Pekka.Pessi@nokia.com * nua_stack.c: more logging on bad authentication Mon Nov 26 19:49:34 EST 2007 Pekka.Pessi@nokia.com * tport.h, tport.c: updated tport_create() docs Thu Nov 29 12:17:40 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * tport: collecting statistics Thu Nov 29 12:21:10 EST 2007 Pekka.Pessi@nokia.com * rules/sofia.am: defining INTERNAL_INCLUDES so it can be used from any subdir utils/Makefile.am, libsofia-sip-ua/nua/Makefile.am: using INCLUDES from sofia.am Thu Nov 29 13:03:44 EST 2007 Pekka.Pessi@nokia.com * nua: moved test_nua contents in ltlibraries Thu Nov 29 13:05:25 EST 2007 Pekka.Pessi@nokia.com * Makefile.am, configure.ac: added subdir tests for Check-based module tests Fri Nov 30 09:03:14 EST 2007 Pekka Pessi <Pekka.Pessi@nokia.com> * nua_session.c: avoid NULL nua_session_state_t pointer in nua_update_client_report Thanks to Fabio Margarido for reporting this problem. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6539 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-12-06 13:44:14 -05:00
srunner_run_all(runner, CK_NORMAL);
failed = srunner_ntests_failed(runner);
srunner_free(runner);
exit(failed ? EXIT_FAILURE : EXIT_SUCCESS);
}