[complement-svn] SF.net SVN: complement: [1521] trunk/complement/explore
Status: Pre-Alpha
Brought to you by:
complement
From: <com...@us...> - 2007-02-09 10:31:13
|
Revision: 1521 http://svn.sourceforge.net/complement/?rev=1521&view=rev Author: complement Date: 2007-02-09 02:31:07 -0800 (Fri, 09 Feb 2007) Log Message: ----------- use deque instead of queue for events in main dispetcher; this allow to use container's swap, not exchange via temporary objects [via copy]; destroy and create EvManager in child process after fork, if there are was EvManager; libstem version 4.4.0 use same name for all variants of dlopen'd within test Modified Paths: -------------- trunk/complement/explore/include/stem/EvManager.h trunk/complement/explore/include/stem/EventHandler.h trunk/complement/explore/lib/stem/ChangeLog trunk/complement/explore/lib/stem/EvManager.cc trunk/complement/explore/lib/stem/Makefile.inc trunk/complement/explore/lib/stem/_EventHandler.cc trunk/complement/explore/test/stem/Makefile trunk/complement/explore/test/stem/dl/Makefile trunk/complement/explore/test/stem/dl/loadable_stem.cc trunk/complement/explore/test/stem/unit_test.cc Modified: trunk/complement/explore/include/stem/EvManager.h =================================================================== --- trunk/complement/explore/include/stem/EvManager.h 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/include/stem/EvManager.h 2007-02-09 10:31:07 UTC (rev 1521) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <06/12/04 17:32:31 ptr> +// -*- C++ -*- Time-stamp: <07/02/08 16:38:05 ptr> /* * Copyright (c) 1995-1999, 2002, 2003, 2005, 2006 @@ -22,7 +22,7 @@ #include <string> #include <map> -#include <queue> +#include <deque> #include <mt/xmt.h> #include <mt/uid.h> @@ -96,7 +96,7 @@ tracefault = 4 }; - typedef std::queue< Event > queue_type; + typedef std::deque< Event > queue_type; __FIT_DECLSPEC EvManager(); __FIT_DECLSPEC ~EvManager(); @@ -156,7 +156,7 @@ void push( const Event& e ) { MT_REENTRANT( _lock_queue, _x1 ); - in_ev_queue.push( e ); + in_ev_queue.push_back( e ); _cnd_queue.set( true ); } Modified: trunk/complement/explore/include/stem/EventHandler.h =================================================================== --- trunk/complement/explore/include/stem/EventHandler.h 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/include/stem/EventHandler.h 2007-02-09 10:31:07 UTC (rev 1521) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <06/11/30 20:50:13 ptr> +// -*- C++ -*- Time-stamp: <07/02/08 17:24:21 ptr> /* * Copyright (c) 1995-1999, 2002, 2003, 2005, 2006 @@ -553,6 +553,9 @@ ~Init(); private: static void _guard( int ); + static void __at_fork_prepare(); + static void __at_fork_child(); + static void __at_fork_parent(); }; __FIT_DECLSPEC EventHandler(); Modified: trunk/complement/explore/lib/stem/ChangeLog =================================================================== --- trunk/complement/explore/lib/stem/ChangeLog 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/lib/stem/ChangeLog 2007-02-09 10:31:07 UTC (rev 1521) @@ -1,3 +1,15 @@ +2007-02-08 Petr Ovtchenkov <pt...@is...> + + * EvManager.h, EvManager.cc: use deque instead of queue; + this allow to use container's swap, not exchange via temporary + objects [via copy]; + + * EventHandler.h, _EventHandler.cc: destroy and create + EvManager in child process after fork, if there are was + EvManager; + + * libstem: library version 4.4.0 + 2006-12-13 Petr Ovtchenkov <pt...@is...> * NetTransport.h, NetTransport.cc: NetTransportMgr Modified: trunk/complement/explore/lib/stem/EvManager.cc =================================================================== --- trunk/complement/explore/lib/stem/EvManager.cc 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/lib/stem/EvManager.cc 2007-02-09 10:31:07 UTC (rev 1521) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <06/12/04 19:08:21 ptr> +// -*- C++ -*- Time-stamp: <07/02/08 16:38:41 ptr> /* * @@ -85,11 +85,11 @@ while ( me.not_finished() ) { MT_LOCK( me._lock_queue ); - swap( me.in_ev_queue, me.out_ev_queue ); + me.in_ev_queue.swap( me.out_ev_queue ); MT_UNLOCK( me._lock_queue ); while ( !me.out_ev_queue.empty() ) { me.Send( me.out_ev_queue.front() ); - me.out_ev_queue.pop(); + me.out_ev_queue.pop_front(); } MT_LOCK( me._lock_queue ); if ( me.in_ev_queue.empty() && me.not_finished() ) { Modified: trunk/complement/explore/lib/stem/Makefile.inc =================================================================== --- trunk/complement/explore/lib/stem/Makefile.inc 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/lib/stem/Makefile.inc 2007-02-09 10:31:07 UTC (rev 1521) @@ -2,7 +2,7 @@ LIBNAME = stem MAJOR = 4 -MINOR = 3 +MINOR = 4 PATCH = 0 SRC_CC = _EventHandler.cc NetTransport.cc EvManager.cc EvPack.cc crc.cc \ Names.cc Cron.cc Modified: trunk/complement/explore/lib/stem/_EventHandler.cc =================================================================== --- trunk/complement/explore/lib/stem/_EventHandler.cc 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/lib/stem/_EventHandler.cc 2007-02-09 10:31:07 UTC (rev 1521) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <06/11/28 20:32:35 ptr> +// -*- C++ -*- Time-stamp: <07/02/08 17:27:44 ptr> /* * Copyright (c) 1995-1999, 2002, 2003, 2005, 2006 @@ -29,20 +29,21 @@ EvManager *EventHandler::_mgr = 0; Names *EventHandler::_ns = 0; -#if 0 // depends where fork happens: in the EvManager loop (stack) or not. -extern "C" void __at_fork_prepare() +static int *_rcount = 0; +#if 1 // depends where fork happens: in the EvManager loop (stack) or not. +void EventHandler::Init::__at_fork_prepare() { } -extern "C" void __at_fork_child() +void EventHandler::Init::__at_fork_child() { - if ( EventHandler::Init::_count != 0 ) { - // delete EventHandler::_mgr; + if ( *_rcount != 0 ) { + delete EventHandler::_mgr; EventHandler::_mgr = new( EventHandler::_mgr ) EvManager(); } } -extern "C" void __at_fork_parent() +void EventHandler::Init::__at_fork_parent() { } #endif @@ -54,6 +55,10 @@ if ( direction ) { if ( _count++ == 0 ) { +#ifdef _PTHREADS + _rcount = &_count; + pthread_atfork( __at_fork_prepare, __at_fork_parent, __at_fork_child ); +#endif EventHandler::_mgr = new EvManager(); EventHandler::_ns = new Names( ns_addr, "ns" ); } @@ -61,8 +66,10 @@ --_count; if ( _count == 1 ) { delete EventHandler::_ns; + EventHandler::_ns = 0; } else if ( _count == 0 ) { delete EventHandler::_mgr; + EventHandler::_mgr = 0; } } } Modified: trunk/complement/explore/test/stem/Makefile =================================================================== --- trunk/complement/explore/test/stem/Makefile 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/test/stem/Makefile 2007-02-09 10:31:07 UTC (rev 1521) @@ -1,4 +1,4 @@ -# -*- Makefile -*- Time-stamp: <06/12/13 01:07:22 ptr> +# -*- Makefile -*- Time-stamp: <07/02/07 12:28:46 ptr> SRCROOT := ../.. COMPILER_NAME := gcc @@ -18,16 +18,16 @@ LIBUTF_DIR = ${CoMT_DIR}/../extern/custom/boost/libs/test/unit_test_framework ifeq ($(OSNAME),linux) -release-shared: LDSEARCH += -L${LIBMT_DIR}/${OUTPUT_DIR} -L${LIBUTF_DIR}/${OUTPUT_DIR} -L${LIBSOCK_DIR}/${OUTPUT_DIR} -L${LIBSTEM_DIR}/${OUTPUT_DIR} -Wl,--rpath=${LIBMT_DIR}/${OUTPUT_DIR}:${LIBUTF_DIR}/${OUTPUT_DIR}:${LIBSOCK_DIR}/${OUTPUT_DIR}:${LIBSTEM_DIR}/${OUTPUT_DIR}:${STLPORT_LIB_DIR} -stldbg-shared: LDSEARCH += -L${LIBMT_DIR}/${OUTPUT_DIR_STLDBG} -L${LIBUTF_DIR}/${OUTPUT_DIR_STLDBG} -L${LIBSOCK_DIR}/${OUTPUT_DIR_STLDBG} -L${LIBSTEM_DIR}/${OUTPUT_DIR_STLDBG} -Wl,--rpath=${LIBMT_DIR}/${OUTPUT_DIR_STLDBG}:${LIBUTF_DIR}/${OUTPUT_DIR_STLDBG}:${LIBSOCK_DIR}/${OUTPUT_DIR_STLDBG}:${LIBSTEM_DIR}/${OUTPUT_DIR_STLDBG}:${STLPORT_LIB_DIR} -dbg-shared: LDSEARCH += -L${LIBMT_DIR}/${OUTPUT_DIR_DBG} -L${LIBUTF_DIR}/${OUTPUT_DIR_DBG} -L${LIBSOCK_DIR}/${OUTPUT_DIR_DBG} -L${LIBSTEM_DIR}/${OUTPUT_DIR_DBG} -Wl,--rpath=${LIBMT_DIR}/${OUTPUT_DIR_DBG}:${LIBUTF_DIR}/${OUTPUT_DIR_DBG}:${LIBSOCK_DIR}/${OUTPUT_DIR_DBG}:${LIBSTEM_DIR}/${OUTPUT_DIR_DBG}:${STLPORT_LIB_DIR} +release-shared: LDSEARCH += -L${LIBMT_DIR}/${OUTPUT_DIR} -L${LIBUTF_DIR}/${OUTPUT_DIR} -L${LIBSOCK_DIR}/${OUTPUT_DIR} -L${LIBSTEM_DIR}/${OUTPUT_DIR} -Wl,--rpath=./dl/${OUTPUT_DIR}:${LIBMT_DIR}/${OUTPUT_DIR}:${LIBUTF_DIR}/${OUTPUT_DIR}:${LIBSOCK_DIR}/${OUTPUT_DIR}:${LIBSTEM_DIR}/${OUTPUT_DIR}:${STLPORT_LIB_DIR} +stldbg-shared: LDSEARCH += -L${LIBMT_DIR}/${OUTPUT_DIR_STLDBG} -L${LIBUTF_DIR}/${OUTPUT_DIR_STLDBG} -L${LIBSOCK_DIR}/${OUTPUT_DIR_STLDBG} -L${LIBSTEM_DIR}/${OUTPUT_DIR_STLDBG} -Wl,--rpath=./dl/${OUTPUT_DIR_STLDBG}:${LIBMT_DIR}/${OUTPUT_DIR_STLDBG}:${LIBUTF_DIR}/${OUTPUT_DIR_STLDBG}:${LIBSOCK_DIR}/${OUTPUT_DIR_STLDBG}:${LIBSTEM_DIR}/${OUTPUT_DIR_STLDBG}:${STLPORT_LIB_DIR} +dbg-shared: LDSEARCH += -L${LIBMT_DIR}/${OUTPUT_DIR_DBG} -L${LIBUTF_DIR}/${OUTPUT_DIR_DBG} -L${LIBSOCK_DIR}/${OUTPUT_DIR_DBG} -L${LIBSTEM_DIR}/${OUTPUT_DIR_DBG} -Wl,--rpath=./dl/${OUTPUT_DIR_DBG}:${LIBMT_DIR}/${OUTPUT_DIR_DBG}:${LIBUTF_DIR}/${OUTPUT_DIR_DBG}:${LIBSOCK_DIR}/${OUTPUT_DIR_DBG}:${LIBSTEM_DIR}/${OUTPUT_DIR_DBG}:${STLPORT_LIB_DIR} endif release-shared : LDLIBS = -lxmt -lsockios -lstem -lboost_test_utf -ldl stldbg-shared : LDLIBS = -lxmtstlg -lsockiosstlg -lstemstlg -lboost_test_utfstlg -ldl dbg-shared : LDLIBS = -lxmtg -lsockiosg -lstemg -lboost_test_utfg -ldl -dbg-shared: DEFS += -DDEBUG +# dbg-shared: DEFS += -DDEBUG PHONY += dl dl-dbg dl-stldbg @@ -39,3 +39,6 @@ dl-stldbg: ${MAKE} -C dl stldbg-shared + +depend clean distclean mostlyclean maintainer-clean:: + ${MAKE} -C dl $@ Modified: trunk/complement/explore/test/stem/dl/Makefile =================================================================== --- trunk/complement/explore/test/stem/dl/Makefile 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/test/stem/dl/Makefile 2007-02-09 10:31:07 UTC (rev 1521) @@ -1,18 +1,28 @@ -# -*- Makefile -*- Time-stamp: <06/08/04 12:09:33 ptr> +# -*- Makefile -*- Time-stamp: <07/02/07 12:13:04 ptr> SRCROOT := ../../.. COMPILER_NAME := gcc +DBG_SUFFIX := +STLDBG_SUFFIX := +INSTALL_TAGS := + include Makefile.inc include ${SRCROOT}/Makefiles/top.mak +LIBSTEM_DIR = ${CoMT_DIR}/lib/stem - INCLUDES += -I$(SRCROOT)/include -I$(BOOST_INCLUDE_DIR) #LDSEARCH = -L${STLPORT_LIB_DIR} -L${CoMT_LIB_DIR} +release-shared: LDSEARCH += -L${LIBSTEM_DIR}/${OUTPUT_DIR} +stldbg-shared: LDSEARCH += -L${LIBSTEM_DIR}/${OUTPUT_DIR_STLDBG} +dbg-shared: LDSEARCH += -L${LIBSTEM_DIR}/${OUTPUT_DIR_DBG} #release-shared : LDLIBS = -lxmt -lsockios -lstem -lboost_test_utf +release-shared: LDLIBS = -lstem #stldbg-shared : LDLIBS = -lxmtstlg -lsockiosstlg -lstemstlg -lboost_test_utfstlg +stldbg-shared: LDLIBS = -lstemstlg #dbg-shared : LDLIBS = -lxmtg -lsockiosg -lstemg -lboost_test_utfg +dbg-shared: LDLIBS = -lstemg #LDFLAGS += -Wl,-rpath=${STLPORT_LIB_DIR}:${CoMT_LIB_DIR} Modified: trunk/complement/explore/test/stem/dl/loadable_stem.cc =================================================================== --- trunk/complement/explore/test/stem/dl/loadable_stem.cc 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/test/stem/dl/loadable_stem.cc 2007-02-09 10:31:07 UTC (rev 1521) @@ -9,9 +9,9 @@ * */ -#include <boost/test/unit_test.hpp> +// #include <boost/test/unit_test.hpp> -using namespace boost::unit_test_framework; +// using namespace boost::unit_test_framework; #include "../NodeDL.h" Modified: trunk/complement/explore/test/stem/unit_test.cc =================================================================== --- trunk/complement/explore/test/stem/unit_test.cc 2007-02-09 10:27:13 UTC (rev 1520) +++ trunk/complement/explore/test/stem/unit_test.cc 2007-02-09 10:31:07 UTC (rev 1521) @@ -1,4 +1,4 @@ -// -*- C++ -*- Time-stamp: <06/12/13 02:08:08 ptr> +// -*- C++ -*- Time-stamp: <07/02/07 13:05:32 ptr> /* * Copyright (c) 2002, 2003, 2006 @@ -14,6 +14,7 @@ #include <iostream> #include <mt/xmt.h> +#include <mt/shm.h> #include <stem/EventHandler.h> #include <stem/Names.h> @@ -35,7 +36,6 @@ using namespace __gnu_cxx; #endif -#include <sys/shm.h> #include <sys/wait.h> #include <signal.h> @@ -44,6 +44,9 @@ struct stem_test { + void shm_init(); + void shm_finit(); + void basic1(); void basic2(); void basic1new(); @@ -148,21 +151,21 @@ void stem_test::dl() { -#ifdef _STLP_DEBUG - void *lh = dlopen( "dl/obj/gcc/so_stlg/libloadable_stemstlg.so", RTLD_LAZY ); -#elif defined(DEBUG) - void *lh = dlopen( "dl/obj/gcc/so_g/libloadable_stemg.so", RTLD_LAZY ); -#else - void *lh = dlopen( "dl/obj/gcc/so/libloadable_stem.so", RTLD_LAZY ); -#endif + void *lh = dlopen( "libloadable_stem.so", RTLD_LAZY ); // Path was passed via -Wl,--rpath= + BOOST_REQUIRE( lh != NULL ); - void *(*f)(unsigned) = reinterpret_cast<void *(*)(unsigned)>( dlsym( lh, "create_NewNodeDL" ) ); + void *(*f)(unsigned); + void (*g)(void *); + void (*w)(void *); + int (*v)(void *); + + *(void **)(&f) = dlsym( lh, "create_NewNodeDL" ); BOOST_REQUIRE( f != NULL ); - void (*g)(void *) = reinterpret_cast<void (*)(void *)>( dlsym( lh, "destroy_NewNodeDL" ) ); + *(void **)(&g) = dlsym( lh, "destroy_NewNodeDL" ); BOOST_REQUIRE( g != NULL ); - void (*w)(void *) = reinterpret_cast<void (*)(void *)>( dlsym( lh, "wait_NewNodeDL" ) ); + *(void **)(&w) = dlsym( lh, "wait_NewNodeDL" ); BOOST_REQUIRE( w != NULL ); - int (*v)(void *) = reinterpret_cast<int (*)(void *)>( dlsym( lh, "v_NewNodeDL" ) ); + *(void **)(&v) = dlsym( lh, "v_NewNodeDL" ); BOOST_REQUIRE( v != NULL ); NewNodeDL *node = reinterpret_cast<NewNodeDL *>( f( 2002 ) ); @@ -289,25 +292,29 @@ } } -void stem_test::echo_net() +const char fname[] = "/tmp/stem_test.shm"; +xmt::shm_alloc<0> seg; +xmt::allocator_shm<xmt::__Condition<true>,0> shm_cnd; + +void stem_test::shm_init() { - shmid_ds ds; - int id = shmget( 5000, 1024, IPC_CREAT | IPC_EXCL | 0600 ); - BOOST_REQUIRE( id != -1 ); - // if ( id == -1 ) { - // cerr << "Error on shmget" << endl; - // } - BOOST_REQUIRE( shmctl( id, IPC_STAT, &ds ) != -1 ); - // if ( shmctl( id, IPC_STAT, &ds ) == -1 ) { - // cerr << "Error on shmctl" << endl; - // } - void *buf = shmat( id, 0, 0 ); - BOOST_REQUIRE( buf != reinterpret_cast<void *>(-1) ); - // if ( buf == reinterpret_cast<void *>(-1) ) { - // cerr << "Error on shmat" << endl; - // } + try { + seg.allocate( fname, 4*4096, xmt::shm_base::create | xmt::shm_base::exclusive, 0600 ); + } + catch ( const xmt::shm_bad_alloc& err ) { + BOOST_CHECK_MESSAGE( false, "error report: " << err.what() ); + } +} - xmt::__Condition<true>& fcnd = *new( buf ) xmt::__Condition<true>(); +void stem_test::shm_finit() +{ + seg.deallocate(); + unlink( fname ); +} + +void stem_test::echo_net() +{ + xmt::__Condition<true>& fcnd = *new ( shm_cnd.allocate( 1 ) ) xmt::__Condition<true>(); fcnd.set( false ); try { @@ -361,10 +368,8 @@ } (&fcnd)->~__Condition<true>(); + shm_cnd.deallocate( &fcnd, 1 ); - shmdt( buf ); - shmctl( id, IPC_RMID, &ds ); - // cerr << "Fine\n"; } @@ -396,29 +401,13 @@ pid_t fpid; - shmid_ds ds; - int id = shmget( 5000, 1024, IPC_CREAT | IPC_EXCL | 0600 ); - BOOST_REQUIRE( id != -1 ); - // if ( id == -1 ) { - // cerr << "Error on shmget" << endl; - // } - BOOST_REQUIRE( shmctl( id, IPC_STAT, &ds ) != -1 ); - // if ( shmctl( id, IPC_STAT, &ds ) == -1 ) { - // cerr << "Error on shmctl" << endl; - // } - void *buf = shmat( id, 0, 0 ); - BOOST_REQUIRE( buf != reinterpret_cast<void *>(-1) ); - // if ( buf == reinterpret_cast<void *>(-1) ) { - // cerr << "Error on shmat" << endl; - // } - - xmt::__Condition<true>& fcnd = *new( buf ) xmt::__Condition<true>(); + xmt::__Condition<true>& fcnd = *new ( shm_cnd.allocate( 1 ) ) xmt::__Condition<true>(); fcnd.set( false ); - xmt::__Condition<true>& pcnd = *new( (char *)buf + sizeof(xmt::__Condition<true>) ) xmt::__Condition<true>(); + xmt::__Condition<true>& pcnd = *new ( shm_cnd.allocate( 1 ) ) xmt::__Condition<true>(); pcnd.set( false ); - xmt::__Condition<true>& scnd = *new( (char *)buf + sizeof(xmt::__Condition<true>) * 2 ) xmt::__Condition<true>(); + xmt::__Condition<true>& scnd = *new ( shm_cnd.allocate( 1 ) ) xmt::__Condition<true>(); scnd.set( false ); try { @@ -563,7 +552,7 @@ pcnd.set( true ); c2.wait(); - cerr << "Fine!" << endl; + // cerr << "Fine!" << endl; scnd.set( true ); mgr.close(); @@ -589,32 +578,16 @@ } (&fcnd)->~__Condition<true>(); + shm_cnd.deallocate( &fcnd, 1 ); (&pcnd)->~__Condition<true>(); + shm_cnd.deallocate( &pcnd, 1 ); (&scnd)->~__Condition<true>(); - - shmdt( buf ); - shmctl( id, IPC_RMID, &ds ); + shm_cnd.deallocate( &scnd, 1 ); } void stem_test::boring_manager() { - shmid_ds ds; - int id = shmget( 5000, 1024, IPC_CREAT | IPC_EXCL | 0600 ); - BOOST_REQUIRE( id != -1 ); - // if ( id == -1 ) { - // cerr << "Error on shmget" << endl; - // } - BOOST_REQUIRE( shmctl( id, IPC_STAT, &ds ) != -1 ); - // if ( shmctl( id, IPC_STAT, &ds ) == -1 ) { - // cerr << "Error on shmctl" << endl; - // } - void *buf = shmat( id, 0, 0 ); - BOOST_REQUIRE( buf != reinterpret_cast<void *>(-1) ); - // if ( buf == reinterpret_cast<void *>(-1) ) { - // cerr << "Error on shmat" << endl; - // } - - xmt::__Condition<true>& fcnd = *new( buf ) xmt::__Condition<true>(); + xmt::__Condition<true>& fcnd = *new ( shm_cnd.allocate( 1 ) ) xmt::__Condition<true>(); fcnd.set( false ); try { @@ -659,9 +632,7 @@ } (&fcnd)->~__Condition<true>(); - - shmdt( buf ); - shmctl( id, IPC_RMID, &ds ); + shm_cnd.deallocate( &fcnd, 1 ); } struct stem_test_suite : @@ -683,9 +654,12 @@ test_case *dl_tc = BOOST_CLASS_TEST_CASE( &stem_test::dl, instance ); test_case *ns_tc = BOOST_CLASS_TEST_CASE( &stem_test::ns, instance ); test_case *echo_tc = BOOST_CLASS_TEST_CASE( &stem_test::echo, instance ); + test_case *shm_init_tc = BOOST_CLASS_TEST_CASE( &stem_test::shm_init, instance ); test_case *echo_net_tc = BOOST_CLASS_TEST_CASE( &stem_test::echo_net, instance ); test_case *peer_tc = BOOST_CLASS_TEST_CASE( &stem_test::peer, instance ); test_case *boring_manager_tc = BOOST_CLASS_TEST_CASE( &stem_test::boring_manager, instance ); + test_case *shm_finit_tc = BOOST_CLASS_TEST_CASE( &stem_test::shm_finit, instance ); + basic2_tc->depends_on( basic1_tc ); basic1n_tc->depends_on( basic1_tc ); basic2n_tc->depends_on( basic2_tc ); @@ -694,9 +668,13 @@ ns_tc->depends_on( basic1_tc ); echo_tc->depends_on( basic2_tc ); + echo_net_tc->depends_on( shm_init_tc ); echo_net_tc->depends_on( echo_tc ); peer_tc->depends_on( echo_tc ); + peer_tc->depends_on( shm_init_tc ); boring_manager_tc->depends_on( peer_tc ); + boring_manager_tc->depends_on( shm_init_tc ); + shm_finit_tc->depends_on( shm_init_tc ); add( basic1_tc ); add( basic2_tc ); @@ -706,9 +684,11 @@ add( ns_tc ); add( echo_tc ); + add( shm_init_tc ); add( echo_net_tc ); add( peer_tc ); add( boring_manager_tc ); + add( shm_finit_tc ); } test_suite *init_unit_test_suite( int argc, char **argv ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |