diff options
Diffstat (limited to 'tests')
32 files changed, 6102 insertions, 2341 deletions
diff --git a/tests/CLASSIX/CLASSIX_Con_Acc_Test.cpp b/tests/CLASSIX/CLASSIX_Con_Acc_Test.cpp index c0badafd1c0..c0340b33fb8 100644 --- a/tests/CLASSIX/CLASSIX_Con_Acc_Test.cpp +++ b/tests/CLASSIX/CLASSIX_Con_Acc_Test.cpp @@ -14,9 +14,9 @@ // However, this test is not to test the priority aspect of the // CLASSIX Reactor. In fact <ACE_CLASSIX_Select_Reactor> does not // handle priorities. -// +// // This is a test for <ACE_CLASSIX_CO_Connector> and -// <ACE_CLASSIX_CO_Acceptor> +// <ACE_CLASSIX_CO_Acceptor> // ============================================================================ #include "ace/Get_Opt.h" @@ -114,22 +114,22 @@ Read_Handler::handle_input (ACE_HANDLE h) char buf[BUFSIZ]; // ACE_DEBUG((LM_DEBUG, -// "(%P|%t|%x) read from handle %d...", this, h)); +// "(%P|%t|%x) read from handle %d...", this, h)); ssize_t result = this->peer ().recv (buf, sizeof (buf)); // // Work around the blocking problem with ipcSend() in ClassixOS 3.1 // This counter ensures that the reader reads before the writer sends too // many messages. - // + // max_msg--; if (result <= 0) { if (result < 0 && errno == EWOULDBLOCK) { - max_msg++; - return 0; + max_msg++; + return 0; } if (result != 0) @@ -150,8 +150,8 @@ Read_Handler::handle_input (ACE_HANDLE h) } // ACE_DEBUG((LM_DEBUG, -// "...(%P|%t) read %d bytes from handle %d, priority %d\n", -// result, h, priority ())); +// "...(%P|%t) read %d bytes from handle %d, priority %d\n", +// result, h, priority ())); return 0; } @@ -170,23 +170,23 @@ Write_Handler::svc (void) ACE_Time_Value pause (0, 1000); for (int i = 0; i < opt_nloops; ++i) { - // Work around the blocking problem with ipcSend() in ClassixOS 3.1 - // ipcSend() will block instead of returning K_EFULL value, - // if resources are not available. - // - // sleep for the reader to empty some messages - while (max_msg.value() >= opt_max_msgs) - ACE_OS::sleep(pause); - - - if (this->peer ().send_n (ACE_ALPHABET, - sizeof (ACE_ALPHABET) - 1) == -1) - { - ACE_DEBUG((LM_DEBUG, "%t %p\n", "send_n\n")); - ACE_OS::sleep (pause); - continue; - } - max_msg++; + // Work around the blocking problem with ipcSend() in ClassixOS 3.1 + // ipcSend() will block instead of returning K_EFULL value, + // if resources are not available. + // + // sleep for the reader to empty some messages + while (max_msg.value() >= opt_max_msgs) + ACE_OS::sleep(pause); + + + if (this->peer ().send_n (ACE_ALPHABET, + sizeof (ACE_ALPHABET) - 1) == -1) + { + ACE_DEBUG((LM_DEBUG, "%t %p\n", "send_n\n")); + ACE_OS::sleep (pause); + continue; + } + max_msg++; } this->peer().close_writer(); ACE_DEBUG ((LM_DEBUG, "(%P|%t) Write Handler exiting svc\n")); @@ -226,13 +226,13 @@ client (void *arg) } else { - // Let the new Svc_Handler to its job... - writer->svc (); + // Let the new Svc_Handler to its job... + writer->svc (); - // then close the connection and release the Svc_Handler. - writer->destroy (); - - return 0; + // then close the connection and release the Svc_Handler. + writer->destroy (); + + return 0; } } @@ -249,7 +249,7 @@ main (int argc, char *argv[]) // initialize environment, eg. reactor, etc. ACE_CLASSIX_OS os; - + ACE_Get_Opt getopt (argc, argv, "dc:l:m:t:i:", 1); for (int c; (c = getopt ()) != -1; ) @@ -290,7 +290,7 @@ main (int argc, char *argv[]) // Acceptor ACE_DEBUG((LM_DEBUG, "Create an Acceptor\n")); ACCEPTOR acceptor(ACE_Reactor::instance(), 0); - // The acceptor uses the global reactor and does not use select. + // The acceptor uses the global reactor and does not use select. acceptor.priority (ACE_Event_Handler::HI_PRIORITY); ADDR server_addr; @@ -347,12 +347,7 @@ template class auto_ptr<ACE_Reactor>; template class ACE_Auto_Basic_Ptr<ACE_Reactor>; template class auto_ptr<ACE_Select_Reactor>; template class ACE_Auto_Basic_Ptr<ACE_Select_Reactor>; -template class ACE_Map_Manager<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Reverse_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Entry<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*>; -template class ACE_Svc_Tuple<Write_Handler>; +template class ACE_NonBlocking_Connect_Handler<Write_Handler>; template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) @@ -363,11 +358,6 @@ template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Reactor> #pragma instantiate auto_ptr<ACE_Select_Reactor> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Select_Reactor> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Entry<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*> -#pragma instantiate ACE_Svc_Tuple<Write_Handler> +#pragma instantiate ACE_NonBlocking_Connect_Handler<Write_Handler> #pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/tests/Cached_Accept_Conn_Test.cpp b/tests/Cached_Accept_Conn_Test.cpp index 1cda15ecedb..18b9d5b2237 100644 --- a/tests/Cached_Accept_Conn_Test.cpp +++ b/tests/Cached_Accept_Conn_Test.cpp @@ -171,15 +171,10 @@ template class ACE_Creation_Strategy<Client_Svc_Handler>; template class ACE_Hash_Map_Entry<ACE_ADDR, Client_Svc_Handler *>; template class ACE_Hash<ACE_ADDR>; template class ACE_Equal_To<ACE_ADDR>; -template class ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *>; -template class ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; template class ACE_NOOP_Concurrency_Strategy<Client_Svc_Handler>; template class ACE_Recycling_Strategy<Client_Svc_Handler>; template class ACE_Strategy_Connector<Client_Svc_Handler, ACE_SOCK_CONNECTOR>; -template class ACE_Svc_Tuple<Client_Svc_Handler>; +template class ACE_NonBlocking_Connect_Handler<Client_Svc_Handler>; template class ACE_Strategy_Acceptor<Server_Svc_Handler, ACE_SOCK_ACCEPTOR>; template class Accept_Strategy<Server_Svc_Handler, ACE_SOCK_ACCEPTOR>; @@ -265,15 +260,10 @@ template class ACE_Guard<ACE_Reverse_Lock<ACE_SYNCH_NULL_MUTEX> >; #pragma instantiate ACE_Hash_Map_Entry<ACE_ADDR, Client_Svc_Handler *> #pragma instantiate ACE_Hash<ACE_ADDR> #pragma instantiate ACE_Equal_To<ACE_ADDR> -#pragma instantiate ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Client_Svc_Handler> *, ACE_SYNCH_RW_MUTEX> #pragma instantiate ACE_NOOP_Concurrency_Strategy<Client_Svc_Handler> #pragma instantiate ACE_Recycling_Strategy<Client_Svc_Handler> #pragma instantiate ACE_Strategy_Connector<Client_Svc_Handler, ACE_SOCK_CONNECTOR> -#pragma instantiate ACE_Svc_Tuple<Client_Svc_Handler> +#pragma instantiate ACE_NonBlocking_Connect_Handler<Client_Svc_Handler> #pragma instantiate ACE_Strategy_Acceptor<Server_Svc_Handler, ACE_SOCK_ACCEPTOR> #pragma instantiate Accept_Strategy<Server_Svc_Handler, ACE_SOCK_ACCEPTOR> diff --git a/tests/Cached_Conn_Test.cpp b/tests/Cached_Conn_Test.cpp index 394b57ad0ce..dc38066b88c 100644 --- a/tests/Cached_Conn_Test.cpp +++ b/tests/Cached_Conn_Test.cpp @@ -145,16 +145,11 @@ template class ACE_Creation_Strategy<Svc_Handler>; template class ACE_Hash_Map_Entry<ACE_ADDR, Svc_Handler *>; template class ACE_Hash<ACE_ADDR>; template class ACE_Equal_To<ACE_ADDR>; -template class ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *>; -template class ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; template class ACE_NOOP_Concurrency_Strategy<Svc_Handler>; template class ACE_Recycling_Strategy<Svc_Handler>; template class ACE_Strategy_Connector<Svc_Handler, ACE_SOCK_CONNECTOR>; -template class ACE_Svc_Tuple<Svc_Handler>; template class ACE_Oneshot_Acceptor<Svc_Handler, ACE_SOCK_ACCEPTOR>; +template class ACE_NonBlocking_Connect_Handler<Svc_Handler>; template class ACE_Pair<Svc_Handler *, ATTRIBUTES>; template class ACE_Reference_Pair<ACE_ADDR, Svc_Handler *>; @@ -232,16 +227,11 @@ template class ACE_Guard<ACE_Reverse_Lock<ACE_SYNCH_NULL_MUTEX> >; #pragma instantiate ACE_Hash_Map_Entry<ACE_ADDR, Svc_Handler *> #pragma instantiate ACE_Hash<ACE_ADDR> #pragma instantiate ACE_Equal_To<ACE_ADDR> -#pragma instantiate ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX> #pragma instantiate ACE_NOOP_Concurrency_Strategy<Svc_Handler> #pragma instantiate ACE_Recycling_Strategy<Svc_Handler> #pragma instantiate ACE_Strategy_Connector<Svc_Handler, ACE_SOCK_CONNECTOR> -#pragma instantiate ACE_Svc_Tuple<Svc_Handler> #pragma instantiate ACE_Oneshot_Acceptor<Svc_Handler, ACE_SOCK_ACCEPTOR> +#pragma instantiate ACE_NonBlocking_Connect_Handler<Svc_Handler> #pragma instantiate ACE_Pair<Svc_Handler *, ATTRIBUTES> #pragma instantiate ACE_Reference_Pair<ACE_ADDR, Svc_Handler *> diff --git a/tests/Conn_Test.cpp b/tests/Conn_Test.cpp index a666cc9d436..e233cfcdef0 100644 --- a/tests/Conn_Test.cpp +++ b/tests/Conn_Test.cpp @@ -123,16 +123,11 @@ template class ACE_Hash_Map_Reverse_Iterator<REFCOUNTED_HASH_RECYCLABLE_ADDR, Sv template class ACE_Hash_Map_Reverse_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, Svc_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_RW_MUTEX>; template class ACE_LOCK_SOCK_Acceptor<ACCEPTOR_LOCKING>; template class ACE_Oneshot_Acceptor<Svc_Handler, LOCK_SOCK_ACCEPTOR>; -template class ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *>; -template class ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX>; template class ACE_NOOP_Concurrency_Strategy<Svc_Handler>; template class ACE_Recycling_Strategy<Svc_Handler>; template class ACE_Strategy_Connector<Svc_Handler, ACE_SOCK_CONNECTOR>; template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; -template class ACE_Svc_Tuple<Svc_Handler>; +template class ACE_NonBlocking_Connect_EH<Svc_Handler, ACE_SYNCH_MUTEX>; template class ACE_Auto_Basic_Array_Ptr<pid_t>; #if defined (__BORLANDC__) @@ -179,16 +174,11 @@ template class ACE_Unbounded_Queue<ACE_Thread_Descriptor*>; #pragma instantiate ACE_Hash_Map_Reverse_Iterator_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDR, Svc_Handler *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDR>, ACE_SYNCH_RW_MUTEX> #pragma instantiate ACE_LOCK_SOCK_Acceptor<ACCEPTOR_LOCKING> #pragma instantiate ACE_Oneshot_Acceptor<Svc_Handler, LOCK_SOCK_ACCEPTOR> -#pragma instantiate ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Svc_Handler> *, ACE_SYNCH_RW_MUTEX> #pragma instantiate ACE_NOOP_Concurrency_Strategy<Svc_Handler> #pragma instantiate ACE_Recycling_Strategy<Svc_Handler> #pragma instantiate ACE_Strategy_Connector<Svc_Handler, ACE_SOCK_CONNECTOR> #pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> -#pragma instantiate ACE_Svc_Tuple<Svc_Handler> +#pragma instantiate ACE_NonBlocking_Connect_EH<Svc_Handler, ACE_SYNCH_MUTEX> #pragma instantiate ACE_Auto_Basic_Array_Ptr<pid_t> #if defined (__BORLANDC__) diff --git a/tests/Dev_Poll_Reactor_Test.cpp b/tests/Dev_Poll_Reactor_Test.cpp index 6d94cb6f1b8..dc6b71bdcf9 100644 --- a/tests/Dev_Poll_Reactor_Test.cpp +++ b/tests/Dev_Poll_Reactor_Test.cpp @@ -556,38 +556,14 @@ run_main (int, ACE_TCHAR *[]) template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; template class ACE_Acceptor<Server, ACE_SOCK_ACCEPTOR>; template class ACE_Connector<Client, ACE_SOCK_CONNECTOR>; - -template class ACE_Svc_Tuple<Server>; -template class ACE_Svc_Tuple<Client>; - -template class ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Server> *>; -template class ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Server> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Server> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Server> *, ACE_SYNCH_RW_MUTEX>; - -template class ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Client> *>; -template class ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Client> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Client> *, ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Client> *, ACE_SYNCH_RW_MUTEX>; +template class ACE_NonBlocking_Connect_Handler<Client>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> #pragma instantiate ACE_Acceptor<Server, ACE_SOCK_ACCEPTOR> #pragma instantiate ACE_Connector<Client, ACE_SOCK_CONNECTOR> - -#pragma instantiate ACE_Svc_Tuple<Server> -#pragma instantiate ACE_Svc_Tuple<Client> - -#pragma instantiate ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Server> *> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Server> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Server> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Server> *, ACE_SYNCH_RW_MUTEX> - -#pragma instantiate ACE_Map_Entry<ACE_HANDLE, ACE_Svc_Tuple<Client> *> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE, ACE_Svc_Tuple<Client> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE, ACE_Svc_Tuple<Client> *, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE, ACE_Svc_Tuple<Client> *, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_NonBlocking_Connect_Handler<Client> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ @@ -598,7 +574,7 @@ run_main (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Dev_Poll_Reactor_Test")); ACE_ERROR ((LM_INFO, - ACE_TEXT ("Dev Poll and Event Poll are not supported") + ACE_TEXT ("Dev Poll and Event Poll are not supported ") ACE_TEXT ("on this platform\n"))); ACE_END_TEST; return 0; diff --git a/tests/MT_Reference_Counted_Event_Handler_Test.cpp b/tests/MT_Reference_Counted_Event_Handler_Test.cpp new file mode 100644 index 00000000000..938669f403c --- /dev/null +++ b/tests/MT_Reference_Counted_Event_Handler_Test.cpp @@ -0,0 +1,1389 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// MT_Reference_Counted_Event_Handler_Test.cpp +// +// = DESCRIPTION +// +// This test tries to represents what happens in the ORB wrt to +// event handlers, reactors, timer queues, threads, and connection +// caches, minus the other complexities. The following three +// Reactors are tested: Select, TP, and WFMO. +// +// The test checks proper use and shutting down of client-side +// event handlers when it is used by invocation threads and/or +// event loop threads. Server-side event handlers are either +// threaded or reactive. A purger thread is introduced to check the +// connection recycling and cache purging. Nested upcalls are also +// tested. +// +// = AUTHOR +// Irfan Pyarali <irfan@oomworks.com> +// +// ============================================================================ + +#include "test_config.h" +#include "ace/Select_Reactor.h" +#include "ace/TP_Reactor.h" +#include "ace/WFMO_Reactor.h" +#include "ace/Get_Opt.h" +#include "ace/Task.h" +#include "ace/SOCK_Acceptor.h" +#include "ace/SOCK_Connector.h" + +ACE_RCSID(tests, MT_Reference_Counted_Event_Handler_Test, "$Id$") + +#if defined (ACE_HAS_THREADS) + +static const char message[] = "abcdefghijklmnopqrstuvwxyz"; +static const int message_size = 26; +static int test_select_reactor = 1; +static int test_tp_reactor = 1; +static int test_wfmo_reactor = 1; +static int debug = 0; +static int number_of_connections = 5; +static int max_nested_upcall_level = 10; +static int close_timeout = 500; +static int pipe_open_attempts = 10; +static int pipe_retry_timeout = 1; +static int make_invocations = -1; +static int run_event_loop_thread = -1; +static int run_purger_thread = -1; +static int run_receiver_thread = -1; +static int nested_upcalls = -1; + +static ACE_HANDLE server_handle = ACE_INVALID_HANDLE; +static ACE_HANDLE client_handle = ACE_INVALID_HANDLE; + +static int number_of_options = 5; +static int test_configs[][5] = + { + // + // make_invocations, run_event_loop_thread, run_purger_thread, run_receiver_thread, nested_upcalls + // + + // { 0, 0, 0, 0, 0, }, // At least one thread should be running. + // { 0, 0, 0, 1, 0, }, // If event_loop_thread is not running and invocation_thread is not making invocations, + // no thread will know that the socket is closed. + // { 0, 0, 1, 0, 0, }, // If invocation_thread is not making invocations and if receiver is not threaded, + // we cannot decide which socket to close. + // { 0, 0, 1, 1, 0, }, // If event_loop_thread is not running and invocation_thread is not making invocations, + // no thread will know that the socket is closed. + // { 0, 1, 0, 0, 0, }, // If invocation_thread is not making invocations and if receiver is not threaded, + // we cannot decide which socket to close. + { 0, 1, 0, 1, 0, }, + // { 0, 1, 0, 1, 1, }, // No need for nested upcalls without invocations. + // { 0, 1, 1, 0, 0, }, // If invocation_thread is not making invocations and if receiver is not threaded, + // we cannot decide which socket to close. + { 0, 1, 1, 1, 0, }, + // { 0, 1, 1, 1, 1, }, // No need for nested upcalls without invocations. + // { 1, 0, 0, 0, 0, }, // If both event_loop_thread and receiver are not threaded, + // no thread can receive the messages. + { 1, 0, 0, 1, 0, }, + // { 1, 0, 0, 1, 1, }, // No need for nested upcalls without event loop being used by the receiver. + // { 1, 0, 1, 0, 0, }, // If both event_loop_thread and receiver are not threaded, + // no thread can receive the messages. + { 1, 0, 1, 1, 0, }, + // { 1, 0, 1, 1, 1, }, // No need for nested upcalls without event loop being used by the receiver. + { 1, 1, 0, 0, 0, }, + { 1, 1, 0, 0, 1, }, + { 1, 1, 0, 1, 0, }, + // { 1, 1, 0, 1, 1, }, // No need for nested upcalls without event loop being used by the receiver. + { 1, 1, 1, 0, 0, }, + { 1, 1, 1, 0, 1, }, + { 1, 1, 1, 1, 0, }, + // { 1, 1, 1, 1, 1, }, // No need for nested upcalls without event loop being used by the receiver. + }; + +/* Replication of the ACE_Pipe class. Only difference is that this + class always uses two sockets to create the pipe, even on platforms + that support pipes. */ + +class Pipe +{ +public: + + Pipe (void); + + int open (void); + + ACE_HANDLE read_handle (void) const; + + ACE_HANDLE write_handle (void) const; + +private: + ACE_HANDLE handles_[2]; +}; + +int +Pipe::open (void) +{ + ACE_INET_Addr my_addr; + ACE_SOCK_Acceptor acceptor; + ACE_SOCK_Connector connector; + ACE_SOCK_Stream reader; + ACE_SOCK_Stream writer; + int result = 0; + + // Bind listener to any port and then find out what the port was. + if (acceptor.open (ACE_Addr::sap_any) == -1 + || acceptor.get_local_addr (my_addr) == -1) + result = -1; + else + { + ACE_INET_Addr sv_addr (my_addr.get_port_number (), + ACE_LOCALHOST); + + // Establish a connection within the same process. + if (connector.connect (writer, sv_addr) == -1) + result = -1; + else if (acceptor.accept (reader) == -1) + { + writer.close (); + result = -1; + } + } + + // Close down the acceptor endpoint since we don't need it anymore. + acceptor.close (); + if (result == -1) + return -1; + + this->handles_[0] = reader.get_handle (); + this->handles_[1] = writer.get_handle (); + + return 0; +} + +Pipe::Pipe (void) +{ + this->handles_[0] = ACE_INVALID_HANDLE; + this->handles_[1] = ACE_INVALID_HANDLE; +} + +ACE_HANDLE +Pipe::read_handle (void) const +{ + return this->handles_[0]; +} + +ACE_HANDLE +Pipe::write_handle (void) const +{ + return this->handles_[1]; +} + +class Connection_Cache; +class Event_Loop_Thread; + +static Event_Loop_Thread *global_event_loop_thread_variable = 0; + +class Sender : public ACE_Event_Handler +{ +public: + + Sender (ACE_HANDLE handle, + Connection_Cache &connection_cache); + + ~Sender (void); + + int handle_input (ACE_HANDLE); + + ssize_t send_message (void); + + void close (void); + + ACE_HANDLE handle_; + + Connection_Cache &connection_cache_; + +}; + +class Connection_Cache +{ +public: + + Connection_Cache (void); + + ~Connection_Cache (void); + + void add_connection (Sender *sender); + + void remove_connection (Sender *sender); + + Sender *acquire_connection (void); + + void release_connection (Sender *sender); + + int find (Sender *sender); + + ACE_SYNCH_MUTEX &lock (void); + + enum State + { + IDLE, + BUSY, + NOT_IN_CACHE + }; + + struct Entry + { + Sender *sender_; + State state_; + }; + + Entry *entries_; + + ACE_SYNCH_MUTEX lock_; +}; + +Sender::Sender (ACE_HANDLE handle, + Connection_Cache &connection_cache) + : handle_ (handle), + connection_cache_ (connection_cache) +{ + // Enable reference counting. + this->reference_counting_policy ().value + (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in Sender::Sender() is %d\n", + this->reference_count_.value ())); +} + +Sender::~Sender (void) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in ~Sender::Sender() is %d\n", + this->reference_count_.value ())); + + // Close the socket that we are responsible for. + ACE_OS::closesocket (this->handle_); +} + +int +Sender::handle_input (ACE_HANDLE) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in Sender::handle_input() is %d\n", + this->reference_count_.value ())); + + // + // In this test, this method is only called when the connection has + // been closed. Remove self from Reactor. + // + + ACE_DEBUG ((LM_DEBUG, + "Event loop thread calling Sender::close() for handle %d\n", + this->handle_)); + + this->close (); + + return 0; +} + +void +Sender::close (void) +{ + // Remove socket from Reactor (may fail if another thread has already + // removed the handle from the Reactor). + this->reactor ()->remove_handler (this->handle_, + ACE_Event_Handler::ALL_EVENTS_MASK); + + // Remove self from connection cache (may fail if another thread has + // already removed "this" from the cache). + this->connection_cache_.remove_connection (this); +} + +ssize_t +Sender::send_message (void) +{ + return ACE::send_n (this->handle_, + message, + message_size); +} + +class Event_Loop_Thread : public ACE_Task_Base +{ +public: + + Event_Loop_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor); + + int svc (void); + + ACE_Reactor &reactor_; + +}; + +class Receiver : public ACE_Task_Base +{ +public: + + Receiver (ACE_Thread_Manager &thread_manager, + ACE_HANDLE handle, + int nested_upcalls); + + ~Receiver (void); + + int svc (void); + + int close (u_long flags); + + int handle_input (ACE_HANDLE); + + int resume_handler (void); + + ACE_HANDLE handle_; + + int counter_; + + int nested_upcalls_; + + int nested_upcalls_level_; + +}; + +Receiver::Receiver (ACE_Thread_Manager &thread_manager, + ACE_HANDLE handle, + int nested_upcalls) + : ACE_Task_Base (&thread_manager), + handle_ (handle), + counter_ (1), + nested_upcalls_ (nested_upcalls), + nested_upcalls_level_ (0) +{ + // Enable reference counting. + this->reference_counting_policy ().value + (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in Receiver::Receiver() is %d\n", + this->reference_count_.value ())); +} + +Receiver::~Receiver (void) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in ~Receiver::Receiver() is %d\n", + this->reference_count_.value ())); + + // Close the socket that we are responsible for. + ACE_OS::closesocket (this->handle_); +} + +int +Receiver::svc (void) +{ + // + // Continuously receive messages from the Sender. On error, exit + // thread. + // + + int result = 0; + + while (result != -1) + { + result = + this->handle_input (this->handle_); + } + + return 0; +} + +int +Receiver::handle_input (ACE_HANDLE handle) +{ + char buf[message_size + 1]; + + // Receive message. + ssize_t result = + ACE::recv_n (handle, + buf, + sizeof buf - 1); + + if (this->reactor ()) + this->reactor ()->resume_handler (handle); + + if (result == message_size) + { + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Message %d received on handle %d\n", + this->counter_++, + handle)); + + if (this->thr_count () == 0 && + this->nested_upcalls_) + { + this->nested_upcalls_level_++; + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Nesting level %d\n", + this->nested_upcalls_level_)); + + if (this->nested_upcalls_level_ != max_nested_upcall_level) + global_event_loop_thread_variable->svc (); + + this->nested_upcalls_level_--; + return 0; + } + else + return 0; + } + else + { + if (debug) + ACE_DEBUG ((LM_DEBUG, + "/*** Problem in receiving message %d on handle %d: shutting down receiving thread ***/\n", + this->counter_, + handle)); + + return -1; + } +} + +int +Receiver::resume_handler (void) +{ + /// The application takes responsibility of resuming the handler. + return ACE_APPLICATION_RESUMES_HANDLER; +} + +int +Receiver::close (u_long) +{ + // If threaded, we are responsible for deleting this instance when + // the thread completes. If not threaded, Reactor reference + // counting will handle the deletion of this instance. + delete this; + return 0; +} + +class Connector +{ +public: + + Connector (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + int nested_upcalls); + + int connect (ACE_HANDLE &client_handle, + ACE_HANDLE &server_handle, + int run_receiver_thread); + + ACE_Thread_Manager &thread_manager_; + + ACE_Reactor &reactor_; + + int nested_upcalls_; + +}; + +Connector::Connector (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + int nested_upcalls) + : thread_manager_ (thread_manager), + reactor_ (reactor), + nested_upcalls_ (nested_upcalls) +{ +} + +int +Connector::connect (ACE_HANDLE &client_handle, + ACE_HANDLE &server_handle, + int run_receiver_thread) +{ + // + // Create a connection and a receiver to receive messages on the + // connection. + // + + Pipe pipe; + int result = 0; + + for (int i = 0; i < pipe_open_attempts; ++i) + { + result = + pipe.open (); + + if (result == 0) + break; + + if (result == -1) + ACE_OS::sleep (pipe_retry_timeout); + } + + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + Receiver *receiver = + new Receiver (this->thread_manager_, + pipe.write_handle (), + this->nested_upcalls_); + + // Either the receiver is threaded or register it with the Reactor. + if (run_receiver_thread) + result = + receiver->activate (); + else + { + result = + this->reactor_.register_handler (pipe.write_handle (), + receiver, + ACE_Event_Handler::READ_MASK); + + // The reference count on the receiver was increased by the + // Reactor. + ACE_Event_Handler_var safe_receiver (receiver); + } + + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + client_handle = + pipe.read_handle (); + + server_handle = + pipe.write_handle (); + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "New connection: client handle = %d, server handle = %d\n", + client_handle, server_handle)); + + return 0; +} + +Connection_Cache::Connection_Cache (void) +{ + // Initialize the connection cache. + this->entries_ = + new Entry[number_of_connections]; + + for (int i = 0; i < number_of_connections; ++i) + { + this->entries_[i].sender_ = 0; + this->entries_[i].state_ = NOT_IN_CACHE; + } +} + +int +Connection_Cache::find (Sender *sender) +{ + for (int i = 0; i < number_of_connections; ++i) + { + if (this->entries_[i].sender_ == sender) + return i; + } + + return -1; +} + +void +Connection_Cache::add_connection (Sender *sender) +{ + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + + // Make sure that the state of the connection cache is as + // expected. <sender> should not be already in the cache. + ACE_ASSERT (this->find (sender) == -1); + + int empty_index = + this->find (0); + + sender->add_reference (); + this->entries_[empty_index].sender_ = sender; + this->entries_[empty_index].state_ = BUSY; +} + +void +Connection_Cache::remove_connection (Sender *sender) +{ + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + + // Make sure that the state of the connection cache is as expected. + // remove_connection() may already have been called. + int index = + this->find (sender); + + if (index == -1) + return; + + // If we still have the sender, remove it. + sender->remove_reference (); + this->entries_[index].sender_ = 0; + this->entries_[index].state_ = NOT_IN_CACHE; +} + +Sender * +Connection_Cache::acquire_connection (void) +{ + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, 0); + + // Find a valid and IDLE sender. + + int index = -1; + + for (int i = 0; i < number_of_connections; ++i) + { + if (this->entries_[i].sender_ && + this->entries_[i].state_ == IDLE) + index = i; + } + + if (index == -1) + return 0; + + this->entries_[index].sender_->add_reference (); + this->entries_[index].state_ = BUSY; + + return this->entries_[index].sender_; +} + +void +Connection_Cache::release_connection (Sender *sender) +{ + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); + + // Make sure that the state of the connection cache is as expected. + // remove_connection() may have already removed the connection from + // the cache. + int index = + this->find (sender); + + if (index == -1) + return; + + // If we still have the sender, idle it. + this->entries_[index].state_ = IDLE; +} + +ACE_SYNCH_MUTEX & +Connection_Cache::lock (void) +{ + return this->lock_; +} + +Connection_Cache::~Connection_Cache (void) +{ + for (int i = 0; i < number_of_connections; ++i) + { + if (this->entries_[i].sender_) + this->remove_connection (this->entries_[i].sender_); + } + + delete[] this->entries_; +} + +class Invocation_Thread : public ACE_Task_Base +{ +public: + + Invocation_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + Connection_Cache &connection_cache, + ACE_Auto_Event &new_connection_event, + int make_invocations, + int run_receiver_thread, + int nested_upcalls); + + int svc (void); + + Sender *create_connection (void); + + Connection_Cache &connection_cache_; + + ACE_Reactor &reactor_; + + ACE_Thread_Manager &thread_manager_; + + ACE_Auto_Event &new_connection_event_; + + int make_invocations_; + + int run_receiver_thread_; + + int nested_upcalls_; + +}; + +Invocation_Thread::Invocation_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + Connection_Cache &connection_cache, + ACE_Auto_Event &new_connection_event, + int make_invocations, + int run_receiver_thread, + int nested_upcalls) + : ACE_Task_Base (&thread_manager), + connection_cache_ (connection_cache), + reactor_ (reactor), + thread_manager_ (thread_manager), + new_connection_event_ (new_connection_event), + make_invocations_ (make_invocations), + run_receiver_thread_ (run_receiver_thread), + nested_upcalls_ (nested_upcalls) +{ +} + +Sender * +Invocation_Thread::create_connection (void) +{ + int result = 0; + + // Connector for creating new connections. + Connector connector (this->thread_manager_, + this->reactor_, + this->nested_upcalls_); + + // <server_handle> is a global variable. It will be used later by + // the Close_Socket_Thread. + result = + connector.connect (client_handle, + server_handle, + this->run_receiver_thread_); + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + // Create a new sender. + Sender *sender = + new Sender (client_handle, + this->connection_cache_); + + // Register it with the cache. + this->connection_cache_.add_connection (sender); + + // + // There might be a race condition here. The sender has been added + // to the cache and is potentially available to other threads + // accessing the cache. Therefore, the other thread may use this + // sender and potentially close the sender before it even gets + // registered with the Reactor. + // + // This is resolved by marking the connection as busy when it is + // first added to the cache. And only once the thread creating the + // connection is done with it, it is marked a available in the + // cache. + // + // This order of registration is important. + // + + // Register the handle with the Reactor. + result = + this->reactor_.register_handler (client_handle, + sender, + ACE_Event_Handler::READ_MASK); + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + return sender; +} + +int +Invocation_Thread::svc (void) +{ + int connection_counter = 0; + for (int message_counter = 1;; ++message_counter) + { + // Get a connection from the cache. + Sender *sender = + this->connection_cache_.acquire_connection (); + + // If no connection is available in the cache, create a new one. + if (sender == 0) + { + if (connection_counter < number_of_connections) + { + sender = this->create_connection (); + + // This lets the Close_Socket_Thread know that the new + // connection has been created. + int result = + this->new_connection_event_.signal (); + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + ++connection_counter; + message_counter = 1; + } + else + // Stop the thread, if the maximum number of connections + // for the test has been reached. + break; + } + + // The reference count on the sender was increased by the cache + // before it was returned to us. + ACE_Event_Handler_var safe_sender (sender); + + // If the test does not require making invocations, immediately + // release the connection. + if (!this->make_invocations_) + { + this->connection_cache_.release_connection (sender); + + // Sleep for a short while + ACE_OS::sleep (ACE_Time_Value (0, 10 * 1000)); + } + else + { + // Make invocation. + ssize_t result = + sender->send_message (); + + // If successful, release connection. + if (result == message_size) + { + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Message %d:%d delivered on handle %d\n", + connection_counter, + message_counter, + sender->handle_)); + + this->connection_cache_.release_connection (sender); + } + else + { + // If failure in making invocation, close the sender. + if (debug) + ACE_DEBUG ((LM_DEBUG, + "/*** Problem in delivering message %d:%d on handle %d: shutting down invocation thread ***/\n", + connection_counter, + message_counter, + sender->handle_)); + + ACE_DEBUG ((LM_DEBUG, + "Invocation thread calling Sender::close() for handle %d\n", + sender->handle_)); + + sender->close (); + } + } + } + + // Close the Reactor event loop. + this->reactor_.end_reactor_event_loop (); + + return 0; +} + +class Close_Socket_Thread : public ACE_Task_Base +{ +public: + + Close_Socket_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + ACE_Auto_Event &new_connection_event, + int make_invocations, + int run_receiver_thread); + + int svc (void); + + ACE_Auto_Event &new_connection_event_; + + ACE_Reactor &reactor_; + + int make_invocations_; + + int run_receiver_thread_; + +}; + +Close_Socket_Thread::Close_Socket_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + ACE_Auto_Event &new_connection_event, + int make_invocations, + int run_receiver_thread) + : ACE_Task_Base (&thread_manager), + new_connection_event_ (new_connection_event), + reactor_ (reactor), + make_invocations_ (make_invocations), + run_receiver_thread_ (run_receiver_thread) +{ +} + +int +Close_Socket_Thread::svc (void) +{ + ACE_OS::srand ((u_int) ACE_OS::time ()); + ACE_Time_Value timeout (0, close_timeout * 1000); + + for (; !this->reactor_.reactor_event_loop_done ();) + { + // Wait for the new connection to be established. + int result = + this->new_connection_event_.wait (&timeout, + 0); + ACE_ASSERT (result == 0 || + (result == -1 && errno == ETIME)); + + if (result == -1 && + errno == ETIME) + continue; + + // Sleep for half a second. + ACE_OS::sleep (timeout); + + int close_client = 0; + + // If the invocation thread is making invocations and if the + // receiver is threaded, either socket can be closed. + if (this->make_invocations_ && + this->run_receiver_thread_) + // Randomize which socket to close. + close_client = ACE_OS::rand () % 2; + + // If the invocation thread is making invocations, only close + // the client socket. + else if (this->make_invocations_) + close_client = 1; + else + // If the receiver is threaded, only close the server socket. + close_client = 0; + + if (close_client) + { + // Close the client socket. + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Close socket thread closing client handle %d\n", + client_handle)); + + ACE_OS::closesocket (client_handle); + } + else + { + // Close the server socket. + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Close socket thread closing server handle %d\n", + server_handle)); + + ACE_OS::closesocket (server_handle); + } + } + + return 0; +} + +Event_Loop_Thread::Event_Loop_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor) + : ACE_Task_Base (&thread_manager), + reactor_ (reactor) +{ +} + +int +Event_Loop_Thread::svc (void) +{ + // Simply run the event loop. + this->reactor_.owner (ACE_Thread::self ()); + + while (!this->reactor_.reactor_event_loop_done ()) + { + this->reactor_.handle_events (); + } + + return 0; +} + +class Purger_Thread : public ACE_Task_Base +{ +public: + + Purger_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + Connection_Cache &connection_cache); + + int svc (void); + + ACE_Reactor &reactor_; + + Connection_Cache &connection_cache_; + +}; + +Purger_Thread::Purger_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + Connection_Cache &connection_cache) + : ACE_Task_Base (&thread_manager), + reactor_ (reactor), + connection_cache_ (connection_cache) +{ +} + +int +Purger_Thread::svc (void) +{ + for (; !this->reactor_.reactor_event_loop_done ();) + { + // Get a connection from the cache. + Sender *sender = + this->connection_cache_.acquire_connection (); + + // If no connection is available in the cache, sleep for a while. + if (sender == 0) + ACE_OS::sleep (ACE_Time_Value (0, 10 * 1000)); + else + { + // The reference count on the sender was increased by the + // cache before it was returned to us. + ACE_Event_Handler_var safe_sender (sender); + + // Actively close the connection. + ACE_DEBUG ((LM_DEBUG, + "Purger thread calling Sender::close() for handle %d\n", + sender->handle_)); + + sender->close (); + } + } + + return 0; +} + +void +testing (ACE_Reactor *reactor, + int make_invocations, + int run_event_loop_thread, + int run_purger_thread, + int run_receiver_thread, + int nested_upcalls) +{ + ACE_DEBUG ((LM_DEBUG, + "\nConfiguration: \n" + "\tInvocation thread = %d\n" + "\tEvent Loop thread = %d\n" + "\tPurger thread = %d\n" + "\tReceiver thread = %d\n" + "\tNested Upcalls = %d\n\n", + make_invocations, + run_event_loop_thread, + run_purger_thread, + run_receiver_thread, + nested_upcalls)); + + ACE_Thread_Manager thread_manager; + + int result = 0; + + // Create the connection cache. + Connection_Cache connection_cache; + ACE_Auto_Event new_connection_event; + + // Create the invocation thread. + Invocation_Thread invocation_thread (thread_manager, + *reactor, + connection_cache, + new_connection_event, + make_invocations, + run_receiver_thread, + nested_upcalls); + + result = + invocation_thread.activate (); + ACE_ASSERT (result == 0); + + // Create the thread for closing the server socket. + Close_Socket_Thread close_socket_thread (thread_manager, + *reactor, + new_connection_event, + make_invocations, + run_receiver_thread); + result = + close_socket_thread.activate (); + ACE_ASSERT (result == 0); + + global_event_loop_thread_variable = 0; + + // Create a thread to run the event loop. + Event_Loop_Thread event_loop_thread (thread_manager, + *reactor); + if (run_event_loop_thread) + { + result = + event_loop_thread.activate (); + ACE_ASSERT (result == 0); + + global_event_loop_thread_variable = + &event_loop_thread; + } + + // Create a thread to run the purger. + Purger_Thread purger_thread (thread_manager, + *reactor, + connection_cache); + if (run_purger_thread) + { + result = + purger_thread.activate (); + ACE_ASSERT (result == 0); + } + + // Wait for threads to exit. + result = thread_manager.wait (); + ACE_ASSERT (result == 0); +} + +template <class REACTOR_IMPL> +class test +{ +public: + test (int ignore_nested_upcalls, + int require_event_loop_thread); +}; + +template <class REACTOR_IMPL> +test<REACTOR_IMPL>::test (int ignore_nested_upcalls, + int require_event_loop_thread) +{ + for (int i = 0; + i < (int) (sizeof test_configs / (sizeof (int) * number_of_options)); + i++) + { + if ((make_invocations == -1 || + make_invocations == test_configs[i][0]) && + (run_event_loop_thread == -1 || + run_event_loop_thread == test_configs[i][1]) && + (run_purger_thread == -1 || + run_purger_thread == test_configs[i][2]) && + (run_receiver_thread == -1 || + run_receiver_thread == test_configs[i][3]) && + (nested_upcalls == -1 || + nested_upcalls == test_configs[i][4])) + { + +#if defined (linux) + + // @@ I am not sure why but when <make_invocations> is 0 and + // there is no purger thread, the receiver thread does not + // notice that the connection has been closed. + if (!test_configs[i][0] && !test_configs[i][2]) + continue; + + // @@ Linux also does not work correctly in the following + // case: Invocation thread starts and sends messages filling + // the socket buffer. It then blocks in write(). In the + // meantime, the close connection thread closes the socket + // used by invocation thread. However, the invocation thread + // does not notice this as it does not return from write(). + // Meanwhile, the event loop thread notices that a socket in + // it's wait set has been closed, and starts to spin in + // handle_events() since the invocation thread is not taking + // out the closed handle from the Reactor's wait set. + if (test_configs[i][0] && test_configs[i][1] && !test_configs[i][3]) + continue; + +#endif /* linux */ + + if (test_configs[i][4] && ignore_nested_upcalls) + continue; + + if (!test_configs[i][1] && require_event_loop_thread) + continue; + + ACE_Reactor reactor (new REACTOR_IMPL, + 1); + + testing (&reactor, + test_configs[i][0], + test_configs[i][1], + test_configs[i][2], + test_configs[i][3], + test_configs[i][4]); + } + } +} + +static int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("a:b:c:f:g:k:l:m:n:o:uz:")); + + int cc; + while ((cc = get_opt ()) != -1) + { + switch (cc) + { + case 'a': + test_select_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'b': + test_tp_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'c': + test_wfmo_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'f': + number_of_connections = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'g': + close_timeout = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'k': + make_invocations = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'l': + run_event_loop_thread = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'm': + run_purger_thread = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'n': + run_receiver_thread = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'o': + nested_upcalls = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'z': + debug = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'u': + default: + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("\nusage: %s \n\n") + ACE_TEXT ("\t[-a test Select Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-b test TP Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-c test WFMO Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-f number of connections] (defaults to %d)\n") + ACE_TEXT ("\t[-g close timeout] (defaults to %d)\n") + ACE_TEXT ("\t[-k make invocations] (defaults to %d)\n") + ACE_TEXT ("\t[-l run event loop thread] (defaults to %d)\n") + ACE_TEXT ("\t[-m run purger thread] (defaults to %d)\n") + ACE_TEXT ("\t[-n run receiver thread] (defaults to %d)\n") + ACE_TEXT ("\t[-o nested upcalls] (defaults to %d)\n") + ACE_TEXT ("\t[-z debug] (defaults to %d)\n") + ACE_TEXT ("\n"), + argv[0], + test_select_reactor, + test_tp_reactor, + test_wfmo_reactor, + number_of_connections, + close_timeout, + make_invocations, + run_event_loop_thread, + run_purger_thread, + run_receiver_thread, + nested_upcalls, + debug)); + return -1; + } + } + + return 0; +} + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + ACE_START_TEST (ACE_TEXT ("MT_Reference_Counted_Event_Handler_Test")); + + // Validate options. + int result = + parse_args (argc, argv); + if (result != 0) + return result; + +#if defined (SIGPIPE) && !defined (ACE_LACKS_UNIX_SIGNALS) + // There's really no way to deal with this in a portable manner, so + // we just have to suck it up and get preprocessor conditional and + // ugly. + // + // Impractical to have each call to the ORB protect against the + // implementation artifact of potential writes to dead connections, + // as it'd be way expensive. Do it here; who cares about SIGPIPE in + // these kinds of applications, anyway? + (void) ACE_OS::signal (SIGPIPE, (ACE_SignalHandler) SIG_IGN); +#endif /* SIGPIPE */ + + int ignore_nested_upcalls = 1; + int perform_nested_upcalls = 0; + + int event_loop_thread_required = 1; + int event_loop_thread_not_required = 0; + + if (test_select_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting Select Reactor....\n\n")); + + test<ACE_Select_Reactor> test (ignore_nested_upcalls, + event_loop_thread_not_required); + ACE_UNUSED_ARG (test); + } + + if (test_tp_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting TP Reactor....\n\n")); + + test<ACE_TP_Reactor> test (perform_nested_upcalls, + event_loop_thread_not_required); + ACE_UNUSED_ARG (test); + } + +#if defined (ACE_WIN32) + + if (test_wfmo_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting WFMO Reactor....\n\n")); + + test<ACE_WFMO_Reactor> test (ignore_nested_upcalls, + event_loop_thread_required); + ACE_UNUSED_ARG (test); + } + +#else /* ACE_WIN32 */ + + ACE_UNUSED_ARG (event_loop_thread_required); + +#endif /* ACE_WIN32 */ + + ACE_END_TEST; + + return 0; +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class test<ACE_Select_Reactor>; +template class test<ACE_TP_Reactor>; +#if defined (ACE_WIN32) +template class test<ACE_WFMO_Reactor>; +#endif /* ACE_WIN32 */ +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate test<ACE_Select_Reactor> +#pragma instantiate test<ACE_TP_Reactor> +#if defined (ACE_WIN32) +#pragma instantiate test<ACE_WFMO_Reactor> +#endif /* ACE_WIN32 */ +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +#else /* ACE_HAS_THREADS */ + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT ("Timer_Cancellation_Test")); + + ACE_ERROR ((LM_INFO, + ACE_TEXT ("threads not supported on this platform\n"))); + + ACE_END_TEST; + + return 0; +} + +#endif /* ACE_HAS_THREADS */ diff --git a/tests/MT_Reference_Counted_Event_Handler_Test.dsp b/tests/MT_Reference_Counted_Event_Handler_Test.dsp new file mode 100644 index 00000000000..1417b7c3fcf --- /dev/null +++ b/tests/MT_Reference_Counted_Event_Handler_Test.dsp @@ -0,0 +1,158 @@ +# Microsoft Developer Studio Project File - Name="MT_Reference_Counted_Event_Handler_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=MT_Reference_Counted_Event_Handler_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "MT_Reference_Counted_Event_Handler_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "MT_Reference_Counted_Event_Handler_Test.mak" CFG="MT_Reference_Counted_Event_Handler_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "MT_Reference_Counted_Event_Handler_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_Reference_Counted_Event_Handler_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_Reference_Counted_Event_Handler_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_Reference_Counted_Event_Handler_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "MT_Reference_Counted_Event_Handler_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "MT_Reference_Counted_Event_Handler_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "MT_Reference_Counted_Event_Handler_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "MT_Reference_Counted_Event_Handler_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "MT_Reference_Counted_Event_Handler_Test - Win32 Static Debug"
+# Name "MT_Reference_Counted_Event_Handler_Test - Win32 Static Release"
+# Name "MT_Reference_Counted_Event_Handler_Test - Win32 Release"
+# Name "MT_Reference_Counted_Event_Handler_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ".cpp"
+# Begin Source File
+
+SOURCE=.\MT_Reference_Counted_Event_Handler_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ".h"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/tests/MT_Reference_Counted_Notify_Test.cpp b/tests/MT_Reference_Counted_Notify_Test.cpp new file mode 100644 index 00000000000..5ec14c70fd8 --- /dev/null +++ b/tests/MT_Reference_Counted_Notify_Test.cpp @@ -0,0 +1,459 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// MT_Reference_Counted_Notify_Test.cpp +// +// = DESCRIPTION +// This test is used to check reference counting of the event +// handlers when it interacts with the reactor notification +// mechanism. +// +// = AUTHOR +// Irfan Pyarali <irfan@oomworks.com> +// +// ============================================================================ + +#include "test_config.h" +#include "ace/Select_Reactor.h" +#include "ace/TP_Reactor.h" +#include "ace/WFMO_Reactor.h" +#include "ace/Task.h" +#include "ace/Get_Opt.h" + +ACE_RCSID(tests, MT_Reference_Counted_Notify_Test, "$Id$") + +#if defined (ACE_HAS_THREADS) + +static int test_select_reactor = 1; +static int test_tp_reactor = 1; +static int test_wfmo_reactor = 1; +static int test_empty_notify = 1; +static int test_simple_notify = 1; +static int test_reference_counted_notify = 1; +static int iterations = 5; +static int debug = 1; + +class Reference_Counted_Event_Handler : public ACE_Event_Handler +{ +public: + + Reference_Counted_Event_Handler (void); + + ~Reference_Counted_Event_Handler (void); + + int handle_input (ACE_HANDLE); + + ACE_Event_Handler::Reference_Count add_reference (void); + + ACE_Event_Handler::Reference_Count remove_reference (void); + +}; + +Reference_Counted_Event_Handler::Reference_Counted_Event_Handler (void) +{ + this->reference_counting_policy ().value + (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in Reference_Counted_Event_Handler() is %d\n", + this->reference_count_.value ())); +} + +Reference_Counted_Event_Handler::~Reference_Counted_Event_Handler (void) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in ~Reference_Counted_Event_Handler() is %d\n", + this->reference_count_.value ())); +} + +int +Reference_Counted_Event_Handler::handle_input (ACE_HANDLE) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in Reference_Counted_Event_Handler::handle_input() is %d\n", + this->reference_count_.value ())); + + return 0; +} + +ACE_Event_Handler::Reference_Count +Reference_Counted_Event_Handler::add_reference (void) +{ + ACE_Event_Handler::Reference_Count reference_count = + this->ACE_Event_Handler::add_reference (); + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count after add_reference() is %d\n", + this->reference_count_.value ())); + + return reference_count; +} + +ACE_Event_Handler::Reference_Count +Reference_Counted_Event_Handler::remove_reference (void) +{ + ACE_Event_Handler::Reference_Count reference_count = + this->ACE_Event_Handler::remove_reference (); + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count after remove_reference() is %d\n", + reference_count)); + + return reference_count; +} + +class Simple_Event_Handler : public ACE_Event_Handler +{ +public: + + Simple_Event_Handler (int notifies); + + ~Simple_Event_Handler (void); + + int handle_input (ACE_HANDLE); + + ACE_Event_Handler::Reference_Count add_reference (void); + + ACE_Event_Handler::Reference_Count remove_reference (void); + + int notifies_; +}; + +Simple_Event_Handler::Simple_Event_Handler (int notifies) + : notifies_ (notifies) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler()\n")); +} + +Simple_Event_Handler::~Simple_Event_Handler (void) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "~Simple_Event_Handler()\n")); +} + +int +Simple_Event_Handler::handle_input (ACE_HANDLE) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler::handle_input()\n")); + + this->notifies_--; + + if (this->notifies_ == 0) + delete this; + + return 0; +} + +ACE_Event_Handler::Reference_Count +Simple_Event_Handler::add_reference (void) +{ + // This should not get called. + ACE_ASSERT (0); + return 0; +} + +ACE_Event_Handler::Reference_Count +Simple_Event_Handler::remove_reference (void) +{ + // This should not get called. + ACE_ASSERT (0); + return 0; +} + +class Event_Loop_Thread : public ACE_Task_Base +{ +public: + + Event_Loop_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + int extra_iterations_needed); + + int svc (void); + + ACE_Reactor &reactor_; + + int extra_iterations_needed_; +}; + +Event_Loop_Thread::Event_Loop_Thread (ACE_Thread_Manager &thread_manager, + ACE_Reactor &reactor, + int extra_iterations_needed) + : ACE_Task_Base (&thread_manager), + reactor_ (reactor), + extra_iterations_needed_ (extra_iterations_needed) +{ +} + +int +Event_Loop_Thread::svc (void) +{ + int counter = 0; + + // Simply run the event loop. + this->reactor_.owner (ACE_Thread::self ()); + + while (1) + { + counter++; + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Event Loop iteration %d....\n", + counter)); + + this->reactor_.handle_events (); + + if (counter == + iterations + this->extra_iterations_needed_) + break; + } + + return 0; +} + +void +notify (ACE_Reactor &reactor, + ACE_Event_Handler *event_handler, + int extra_iterations_needed) +{ + ACE_Thread_Manager thread_manager; + + // Create a thread to run the event loop. + Event_Loop_Thread event_loop_thread (thread_manager, + reactor, + extra_iterations_needed); + + int result = + event_loop_thread.activate (); + ACE_ASSERT (result == 0); + + for (int i = 0; + i < iterations; + ++i) + { + ACE_OS::sleep (ACE_Time_Value (0, 500 * 1000)); + + result = reactor.notify (event_handler, + ACE_Event_Handler::READ_MASK); + + ACE_ASSERT (result == 0); + } + + thread_manager.wait (); +} + +template <class REACTOR_IMPLEMENTATION> +class test +{ +public: + test (int extra_iterations_needed); +}; + +template <class REACTOR_IMPLEMENTATION> +test<REACTOR_IMPLEMENTATION>::test (int extra_iterations_needed) +{ + if (test_empty_notify) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting empty notifies....\n\n")); + + REACTOR_IMPLEMENTATION impl; + ACE_Reactor reactor (&impl, 0); + + notify (reactor, + 0, + extra_iterations_needed); + } + + + if (test_simple_notify) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting simple notifies....\n\n")); + + REACTOR_IMPLEMENTATION impl; + ACE_Reactor reactor (&impl, 0); + + Simple_Event_Handler *simple_event_handler = + new Simple_Event_Handler (iterations); + + notify (reactor, + simple_event_handler, + extra_iterations_needed); + } + + if (test_reference_counted_notify) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting reference counted notifies....\n\n")); + + REACTOR_IMPLEMENTATION impl; + ACE_Reactor reactor (&impl, 0); + + Reference_Counted_Event_Handler *reference_counted_event_handler = + new Reference_Counted_Event_Handler; + + ACE_Event_Handler_var safe_event_handler (reference_counted_event_handler); + + notify (reactor, + reference_counted_event_handler, + extra_iterations_needed); + } +} + +static int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("a:b:c:e:f:g:z:")); + + int cc; + while ((cc = get_opt ()) != -1) + { + switch (cc) + { + case 'a': + test_select_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'b': + test_tp_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'c': + test_wfmo_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'e': + test_empty_notify = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'f': + test_simple_notify = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'g': + test_reference_counted_notify = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'z': + debug = ACE_OS::atoi (get_opt.opt_arg ()); + break; + default: + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("\nusage: %s \n\n") + ACE_TEXT ("\t[-a test Select Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-b test TP Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-c test WFMO Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-e test empty notify] (defaults to %d)\n") + ACE_TEXT ("\t[-f test simple notify] (defaults to %d)\n") + ACE_TEXT ("\t[-g test reference counted notify] (defaults to %d)\n") + ACE_TEXT ("\t[-z debug] (defaults to %d)\n") + ACE_TEXT ("\n"), + argv[0], + test_select_reactor, + test_tp_reactor, + test_wfmo_reactor, + test_empty_notify, + test_simple_notify, + test_reference_counted_notify, + debug)); + return -1; + } + } + + return 0; +} + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + ACE_START_TEST (ACE_TEXT ("MT_Reference_Counted_Notify_Test")); + + // Validate options. + int result = + parse_args (argc, argv); + if (result != 0) + return result; + + int extra_iterations_needed = 1; + int extra_iterations_not_needed = 0; + + if (test_select_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting Select Reactor....\n\n")); + + test<ACE_Select_Reactor> test (extra_iterations_not_needed); + ACE_UNUSED_ARG (test); + } + + if (test_tp_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting TP Reactor....\n\n")); + + test<ACE_TP_Reactor> test (extra_iterations_not_needed); + ACE_UNUSED_ARG (test); + } + +#if defined (ACE_WIN32) + + if (test_wfmo_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting WFMO Reactor....\n\n")); + + test<ACE_WFMO_Reactor> test (extra_iterations_needed); + ACE_UNUSED_ARG (test); + } + +#else /* ACE_WIN32 */ + + ACE_UNUSED_ARG (extra_iterations_needed); + +#endif /* ACE_WIN32 */ + + ACE_END_TEST; + + return 0; +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class test<ACE_Select_Reactor>; +template class test<ACE_TP_Reactor>; +#if defined (ACE_WIN32) +template class test<ACE_WFMO_Reactor>; +#endif /* ACE_WIN32 */ +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate test<ACE_Select_Reactor> +#pragma instantiate test<ACE_TP_Reactor> +#if defined (ACE_WIN32) +#pragma instantiate test<ACE_WFMO_Reactor> +#endif /* ACE_WIN32 */ +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +#else /* ACE_HAS_THREADS */ + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT ("MT_Reference_Counted_Notify_Test")); + + ACE_ERROR ((LM_INFO, + ACE_TEXT ("threads not supported on this platform\n"))); + + ACE_END_TEST; + + return 0; +} + +#endif /* ACE_HAS_THREADS */ diff --git a/tests/MT_Reference_Counted_Notify_Test.dsp b/tests/MT_Reference_Counted_Notify_Test.dsp new file mode 100644 index 00000000000..69261c91ca0 --- /dev/null +++ b/tests/MT_Reference_Counted_Notify_Test.dsp @@ -0,0 +1,158 @@ +# Microsoft Developer Studio Project File - Name="MT_Reference_Counted_Notify_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=MT_Reference_Counted_Notify_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "MT_Reference_Counted_Notify_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "MT_Reference_Counted_Notify_Test.mak" CFG="MT_Reference_Counted_Notify_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "MT_Reference_Counted_Notify_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_Reference_Counted_Notify_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_Reference_Counted_Notify_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_Reference_Counted_Notify_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "MT_Reference_Counted_Notify_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "MT_Reference_Counted_Notify_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "MT_Reference_Counted_Notify_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "MT_Reference_Counted_Notify_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "MT_Reference_Counted_Notify_Test - Win32 Static Debug"
+# Name "MT_Reference_Counted_Notify_Test - Win32 Static Release"
+# Name "MT_Reference_Counted_Notify_Test - Win32 Release"
+# Name "MT_Reference_Counted_Notify_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ".cpp"
+# Begin Source File
+
+SOURCE=.\MT_Reference_Counted_Notify_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ".h"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/tests/Makefile.am b/tests/Makefile.am index 3a730f32e22..f1eb8437352 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -96,58 +96,61 @@ noinst_PROGRAMS = \ Basic_Types_Test \ Bound_Ptr_Test \ Buffer_Stream_Test \ - CDR_File_Test \ - CDR_Test \ Cache_Map_Manager_Test \ Cached_Accept_Conn_Test \ Cached_Allocator_Test \ Cached_Conn_Test \ Capabilities_Test \ + CDR_File_Test \ + CDR_Test \ Collection_Test \ Config_Test \ Conn_Test \ - DLL_Test\ - DLList_Test \ Date_Time_Test \ Dev_Poll_Reactor_Test \ Dirent_Test \ + DLL_Test\ + DLList_Test \ Dynamic_Priority_Test \ Enum_Interfaces_Test \ Env_Value_Test \ FIFO_Test \ - Future_Test \ Future_Set_Test \ + Future_Test \ Get_Opt_Test \ Handle_Set_Test \ - Hash_Map_Manager_Test \ Hash_Map_Bucket_Iterator_Test \ + Hash_Map_Manager_Test \ High_Res_Timer_Test \ INET_Addr_Test \ IOStream_Test \ Lazy_Map_Manager_Test \ Log_Msg_Test \ Logging_Strategy_Test \ - MEM_Stream_Test \ - MM_Shared_Memory_Test \ - MT_Reactor_Timer_Test \ - MT_Reactor_Upcall_Test \ - MT_SOCK_Test \ Malloc_Test \ Map_Manager_Test \ Map_Test \ Max_Default_Port_Test \ Mem_Map_Test \ + MEM_Stream_Test \ Message_Block_Test \ Message_Queue_Notifications_Test \ Message_Queue_Test \ Message_Queue_Test_Ex \ + MM_Shared_Memory_Test \ + MT_Reactor_Timer_Test \ + MT_Reactor_Upcall_Test \ + MT_Reference_Counted_Event_Handler_Test \ + MT_Reference_Counted_Notify_Test \ + MT_SOCK_Test \ Multicast_Test \ Multihomed_INET_Addr_Test \ + NonBlocking_Conn_Test \ Notify_Performance_Test \ - OS_Test \ Object_Manager_Test \ Obstack_Test \ OrdMultiSet_Test \ + OS_Test \ Pipe_Test \ Priority_Buffer_Test \ Priority_Reactor_Test \ @@ -155,35 +158,35 @@ noinst_PROGRAMS = \ Proactor_Scatter_Gather_Test \ Proactor_Test \ Proactor_Timer_Test \ + Process_Manager_Test \ Process_Mutex_Test \ Process_Strategy_Test \ - Process_Manager_Test \ RB_Tree_Test \ Reactor_Dispatch_Order_Test \ Reactor_Exceptions_Test \ Reactor_Notify_Test \ Reactor_Performance_Test \ + Reactor_Registration_Test \ Reactor_Timer_Test \ Reactors_Test \ Reader_Writer_Test \ Recursive_Condition_Test \ Recursive_Mutex_Test \ Refcounted_Auto_Ptr_Test \ + Reference_Counted_Event_Handler_Test \ Reverse_Lock_Test \ + Semaphore_Test \ + Service_Config_Test \ + Signal_Test \ + Sigset_Ops_Test \ + Simple_Message_Block_Test \ SOCK_Connector_Test \ SOCK_Send_Recv_Test \ SOCK_Test \ SPIPE_Test \ SString_Test \ SV_Shared_Memory_Test \ - Semaphore_Test \ - Service_Config_Test \ - Signal_Test \ - Sigset_Ops_Test \ - Simple_Message_Block_Test \ Svc_Handler_Test \ - TP_Reactor_Test \ - TSS_Test \ Task_Test \ Thread_Manager_Test \ Thread_Mutex_Test \ @@ -191,12 +194,17 @@ noinst_PROGRAMS = \ Time_Service_Test \ Time_Value_Test \ Timeprobe_Test \ + Timer_Cancellation_Test \ + Timer_Queue_Reference_Counting_Test \ Timer_Queue_Test \ Token_Strategy_Test \ - UPIPE_SAP_Test \ + TP_Reactor_Test \ + TSS_Test \ Unbounded_Set_Test_Ex \ Upgradable_RW_Test \ + UPIPE_SAP_Test \ Vector_Test \ + WFMO_Reactor_Test \ \ Naming_Test \ \ diff --git a/tests/Makefile.tests b/tests/Makefile.tests index 9cfb5919d06..95a74358ebf 100644 --- a/tests/Makefile.tests +++ b/tests/Makefile.tests @@ -12,117 +12,126 @@ MAKEFILE = Makefile.tests #---------------------------------------------------------------------------- DIRS_PARALLEL = 1 -BIN = ACE_Test \ +BIN = \ + Bound_Ptr_Test \ + Config_Test \ + Dev_Poll_Reactor_Test \ + Dirent_Test \ + Get_Opt_Test \ + Logging_Strategy_Test \ + MEM_Stream_Test \ + Proactor_Scatter_Gather_Test \ + Proactor_Test \ + Proactor_Timer_Test \ + Refcounted_Auto_Ptr_Test \ + Token_Strategy_Test \ + Vector_Test \ + ACE_Test \ + ARGV_Test \ Aio_Platform_Test \ Arg_Shifter_Test \ - ARGV_Test \ Atomic_Op_Test \ Auto_IncDec_Test \ Barrier_Test \ Basic_Types_Test \ - Bound_Ptr_Test \ Buffer_Stream_Test \ + CDR_File_Test \ + CDR_Test \ Cache_Map_Manager_Test \ Cached_Accept_Conn_Test \ Cached_Allocator_Test \ Cached_Conn_Test \ Capabilities_Test \ - CDR_File_Test \ - CDR_Test \ Collection_Test \ - Config_Test \ Conn_Test \ - Date_Time_Test \ - Dev_Poll_Reactor_Test \ - Dirent_Test \ - DLList_Test \ DLL_Test\ + DLList_Test \ + Date_Time_Test \ + Dynamic_Priority_Test \ Enum_Interfaces_Test \ Env_Value_Test \ FIFO_Test \ - Future_Test \ Future_Set_Test \ - Get_Opt_Test \ + Future_Test \ Handle_Set_Test \ - High_Res_Timer_Test \ - Hash_Map_Manager_Test \ Hash_Map_Bucket_Iterator_Test \ + Hash_Map_Manager_Test \ + High_Res_Timer_Test \ INET_Addr_Test \ IOStream_Test \ Lazy_Map_Manager_Test \ Log_Msg_Test \ - Logging_Strategy_Test \ - Malloc_Test \ - Map_Test \ - Map_Manager_Test \ - Max_Default_Port_Test \ - MEM_Stream_Test \ - Mem_Map_Test \ MM_Shared_Memory_Test \ MT_Reactor_Timer_Test \ MT_Reactor_Upcall_Test \ + MT_Reference_Counted_Event_Handler_Test \ + MT_Reference_Counted_Notify_Test \ MT_SOCK_Test \ + Malloc_Test \ + Map_Manager_Test \ + Map_Test \ + Max_Default_Port_Test \ + Mem_Map_Test \ Message_Block_Test \ + Message_Queue_Notifications_Test \ Message_Queue_Test \ Message_Queue_Test_Ex \ - Message_Queue_Notifications_Test \ Multicast_Test \ Multihomed_INET_Addr_Test \ + NonBlocking_Conn_Test \ Notify_Performance_Test \ + OS_Test \ Object_Manager_Test \ Obstack_Test \ OrdMultiSet_Test \ - OS_Test \ - Proactor_Scatter_Gather_Test \ - Proactor_Test \ - Proactor_Timer_Test \ - Process_Mutex_Test \ - Process_Strategy_Test \ + Pipe_Test \ Priority_Buffer_Test \ - Dynamic_Priority_Test \ - Priority_Task_Test \ Priority_Reactor_Test \ + Priority_Task_Test \ Process_Manager_Test \ - Pipe_Test \ + Process_Mutex_Test \ + Process_Strategy_Test \ RB_Tree_Test \ - Reactors_Test \ + Reactor_Dispatch_Order_Test \ Reactor_Exceptions_Test \ Reactor_Notify_Test \ - Reactor_Dispatch_Order_Test \ Reactor_Performance_Test \ + Reactor_Registration_Test \ Reactor_Timer_Test \ + Reactors_Test \ Reader_Writer_Test \ - Recursive_Condition_Test \ Recursive_Condition_Bug_Test \ + Recursive_Condition_Test \ Recursive_Mutex_Test \ - Refcounted_Auto_Ptr_Test \ + Reference_Counted_Event_Handler_Test \ Reverse_Lock_Test \ - Semaphore_Test \ - Signal_Test \ - Sigset_Ops_Test \ - Simple_Message_Block_Test \ - SOCK_Test \ SOCK_Connector_Test \ SOCK_Send_Recv_Test \ + SOCK_Test \ SPIPE_Test \ SString_Test \ SV_Shared_Memory_Test \ + Semaphore_Test \ + Signal_Test \ + Sigset_Ops_Test \ + Simple_Message_Block_Test \ Svc_Handler_Test \ + TP_Reactor_Test \ + TSS_Test \ Task_Test \ Thread_Manager_Test \ Thread_Mutex_Test \ Thread_Pool_Test \ - Timeprobe_Test \ Time_Service_Test \ Time_Value_Test \ + Timeprobe_Test \ + Timer_Cancellation_Test \ + Timer_Queue_Reference_Counting_Test \ Timer_Queue_Test \ - Token_Strategy_Test \ - TP_Reactor_Test \ - TSS_Test \ - Vector_Test \ UPIPE_SAP_Test \ Unbounded_Set_Test_Ex \ - Upgradable_RW_Test + Upgradable_RW_Test \ + WFMO_Reactor_Test BIN2 = Naming_Test \ Thread_Pool_Reactor_Test \ diff --git a/tests/NonBlocking_Conn_Test.cpp b/tests/NonBlocking_Conn_Test.cpp new file mode 100644 index 00000000000..2f8cd061792 --- /dev/null +++ b/tests/NonBlocking_Conn_Test.cpp @@ -0,0 +1,349 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// NonBlocking_Conn_Test.cpp +// +// = DESCRIPTION +// This test checks for the proper working of the following: +// - blocking connections +// - blocking connections with timeouts +// - non-blocking connections +// - non-blocking connections without waiting for completions +// - non-blocking connections with timeouts +// +// = AUTHOR +// Irfan Pyarali <irfan@oomworks.com> +// +// ============================================================================ + +#include "test_config.h" +#include "ace/Connector.h" +#include "ace/Svc_Handler.h" +#include "ace/SOCK_Stream.h" +#include "ace/SOCK_Connector.h" +#include "ace/Select_Reactor.h" +#include "ace/TP_Reactor.h" +#include "ace/WFMO_Reactor.h" +#include "ace/Get_Opt.h" + +static int test_select_reactor = 1; +static int test_tp_reactor = 1; +static int test_wfmo_reactor = 1; + +class Svc_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +{ +public: + + enum Connection_Status + { + SUCCEEDED, + FAILED + }; + + Svc_Handler (void); + + void connection_status (Connection_Status &status, + int &completion_counter); + + int open (void *); + + int handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask mask); + + Connection_Status *status_; + int *completion_counter_; +}; + +Svc_Handler::Svc_Handler (void) + : status_ (0), + completion_counter_ (0) +{ +} + +void +Svc_Handler::connection_status (Connection_Status &status, + int &completion_counter) +{ + this->status_ = &status; + this->completion_counter_ = &completion_counter; +} + +int +Svc_Handler::open (void *) +{ + *this->status_ = SUCCEEDED; + (*this->completion_counter_)++; + + return 0; +} + +int +Svc_Handler::handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask mask) +{ + *this->status_ = FAILED; + (*this->completion_counter_)++; + + return ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>::handle_close (handle, + mask); +} + +typedef ACE_Connector<Svc_Handler, + ACE_SOCK_CONNECTOR> + CONNECTOR; + +static const char* hosts[] = { + "www.russiantvguide.com:80", + "www.pakarmy.gov.pk:80", + "www.cnn.com:80", + "www.waca.com.au:80", + "www.uganda.co.ug:80", + "www.cs.wustl.edu:80", + "www.affa-az.com:80", + "www.dhm.gov.np:80", + "www.msn.com:80", + "www.presidencymaldives.gov.mv:80" }; + +static int number_of_connections = 0; + +void +test_connect (ACE_Reactor &reactor, + ACE_INET_Addr *addresses, + ACE_Synch_Options &synch_options, + int complete_nonblocking_connections) +{ + CONNECTOR connector (&reactor); + + int i = 0; + + int completion_counter = 0; + Svc_Handler::Connection_Status *connection_status = + new Svc_Handler::Connection_Status[number_of_connections]; + + Svc_Handler **svc_handlers = + new Svc_Handler *[number_of_connections]; + + for (i = 0; i < number_of_connections; ++i) + { + svc_handlers[i] = + new Svc_Handler; + + svc_handlers[i]->connection_status (connection_status[i], + completion_counter); + } + + connector.connect_n (number_of_connections, + svc_handlers, + addresses, + 0, + synch_options); + + if (!synch_options[ACE_Synch_Options::USE_REACTOR]) + ACE_ASSERT (completion_counter == number_of_connections); + + if (complete_nonblocking_connections) + { + while (completion_counter != number_of_connections) + { + connector.reactor ()->handle_events (); + } + } + + connector.close (); + + for (i = 0; i < number_of_connections; ++i) + { + ACE_TCHAR buffer[1024]; + addresses[i].addr_to_string (buffer, + sizeof buffer, + 1); + + ACE_DEBUG ((LM_DEBUG, + "Connection to %s %s\n", + buffer, + connection_status[i] == Svc_Handler::SUCCEEDED ? + "succeeded" : "failed")); + + if (connection_status[i] == Svc_Handler::SUCCEEDED) + { + svc_handlers[i]->close (); + } + } + + delete[] svc_handlers; + delete[] connection_status; +} + +void +test (ACE_Reactor_Impl *impl) +{ + number_of_connections = sizeof hosts / sizeof (char *); + + ACE_INET_Addr *addresses = + new ACE_INET_Addr[number_of_connections]; + + for (int i = 0; i < number_of_connections; ++i) + { + addresses[i] = ACE_INET_Addr (hosts[i]); + } + + ACE_Reactor reactor (impl, + 1); + + int complete_nonblocking_connections = 1; + int dont_wait_for_nonblocking_connections = 0; + int ignored = 99; + + ACE_Synch_Options blocking_connect = + ACE_Synch_Options::defaults; + + ACE_DEBUG ((LM_DEBUG, + "\nBlocking connections...\n\n")); + + test_connect (reactor, + addresses, + blocking_connect, + ignored); + + blocking_connect.set (ACE_Synch_Options::USE_TIMEOUT, + ACE_Time_Value (0, 50 * 1000)); + + ACE_DEBUG ((LM_DEBUG, + "\nBlocking connections (with timeouts)...\n\n")); + + test_connect (reactor, + addresses, + blocking_connect, + ignored); + + ACE_Synch_Options nonblocking_connect + (ACE_Synch_Options::USE_REACTOR); + + ACE_DEBUG ((LM_DEBUG, + "\nNon-blocking connections...\n\n")); + + test_connect (reactor, + addresses, + nonblocking_connect, + complete_nonblocking_connections); + + ACE_DEBUG ((LM_DEBUG, + "\nNon-blocking connections (without waiting for completions)...\n\n")); + + test_connect (reactor, + addresses, + nonblocking_connect, + dont_wait_for_nonblocking_connections); + + nonblocking_connect.set (ACE_Synch_Options::USE_REACTOR | + ACE_Synch_Options::USE_TIMEOUT, + ACE_Time_Value (0, 500 * 1000)); + + ACE_DEBUG ((LM_DEBUG, + "\nNon-blocking connections (with timeouts)...\n\n")); + + test_connect (reactor, + addresses, + nonblocking_connect, + complete_nonblocking_connections); + + delete[] addresses; +} + +static int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("a:b:c:")); + + int cc; + while ((cc = get_opt ()) != -1) + { + switch (cc) + { + case 'a': + test_select_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'b': + test_tp_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'c': + test_wfmo_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case '?': + case 'u': + default: + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("\nusage: %s \n\n") + ACE_TEXT ("\t[-a test Select Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-b test TP Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-c test WFMO Reactor] (defaults to %d)\n") + ACE_TEXT ("\n"), + argv[0], + test_select_reactor, + test_tp_reactor, + test_wfmo_reactor)); + return -1; + } + } + + return 0; +} + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + ACE_START_TEST (ACE_TEXT ("NonBlocking_Conn_Test")); + + // Validate options. + int result = + parse_args (argc, argv); + if (result != 0) + return result; + + if (test_select_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting Select Reactor....\n\n")); + + test (new ACE_Select_Reactor); + } + + if (test_tp_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting TP Reactor....\n\n")); + + test (new ACE_TP_Reactor); + } + +#if defined (ACE_WIN32) + + if (test_wfmo_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting WFMO Reactor....\n\n")); + + test (new ACE_WFMO_Reactor); + } + +#endif /* ACE_WIN32 */ + + ACE_END_TEST; + + return 0; +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; +template class ACE_Connector<Svc_Handler, ACE_SOCK_CONNECTOR>; +template class ACE_NonBlocking_Connect_Handler<Svc_Handler>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +#pragma instantiate ACE_Connector<Svc_Handler, ACE_SOCK_CONNECTOR> +#pragma instantiate ACE_NonBlocking_Connect_Handler<Svc_Handler> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/tests/NonBlocking_Conn_Test.dsp b/tests/NonBlocking_Conn_Test.dsp new file mode 100644 index 00000000000..06aa128d24a --- /dev/null +++ b/tests/NonBlocking_Conn_Test.dsp @@ -0,0 +1,162 @@ +# Microsoft Developer Studio Project File - Name="NonBlocking_Conn_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=NonBlocking_Conn_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "NonBlocking_Conn_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "NonBlocking_Conn_Test.mak" CFG="NonBlocking_Conn_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "NonBlocking_Conn_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "NonBlocking_Conn_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "NonBlocking_Conn_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "NonBlocking_Conn_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "NonBlocking_Conn_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "NonBlocking_Conn_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "NonBlocking_Conn_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "NonBlocking_Conn_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "NonBlocking_Conn_Test - Win32 Static Debug"
+# Name "NonBlocking_Conn_Test - Win32 Static Release"
+# Name "NonBlocking_Conn_Test - Win32 Release"
+# Name "NonBlocking_Conn_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\NonBlocking_Conn_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/tests/Priority_Reactor_Test.cpp b/tests/Priority_Reactor_Test.cpp index 2def50b07b1..a9c2a31b8c9 100644 --- a/tests/Priority_Reactor_Test.cpp +++ b/tests/Priority_Reactor_Test.cpp @@ -402,12 +402,7 @@ template class auto_ptr<ACE_Reactor>; template class ACE_Auto_Basic_Ptr<ACE_Reactor>; template class auto_ptr<ACE_Select_Reactor>; template class ACE_Auto_Basic_Ptr<ACE_Select_Reactor>; -template class ACE_Map_Manager<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Reverse_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Entry<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*>; -template class ACE_Svc_Tuple<Write_Handler>; +template class ACE_NonBlocking_Connect_Handler<Write_Handler>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Connector<Write_Handler, ACE_SOCK_CONNECTOR> #pragma instantiate ACE_Acceptor<Read_Handler, ACE_SOCK_ACCEPTOR> @@ -416,10 +411,5 @@ template class ACE_Svc_Tuple<Write_Handler>; #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Reactor> #pragma instantiate auto_ptr<ACE_Select_Reactor> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Select_Reactor> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Entry<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*> -#pragma instantiate ACE_Svc_Tuple<Write_Handler> +#pragma instantiate ACE_NonBlocking_Connect_Handler<Write_Handler> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/tests/Reactor_Performance_Test.cpp b/tests/Reactor_Performance_Test.cpp index 42ac32da698..bd81efc9dea 100644 --- a/tests/Reactor_Performance_Test.cpp +++ b/tests/Reactor_Performance_Test.cpp @@ -411,12 +411,7 @@ template class auto_ptr<ACE_Reactor>; template class ACE_Auto_Basic_Ptr<ACE_Reactor>; template class auto_ptr<ACE_Reactor_Impl>; template class ACE_Auto_Basic_Ptr<ACE_Reactor_Impl>; -template class ACE_Map_Manager<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator_Base<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Reverse_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX>; -template class ACE_Map_Entry<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*>; -template class ACE_Svc_Tuple<Write_Handler>; +template class ACE_NonBlocking_Connect_Handler<Write_Handler>; template class ACE_Auto_Basic_Array_Ptr <Write_Handler *>; template class ACE_Auto_Basic_Array_Ptr <ACE_INET_Addr>; template class ACE_Auto_Array_Ptr <ACE_INET_Addr>; @@ -428,12 +423,7 @@ template class ACE_Auto_Array_Ptr <ACE_INET_Addr>; #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Reactor> #pragma instantiate auto_ptr<ACE_Reactor_Impl> #pragma instantiate ACE_Auto_Basic_Ptr<ACE_Reactor_Impl> -#pragma instantiate ACE_Map_Manager<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator_Base<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Reverse_Iterator<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*,ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Map_Entry<ACE_HANDLE,ACE_Svc_Tuple<Write_Handler>*> -#pragma instantiate ACE_Svc_Tuple<Write_Handler> +#pragma instantiate ACE_NonBlocking_Connect_Handler<Write_Handler> #pragma instantiate ACE_Auto_Basic_Array_Ptr <Write_Handler *> #pragma instantiate ACE_Auto_Basic_Array_Ptr <ACE_INET_Addr> #pragma instantiate ACE_Auto_Array_Ptr <ACE_INET_Addr> diff --git a/tests/Reactor_Registration_Test.cpp b/tests/Reactor_Registration_Test.cpp new file mode 100644 index 00000000000..a122dedbaab --- /dev/null +++ b/tests/Reactor_Registration_Test.cpp @@ -0,0 +1,180 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// Reactor_Registration_Test.cpp +// +// = DESCRIPTION +// This is a test of registering handlers with the Reactor. +// +// = AUTHOR +// Irfan Pyarali <irfan@oomworks.com> +// +// ============================================================================ + +#include "tests/test_config.h" +#include "ace/Pipe.h" +#include "ace/Select_Reactor.h" +#include "ace/TP_Reactor.h" +#include "ace/WFMO_Reactor.h" + +ACE_RCSID(tests, Reactor_Registration_Test, "$Id$") + +static const char message[] = "abcdefghijklmnopqrstuvwxyz"; +static const int message_size = 26; +static int iteration = 1; + +class Event_Handler : public ACE_Event_Handler +{ +public: + + Event_Handler (ACE_Reactor &reactor, + ACE_HANDLE read, + ACE_HANDLE write); + + ~Event_Handler (void); + + int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); + + int handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask close_mask); + + ACE_Pipe pipe_; +}; + +Event_Handler::Event_Handler (ACE_Reactor &reactor, + ACE_HANDLE read, + ACE_HANDLE write) + : ACE_Event_Handler (&reactor), + pipe_ (read, write) +{ + int result = 0; + + if (read == ACE_INVALID_HANDLE) + { + result = + this->pipe_.open (); + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + } + + result = + this->reactor ()->register_handler (this->pipe_.read_handle (), + this, + ACE_Event_Handler::READ_MASK); + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + result = + ACE::send_n (this->pipe_.write_handle (), + message, + message_size); + ACE_ASSERT (result == message_size); + ACE_UNUSED_ARG (result); + + ACE_DEBUG ((LM_DEBUG, + "Event_Handler::Event_Handler for %x\n", + this)); +} + +Event_Handler::~Event_Handler (void) +{ + ACE_DEBUG ((LM_DEBUG, + "Event_Handler::~Event_Handler for %x\n", + this)); +} + +int +Event_Handler::handle_input (ACE_HANDLE handle) +{ + char buf[message_size + 1]; + + int result = + ACE::recv_n (handle, + buf, + sizeof buf - 1); + ACE_ASSERT (result == message_size); + ACE_UNUSED_ARG (result); + + buf[message_size] = '\0'; + + ACE_DEBUG ((LM_DEBUG, + "Message %s received for %x\n", + buf, + this)); + + return -1; +} + +int +Event_Handler::handle_close (ACE_HANDLE, + ACE_Reactor_Mask) +{ + switch (iteration) + { + case 1: + new Event_Handler (*this->reactor (), + ACE_INVALID_HANDLE, + ACE_INVALID_HANDLE); + break; + case 2: + new Event_Handler (*this->reactor (), + this->pipe_.read_handle (), + this->pipe_.write_handle ()); + break; + case 3: + this->reactor ()->end_reactor_event_loop (); + break; + } + + iteration++; + delete this; + + return 0; +} + +void +test (ACE_Reactor_Impl &reactor_impl, + const char *reactor_type) +{ + ACE_DEBUG ((LM_DEBUG, + "\nTesting with %s\n\n", + reactor_type)); + + ACE_Reactor reactor (&reactor_impl, + 0); + + new Event_Handler (reactor, + ACE_INVALID_HANDLE, + ACE_INVALID_HANDLE); + + reactor.run_reactor_event_loop (); +} + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT ("Reactor_Registration_Test")); + + iteration = 1; + ACE_Select_Reactor select_reactor; + test (select_reactor, "ACE_Select_Reactor"); + + iteration = 1; + ACE_TP_Reactor tp_reactor; + test (tp_reactor, "ACE_TP_Reactor"); + +#if defined (ACE_WIN32) + iteration = 1; + ACE_WFMO_Reactor wfmo_reactor; + test (wfmo_reactor, "ACE_WFMO_Reactor"); +#endif /* ACE_WIN32 */ + + ACE_END_TEST; + + return 0; +} diff --git a/tests/Reactor_Registration_Test.dsp b/tests/Reactor_Registration_Test.dsp new file mode 100644 index 00000000000..bca004be3f4 --- /dev/null +++ b/tests/Reactor_Registration_Test.dsp @@ -0,0 +1,158 @@ +# Microsoft Developer Studio Project File - Name="Reactor_Registration_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Reactor_Registration_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "Reactor_Registration_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Reactor_Registration_Test.mak" CFG="Reactor_Registration_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Reactor_Registration_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "Reactor_Registration_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Reactor_Registration_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Reactor_Registration_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Reactor_Registration_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Reactor_Registration_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Reactor_Registration_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Reactor_Registration_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Reactor_Registration_Test - Win32 Static Debug"
+# Name "Reactor_Registration_Test - Win32 Static Release"
+# Name "Reactor_Registration_Test - Win32 Release"
+# Name "Reactor_Registration_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ".cpp"
+# Begin Source File
+
+SOURCE=.\Reactor_Registration_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ".h"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/tests/Reference_Counted_Event_Handler_Test.cpp b/tests/Reference_Counted_Event_Handler_Test.cpp new file mode 100644 index 00000000000..417eab5882e --- /dev/null +++ b/tests/Reference_Counted_Event_Handler_Test.cpp @@ -0,0 +1,932 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// Reference_Counted_Event_Handler_Test.cpp +// +// = DESCRIPTION +// This test is used to check reference counting of the Event +// Handler when it interacts with the Reactor. +// +// = AUTHOR +// Irfan Pyarali <irfan@oomworks.com> +// +// ============================================================================ + +#include "test_config.h" +#include "ace/Select_Reactor.h" +#include "ace/TP_Reactor.h" +#include "ace/WFMO_Reactor.h" +#include "ace/Get_Opt.h" + +ACE_RCSID(tests, Reference_Counted_Event_Handler_Test, "$Id$") + +static const char message[] = "abcdefghijklmnopqrstuvwxyz"; +static const int message_size = 26; +static int test_select_reactor = 1; +static int test_tp_reactor = 1; +static int test_wfmo_reactor = 1; +static int test_io = 1; +static int test_timers = 1; +static int test_simple_event_handler = 1; +static int test_reference_counted_event_handler_1 = 1; +static int test_reference_counted_event_handler_2 = 1; +static int test_closed_in_upcall_event_handler = 1; +static int debug = 1; +static const char *one_second_timeout = "one second timeout"; +static const char *two_second_timeout = "two second timeout"; + +class Reference_Counted_Event_Handler : public ACE_Event_Handler +{ +public: + + Reference_Counted_Event_Handler (int &events); + + ~Reference_Counted_Event_Handler (void); + + int handle_input (ACE_HANDLE); + + int handle_output (ACE_HANDLE); + + int handle_timeout (const ACE_Time_Value &, + const void *); + + int handle_signal (int, siginfo_t *, ucontext_t *); + + int handle_close (ACE_HANDLE, + ACE_Reactor_Mask); + + ACE_Event_Handler::Reference_Count add_reference (void); + + ACE_Event_Handler::Reference_Count remove_reference (void); + + ACE_Pipe pipe_; + + int &events_; + +}; + +Reference_Counted_Event_Handler::Reference_Counted_Event_Handler (int &events) + : events_ (events) +{ + int result = + this->pipe_.open (); + + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + this->reference_counting_policy ().value + (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); + + ACE_DEBUG ((LM_DEBUG, + "Reference count in Reference_Counted_Event_Handler() is %d\n", + this->reference_count_.value ())); +} + +Reference_Counted_Event_Handler::~Reference_Counted_Event_Handler (void) +{ + ACE_DEBUG ((LM_DEBUG, + "Reference count in ~Reference_Counted_Event_Handler() is %d\n", + this->reference_count_.value ())); +} + +int +Reference_Counted_Event_Handler::handle_input (ACE_HANDLE) +{ + ACE_DEBUG ((LM_DEBUG, + "Reference count in Reference_Counted_Event_Handler::handle_input() is %d\n", + this->reference_count_.value ())); + + --this->events_; + + char buf[message_size + 1]; + + ssize_t result = + ACE::recv_n (this->pipe_.read_handle (), + buf, + sizeof buf - 1); + + ACE_ASSERT (result == message_size); + + buf[message_size] = '\0'; + + ACE_DEBUG ((LM_DEBUG, + "Message received: %s\n", + buf)); + + return 0; +} + +int +Reference_Counted_Event_Handler::handle_output (ACE_HANDLE) +{ + ACE_DEBUG ((LM_DEBUG, + "Reference count in Reference_Counted_Event_Handler::handle_output() is %d\n", + this->reference_count_.value ())); + + --this->events_; + + ssize_t result = + ACE::send_n (this->pipe_.write_handle (), + message, + message_size); + + ACE_ASSERT (result == message_size); + + // No longer interested in output. + return -1; +} + +int +Reference_Counted_Event_Handler::handle_timeout (const ACE_Time_Value &, + const void *arg) +{ + ACE_DEBUG ((LM_DEBUG, + "Reference count in Reference_Counted_Event_Handler::handle_timeout() for arg = %s is %d\n", + (const char *) arg, + this->reference_count_.value ())); + + --this->events_; + + return 0; +} + +int +Reference_Counted_Event_Handler::handle_signal (int, + siginfo_t *, + ucontext_t *) +{ + return 0; +} + +int +Reference_Counted_Event_Handler::handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask masks) +{ + ACE_DEBUG ((LM_DEBUG, + "Reference_Counted_Event_Handler::handle_close() called with handle = %d and masks = %d. " + "Reference count is %d\n", + handle, + masks, + this->reference_count_.value ())); + + return 0; +} + +ACE_Event_Handler::Reference_Count +Reference_Counted_Event_Handler::add_reference (void) +{ + ACE_Event_Handler::Reference_Count reference_count = + this->ACE_Event_Handler::add_reference (); + + ACE_DEBUG ((LM_DEBUG, + "Reference count after add_reference() is %d\n", + this->reference_count_.value ())); + + return reference_count; +} + +ACE_Event_Handler::Reference_Count +Reference_Counted_Event_Handler::remove_reference (void) +{ + ACE_Event_Handler::Reference_Count reference_count = + this->ACE_Event_Handler::remove_reference (); + + ACE_DEBUG ((LM_DEBUG, + "Reference count after remove_reference() is %d\n", + reference_count)); + + return reference_count; +} + +void +reference_counted_event_handler_test_1 (ACE_Reactor *reactor) +{ + int events = 0; + int result = 0; + + Reference_Counted_Event_Handler *handler = + new Reference_Counted_Event_Handler (events); + + ACE_Event_Handler_var safe_handler (handler); + + if (test_io) + { + result = + reactor->register_handler (handler->pipe_.read_handle (), + handler, + ACE_Event_Handler::READ_MASK); + ACE_ASSERT (result == 0); + + result = + reactor->register_handler (handler->pipe_.write_handle (), + handler, + ACE_Event_Handler::WRITE_MASK); + ACE_ASSERT (result == 0); + + events += 2; + } + + if (test_timers) + { + long timer_id = + reactor->schedule_timer (handler, + one_second_timeout, + 1, + 1); + ACE_ASSERT (timer_id != -1); + + result = + reactor->cancel_timer (timer_id, + 0, + 0); + ACE_ASSERT (result == 1); + + timer_id = + reactor->schedule_timer (handler, + one_second_timeout, + 1, + 1); + ACE_ASSERT (timer_id != -1); + + timer_id = + reactor->schedule_timer (handler, + two_second_timeout, + 2); + ACE_ASSERT (result != -1); + + events += 3; + } + + while (events > 0) + { + result = + reactor->handle_events (); + } +} + +void +reference_counted_event_handler_test_2 (ACE_Reactor *reactor) +{ + int events = 0; + int result = 0; + + if (test_io) + { + Reference_Counted_Event_Handler *handler = + new Reference_Counted_Event_Handler (events); + + ACE_Event_Handler_var safe_handler (handler); + + result = + reactor->register_handler (handler->pipe_.read_handle (), + handler, + ACE_Event_Handler::READ_MASK); + ACE_ASSERT (result == 0); + + result = + reactor->register_handler (handler->pipe_.write_handle (), + handler, + ACE_Event_Handler::WRITE_MASK); + ACE_ASSERT (result == 0); + + events += 2; + } + + if (test_timers) + { + Reference_Counted_Event_Handler *handler = + new Reference_Counted_Event_Handler (events); + + ACE_Event_Handler_var safe_handler (handler); + + long timer_id = + reactor->schedule_timer (handler, + one_second_timeout, + 1, + 1); + ACE_ASSERT (timer_id != -1); + + result = + reactor->cancel_timer (timer_id, + 0, + 0); + ACE_ASSERT (result == 1); + } + + if (test_timers) + { + Reference_Counted_Event_Handler *handler = + new Reference_Counted_Event_Handler (events); + + ACE_Event_Handler_var safe_handler (handler); + + long timer_id = + reactor->schedule_timer (handler, + one_second_timeout, + 1, + 1); + ACE_ASSERT (timer_id != -1); + + timer_id = + reactor->schedule_timer (handler, + two_second_timeout, + 2); + ACE_ASSERT (result != -1); + + events += 3; + } + + while (events > 0) + { + result = + reactor->handle_events (); + } +} + +void +reference_count_1 (ACE_Reactor_Impl *impl) +{ + ACE_Reactor reactor (impl, 1); + + ACE_DEBUG ((LM_DEBUG, + "\nTesting Reference Counted Event Handler Test 1....\n\n")); + + reference_counted_event_handler_test_1 (&reactor); +} + +void +reference_count_2 (ACE_Reactor_Impl *impl) +{ + ACE_Reactor reactor (impl, 1); + + ACE_DEBUG ((LM_DEBUG, + "\nTesting Reference Counted Event Handler Test 2....\n\n")); + + reference_counted_event_handler_test_2 (&reactor); +} + +class Simple_Event_Handler : public ACE_Event_Handler +{ +public: + + Simple_Event_Handler (int &events, + int close_count); + + ~Simple_Event_Handler (void); + + int handle_input (ACE_HANDLE); + + int handle_output (ACE_HANDLE); + + int handle_timeout (const ACE_Time_Value &, + const void *); + + int handle_signal (int, siginfo_t *, ucontext_t *); + + int handle_close (ACE_HANDLE, + ACE_Reactor_Mask); + + ACE_Event_Handler::Reference_Count add_reference (void); + + ACE_Event_Handler::Reference_Count remove_reference (void); + + ACE_Pipe pipe_; + + int &events_; + + int close_count_; + +}; + +Simple_Event_Handler::Simple_Event_Handler (int &events, + int close_count) + : events_ (events), + close_count_ (close_count) +{ + int result = + this->pipe_.open (); + + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler()\n")); +} + +Simple_Event_Handler::~Simple_Event_Handler (void) +{ + ACE_DEBUG ((LM_DEBUG, + "~Simple_Event_Handler()\n")); +} + +int +Simple_Event_Handler::handle_input (ACE_HANDLE) +{ + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler::handle_input()\n")); + + --this->events_; + + char buf[message_size + 1]; + + ssize_t result = + ACE::recv_n (this->pipe_.read_handle (), + buf, + sizeof buf - 1); + + ACE_ASSERT (result == message_size); + + buf[message_size] = '\0'; + + ACE_DEBUG ((LM_DEBUG, + "Message received: %s\n", + buf)); + + return 0; +} + +int +Simple_Event_Handler::handle_output (ACE_HANDLE) +{ + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler::handle_output()\n")); + + --this->events_; + + ssize_t result = + ACE::send_n (this->pipe_.write_handle (), + message, + message_size); + + ACE_ASSERT (result == message_size); + + // No longer interested in output. + return -1; +} + +int +Simple_Event_Handler::handle_timeout (const ACE_Time_Value &, + const void *arg) +{ + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler::handle_timeout() for arg = %s\n", + (const char *) arg)); + + --this->events_; + + return 0; +} + +int +Simple_Event_Handler::handle_signal (int, + siginfo_t *, + ucontext_t *) +{ + return 0; +} + +int +Simple_Event_Handler::handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask masks) +{ + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler::handle_close() called with handle = %d and masks = %d with close count = %d.\n", + handle, + masks, + --this->close_count_)); + + if (this->close_count_ == 0) + delete this; + + return 0; +} + +ACE_Event_Handler::Reference_Count +Simple_Event_Handler::add_reference (void) +{ + // This should not get called. + ACE_ASSERT (0); + return 0; +} + +ACE_Event_Handler::Reference_Count +Simple_Event_Handler::remove_reference (void) +{ + // This should not get called. + ACE_ASSERT (0); + return 0; +} + +void +simple_event_handler (ACE_Reactor *reactor) +{ + int events = 0; + int result = 0; + + if (test_io) + { + Simple_Event_Handler *handler = + new Simple_Event_Handler (events, + 2); + + result = + reactor->register_handler (handler->pipe_.read_handle (), + handler, + ACE_Event_Handler::READ_MASK); + ACE_ASSERT (result == 0); + + result = + reactor->register_handler (handler->pipe_.write_handle (), + handler, + ACE_Event_Handler::WRITE_MASK); + ACE_ASSERT (result == 0); + + events += 2; + } + + if (test_timers) + { + Simple_Event_Handler *handler = + new Simple_Event_Handler (events, + 1); + + long timer_id = + reactor->schedule_timer (handler, + one_second_timeout, + 1, + 1); + ACE_ASSERT (timer_id != -1); + + result = + reactor->cancel_timer (timer_id, + 0, + 0); + ACE_ASSERT (result == 1); + } + + if (test_timers) + { + Simple_Event_Handler *handler = + new Simple_Event_Handler (events, + 1); + + long timer_id = + reactor->schedule_timer (handler, + one_second_timeout, + 1, + 1); + ACE_ASSERT (timer_id != -1); + + timer_id = + reactor->schedule_timer (handler, + two_second_timeout, + 2); + ACE_ASSERT (result != -1); + + events += 3; + } + + while (events > 0) + { + result = + reactor->handle_events (); + } +} + +void +simple (ACE_Reactor_Impl *impl) +{ + ACE_Reactor reactor (impl, 1); + + ACE_DEBUG ((LM_DEBUG, + "\nTesting Simple Event Handler....\n\n")); + + simple_event_handler (&reactor); +} + +class Closed_In_Upcall_Event_Handler : public ACE_Event_Handler +{ +public: + + Closed_In_Upcall_Event_Handler (int &events); + + ~Closed_In_Upcall_Event_Handler (void); + + int handle_input (ACE_HANDLE); + + int handle_close (ACE_HANDLE, + ACE_Reactor_Mask); + + ACE_Event_Handler::Reference_Count add_reference (void); + + ACE_Event_Handler::Reference_Count remove_reference (void); + + ACE_Pipe pipe_; + + int &events_; + +}; + +Closed_In_Upcall_Event_Handler::Closed_In_Upcall_Event_Handler (int &events) + : events_ (events) +{ + int result = + this->pipe_.open (); + + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + this->reference_counting_policy ().value + (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); + + ACE_DEBUG ((LM_DEBUG, + "Closed_In_Upcall_Event_Handler()\n")); +} + +Closed_In_Upcall_Event_Handler::~Closed_In_Upcall_Event_Handler (void) +{ + ACE_DEBUG ((LM_DEBUG, + "~Closed_In_Upcall_Event_Handler()\n")); +} + +int +Closed_In_Upcall_Event_Handler::handle_input (ACE_HANDLE) +{ + ACE_DEBUG ((LM_DEBUG, + "Closed_In_Upcall_Event_Handler::handle_input()\n")); + + this->events_--; + + int result = + this->reactor ()->remove_handler (this->pipe_.read_handle (), + ACE_Event_Handler::ALL_EVENTS_MASK); + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + char buf[message_size + 1]; + + ssize_t recv_result = + ACE::recv_n (this->pipe_.read_handle (), + buf, + sizeof buf - 1); + + ACE_ASSERT (recv_result == message_size); + + buf[message_size] = '\0'; + + ACE_DEBUG ((LM_DEBUG, + "Message received: %s\n", + buf)); + + return 0; +} + +int +Closed_In_Upcall_Event_Handler::handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask masks) +{ + ACE_DEBUG ((LM_DEBUG, + "Closed_In_Upcall_Event_Handler::handle_close() called with handle = %d and masks = %d. " + "Reference count is %d\n", + handle, + masks, + this->reference_count_.value ())); + + return 0; +} + +ACE_Event_Handler::Reference_Count +Closed_In_Upcall_Event_Handler::add_reference (void) +{ + ACE_Event_Handler::Reference_Count reference_count = + this->ACE_Event_Handler::add_reference (); + + ACE_DEBUG ((LM_DEBUG, + "Reference count after add_reference() is %d\n", + this->reference_count_.value ())); + + return reference_count; +} + +ACE_Event_Handler::Reference_Count +Closed_In_Upcall_Event_Handler::remove_reference (void) +{ + ACE_Event_Handler::Reference_Count reference_count = + this->ACE_Event_Handler::remove_reference (); + + ACE_DEBUG ((LM_DEBUG, + "Reference count after remove_reference() is %d\n", + reference_count)); + + return reference_count; +} + +void +closed_in_upcall_event_handler (ACE_Reactor *reactor) +{ + int events = 0; + int result = 0; + + if (test_io) + { + Closed_In_Upcall_Event_Handler *handler = + new Closed_In_Upcall_Event_Handler (events); + + ACE_Event_Handler_var safe_handler (handler); + + ssize_t result = + ACE::send_n (handler->pipe_.write_handle (), + message, + message_size); + + ACE_ASSERT (result == message_size); + + result = + reactor->register_handler (handler->pipe_.read_handle (), + handler, + ACE_Event_Handler::READ_MASK); + ACE_ASSERT (result == 0); + + events += 1; + } + + while (events > 0) + { + result = + reactor->handle_events (); + } +} + +void +closed_in_upcall (ACE_Reactor_Impl *impl) +{ + ACE_Reactor reactor (impl, 1); + + ACE_DEBUG ((LM_DEBUG, + "\nTesting Closed in Upcall Event Handler....\n\n")); + + closed_in_upcall_event_handler (&reactor); +} + +template <class REACTOR_IMPLEMENTATION> +class test +{ +public: + test (void); +}; + +template <class REACTOR_IMPLEMENTATION> +test<REACTOR_IMPLEMENTATION>::test (void) +{ + if (test_simple_event_handler) + simple (new REACTOR_IMPLEMENTATION); + + if (test_reference_counted_event_handler_1) + reference_count_1 (new REACTOR_IMPLEMENTATION); + + if (test_reference_counted_event_handler_2) + reference_count_2 (new REACTOR_IMPLEMENTATION); + + if (test_closed_in_upcall_event_handler) + closed_in_upcall (new REACTOR_IMPLEMENTATION); +} + +static int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("a:b:c:f:g:h:i:k:l:z:")); + + int cc; + while ((cc = get_opt ()) != -1) + { + switch (cc) + { + case 'a': + test_select_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'b': + test_tp_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'c': + test_wfmo_reactor = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'f': + test_simple_event_handler = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'g': + test_reference_counted_event_handler_1 = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'h': + test_reference_counted_event_handler_2 = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'i': + test_closed_in_upcall_event_handler = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'k': + test_io = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'l': + test_timers = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'z': + debug = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case '?': + case 'u': + default: + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("\nusage: %s \n\n") + ACE_TEXT ("\t[-a test Select Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-b test TP Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-c test WFMO Reactor] (defaults to %d)\n") + ACE_TEXT ("\t[-f test simple event handler] (defaults to %d)\n") + ACE_TEXT ("\t[-g test reference counted event handler (first test)] (defaults to %d)\n") + ACE_TEXT ("\t[-h test reference counted event handler (second test)] (defaults to %d)\n") + ACE_TEXT ("\t[-i test closed in upcall event handler] (defaults to %d)\n") + ACE_TEXT ("\t[-k test io] (defaults to %d)\n") + ACE_TEXT ("\t[-l test timers] (defaults to %d)\n") + ACE_TEXT ("\t[-z debug] (defaults to %d)\n") + ACE_TEXT ("\n"), + argv[0], + test_select_reactor, + test_tp_reactor, + test_wfmo_reactor, + test_simple_event_handler, + test_reference_counted_event_handler_1, + test_reference_counted_event_handler_2, + test_closed_in_upcall_event_handler, + test_io, + test_timers, + debug)); + return -1; + } + } + + return 0; +} + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + ACE_START_TEST (ACE_TEXT ("Reference_Counted_Event_Handler_Test")); + + // Validate options. + int result = + parse_args (argc, argv); + if (result != 0) + return result; + + if (test_select_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting Select Reactor....\n\n")); + + test<ACE_Select_Reactor> test; + ACE_UNUSED_ARG (test); + } + + if (test_tp_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting TP Reactor....\n\n")); + + test<ACE_TP_Reactor> test; + ACE_UNUSED_ARG (test); + } + +#if defined (ACE_WIN32) + + if (test_wfmo_reactor) + { + ACE_DEBUG ((LM_DEBUG, + "\n\nTesting WFMO Reactor....\n\n")); + + test<ACE_WFMO_Reactor> test; + ACE_UNUSED_ARG (test); + } + +#endif /* ACE_WIN32 */ + + ACE_END_TEST; + + return 0; +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class test<ACE_Select_Reactor>; +template class test<ACE_TP_Reactor>; +#if defined (ACE_WIN32) +template class test<ACE_WFMO_Reactor>; +#endif /* ACE_WIN32 */ +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate test<ACE_Select_Reactor> +#pragma instantiate test<ACE_TP_Reactor> +#if defined (ACE_WIN32) +#pragma instantiate test<ACE_WFMO_Reactor> +#endif /* ACE_WIN32 */ +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/tests/Reference_Counted_Event_Handler_Test.dsp b/tests/Reference_Counted_Event_Handler_Test.dsp new file mode 100644 index 00000000000..74c1432e724 --- /dev/null +++ b/tests/Reference_Counted_Event_Handler_Test.dsp @@ -0,0 +1,158 @@ +# Microsoft Developer Studio Project File - Name="Reference_Counted_Event_Handler_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Reference_Counted_Event_Handler_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "Reference_Counted_Event_Handler_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Reference_Counted_Event_Handler_Test.mak" CFG="Reference_Counted_Event_Handler_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Reference_Counted_Event_Handler_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "Reference_Counted_Event_Handler_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Reference_Counted_Event_Handler_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Reference_Counted_Event_Handler_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Reference_Counted_Event_Handler_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Reference_Counted_Event_Handler_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Reference_Counted_Event_Handler_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Reference_Counted_Event_Handler_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Reference_Counted_Event_Handler_Test - Win32 Static Debug"
+# Name "Reference_Counted_Event_Handler_Test - Win32 Static Release"
+# Name "Reference_Counted_Event_Handler_Test - Win32 Release"
+# Name "Reference_Counted_Event_Handler_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ".cpp"
+# Begin Source File
+
+SOURCE=.\Reference_Counted_Event_Handler_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ".h"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/tests/TP_Reactor_Test.cpp b/tests/TP_Reactor_Test.cpp index f5a984329a3..1bf257190de 100644 --- a/tests/TP_Reactor_Test.cpp +++ b/tests/TP_Reactor_Test.cpp @@ -1137,24 +1137,14 @@ disable_signal (int sigmin, int sigmax) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Svc_Tuple<Sender>; -template class ACE_Map_Manager<int, ACE_Svc_Tuple<Sender> *, ACE_RW_Thread_Mutex >; -template class ACE_Map_Entry<int, ACE_Svc_Tuple<Sender> * >; -template class ACE_Map_Iterator<int, ACE_Svc_Tuple<Sender> *, ACE_RW_Thread_Mutex >; -template class ACE_Map_Reverse_Iterator<int, ACE_Svc_Tuple<Sender> *, ACE_RW_Thread_Mutex >; -template class ACE_Map_Iterator_Base<int, ACE_Svc_Tuple<Sender> *, ACE_RW_Thread_Mutex >; +template class ACE_NonBlocking_Connect_Handler<Sender>; template class ACE_Connector<Sender,ACE_SOCK_CONNECTOR>; template class ACE_Acceptor<Receiver,ACE_SOCK_ACCEPTOR>; template class ACE_Svc_Handler<ACE_SOCK_STREAM,ACE_MT_SYNCH>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Svc_Tuple<Sender> -#pragma instantiate ACE_Map_Manager<int, ACE_Svc_Tuple<Sender> *, ACE_RW_Thread_Mutex > -#pragma instantiate ACE_Map_Entry<int, ACE_Svc_Tuple<Sender> * > -#pragma instantiate ACE_Map_Iterator<int, ACE_Svc_Tuple<Sender> *, ACE_RW_Thread_Mutex > -#pragma instantiate ACE_Map_Reverse_Iterator<int, ACE_Svc_Tuple<Sender> *, ACE_RW_Thread_Mutex > -#pragma instantiate ACE_Map_Iterator_Base<int, ACE_Svc_Tuple<Sender> *, ACE_RW_Thread_Mutex > +#pragma instantiate ACE_NonBlocking_Connect_Handler<Sender> #pragma instantiate ACE_Connector<Sender,ACE_SOCK_CONNECTOR> #pragma instantiate ACE_Acceptor<Receiver,ACE_SOCK_ACCEPTOR> #pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM,ACE_MT_SYNCH> diff --git a/tests/Tests.bor b/tests/Tests.bor index 48dcca6e302..5ea476caecc 100644 --- a/tests/Tests.bor +++ b/tests/Tests.bor @@ -5,126 +5,135 @@ NAMES = \ ACE_Test \ - Aio_Platform_Test \ + ARGV_Test \ + Aio_Platform_Test \ Arg_Shifter_Test \ - ARGV_Test \ - Atomic_Op_Test \ - Auto_IncDec_Test \ - Barrier_Test \ - Basic_Types_Test \ + Atomic_Op_Test \ + Auto_IncDec_Test \ + Barrier_Test \ + Basic_Types_Test \ Bound_Ptr_Test \ - Buffer_Stream_Test \ - Cache_Map_Manager_Test \ - Cached_Accept_Conn_Test \ + Buffer_Stream_Test \ + CDR_Array_Test \ + CDR_File_Test \ + CDR_Test \ + Cache_Map_Manager_Test \ + Cached_Accept_Conn_Test \ Cached_Allocator_Test \ - Cached_Conn_Test \ - Capabilities_Test \ - CDR_Array_Test \ - CDR_File_Test \ - CDR_Test \ - Codecs_Test \ - Collection_Test \ - Conn_Test \ - Config_Test \ + Cached_Conn_Test \ + Capabilities_Test \ + Codecs_Test \ + Collection_Test \ + Config_Test \ + Conn_Test \ + DLL_Test \ + DLList_Test \ Date_Time_Test \ - Dirent_Test \ - DLL_Test \ - DLList_Test \ - Dynamic_Priority_Test \ - Enum_Interfaces_Test \ - Env_Value_Test \ - FlReactor_Test \ + Dirent_Test \ + Dynamic_Priority_Test \ + Enum_Interfaces_Test \ + Env_Value_Test \ + FlReactor_Test \ Framework_Component_Test \ - Future_Set_Test \ - Future_Test \ - Get_Opt_Test \ - Handle_Set_Test \ - Hash_Map_Bucket_Iterator_Test \ - Hash_Map_Manager_Test \ - High_Res_Timer_Test \ - INET_Addr_Test \ - IOStream_Test \ - Lazy_Map_Manager_Test \ - Log_Msg_Test \ - Logging_Strategy_Test \ - Malloc_Test \ - Map_Manager_Test \ - Map_Test \ - Max_Default_Port_Test \ - MEM_Stream_Test \ - Mem_Map_Test \ - Message_Block_Test \ - Message_Queue_Notifications_Test \ - Message_Queue_Test \ - Message_Queue_Test_Ex \ - MM_Shared_Memory_Test \ - MT_Reactor_Timer_Test \ - MT_Reactor_Upcall_Test \ - MT_SOCK_Test \ - Multicast_Test \ - Multihomed_INET_Addr_Test \ - Naming_Test \ - New_Fail_Test \ - Notify_Performance_Test \ - Object_Manager_Test \ - Obstack_Test \ - OrdMultiSet_Test \ - OS_Test \ - Pipe_Test \ - Proactor_Scatter_Gather_Test \ - Proactor_Test \ - Proactor_Timer_Test \ - Priority_Buffer_Test \ - Priority_Reactor_Test \ - Priority_Task_Test \ - Process_Manager_Test \ - Process_Mutex_Test \ - Process_Strategy_Test \ - RB_Tree_Test \ - Reactor_Exceptions_Test \ - Reactor_Notify_Test \ - Reactor_Dispatch_Order_Test \ - Reactor_Performance_Test \ - Reactor_Timer_Test \ - Reactors_Test \ - Reader_Writer_Test \ - Recursive_Condition_Test \ - Recursive_Condition_Bug_Test \ - Recursive_Mutex_Test \ - Refcounted_Auto_Ptr_Test \ - Reverse_Lock_Test \ - Semaphore_Test \ - Service_Config_Test \ - Signal_Test \ - Sigset_Ops_Test \ - Simple_Message_Block_Test \ - SOCK_Connector_Test \ - SOCK_Send_Recv_Test \ - SOCK_Test \ - SPIPE_Test \ - SString_Test \ - SV_Shared_Memory_Test \ - Svc_Handler_Test \ - Task_Test \ - Thread_Manager_Test \ - Thread_Mutex_Test \ - Thread_Pool_Reactor_Test \ - Thread_Pool_Reactor_Resume_Test \ - Thread_Pool_Test \ - Time_Service_Test \ - Time_Value_Test \ - Timeprobe_Test \ - Timer_Queue_Test \ - TkReactor_Test \ - Tokens_Test \ - Token_Strategy_Test \ - TP_Reactor_Test \ - TSS_Test \ - Vector_Test \ - Unbounded_Set_Test_Ex \ - Upgradable_RW_Test \ - UPIPE_SAP_Test \ - XtReactor_Test + Future_Set_Test \ + Future_Test \ + Get_Opt_Test \ + Handle_Set_Test \ + Hash_Map_Bucket_Iterator_Test \ + Hash_Map_Manager_Test \ + High_Res_Timer_Test \ + INET_Addr_Test \ + IOStream_Test \ + Lazy_Map_Manager_Test \ + Log_Msg_Test \ + Logging_Strategy_Test \ + MEM_Stream_Test \ + MM_Shared_Memory_Test \ + MT_Reactor_Timer_Test \ + MT_Reactor_Upcall_Test \ + MT_Reference_Counted_Event_Handler_Test \ + MT_Reference_Counted_Notify_Test \ + MT_SOCK_Test \ + Malloc_Test \ + Map_Manager_Test \ + Map_Test \ + Max_Default_Port_Test \ + Mem_Map_Test \ + Message_Block_Test \ + Message_Queue_Notifications_Test \ + Message_Queue_Test \ + Message_Queue_Test_Ex \ + Multicast_Test \ + Multihomed_INET_Addr_Test \ + Naming_Test \ + New_Fail_Test \ + NonBlocking_Conn_Test \ + Notify_Performance_Test \ + OS_Test \ + Object_Manager_Test \ + Obstack_Test \ + OrdMultiSet_Test \ + Pipe_Test \ + Priority_Buffer_Test \ + Priority_Reactor_Test \ + Priority_Task_Test \ + Proactor_Scatter_Gather_Test \ + Proactor_Test \ + Proactor_Timer_Test \ + Process_Manager_Test \ + Process_Mutex_Test \ + Process_Strategy_Test \ + RB_Tree_Test \ + Reactor_Dispatch_Order_Test \ + Reactor_Exceptions_Test \ + Reactor_Notify_Test \ + Reactor_Performance_Test \ + Reactor_Registration_Test \ + Reactor_Timer_Test \ + Reactors_Test \ + Reader_Writer_Test \ + Recursive_Condition_Bug_Test \ + Recursive_Condition_Test \ + Recursive_Mutex_Test \ + Refcounted_Auto_Ptr_Test \ + Reference_Counted_Event_Handler_Test \ + Reverse_Lock_Test \ + SOCK_Connector_Test \ + SOCK_Send_Recv_Test \ + SOCK_Test \ + SPIPE_Test \ + SString_Test \ + SV_Shared_Memory_Test \ + Semaphore_Test \ + Service_Config_Test \ + Signal_Test \ + Sigset_Ops_Test \ + Simple_Message_Block_Test \ + Svc_Handler_Test \ + TP_Reactor_Test \ + TSS_Test \ + Task_Test \ + Thread_Manager_Test \ + Thread_Mutex_Test \ + Thread_Pool_Reactor_Resume_Test \ + Thread_Pool_Reactor_Test \ + Thread_Pool_Test \ + Time_Service_Test \ + Time_Value_Test \ + Timeprobe_Test \ + Timer_Cancellation_Test \ + Timer_Queue_Reference_Counting_Test \ + Timer_Queue_Test \ + TkReactor_Test \ + Token_Strategy_Test \ + Tokens_Test \ + UPIPE_SAP_Test \ + Unbounded_Set_Test_Ex \ + Upgradable_RW_Test \ + Vector_Test \ + WFMO_Reactor_Test \ + XtReactor_Test + !ifdef SSL_ROOT DIRS = RMCast \ diff --git a/tests/Timer_Cancellation_Test.cpp b/tests/Timer_Cancellation_Test.cpp new file mode 100644 index 00000000000..6ba4c794535 --- /dev/null +++ b/tests/Timer_Cancellation_Test.cpp @@ -0,0 +1,160 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// Timer_Cancellation_Test.cpp +// +// = DESCRIPTION +// A test to ensure the timer cancellation works correctly. +// +// = AUTHOR +// Irfan Pyarali <irfan@oomworks.com> +// +// ============================================================================ + +#include "tests/test_config.h" +#include "ace/TP_Reactor.h" +#include "ace/Task.h" + +ACE_RCSID(tests, Timer_Cancellation_Test, "$Id$") + +#if defined (ACE_HAS_THREADS) + +class Deadlock : public ACE_Task_Base +{ +public: + + int svc (void); + + int handle_timeout (const ACE_Time_Value ¤t_time, + const void *act); +}; + +int +Deadlock::svc (void) +{ + ACE_DEBUG ((LM_DEBUG, + "Deadlock starts accessing Reactor and Timer Queue....\n")); + + this->reactor ()->schedule_timer (this, + 0, + ACE_Time_Value (1)); + + ACE_DEBUG ((LM_DEBUG, + "Deadlock completes accessing Reactor and Timer Queue....\n")); + + return 0; +} + +int +Deadlock::handle_timeout (const ACE_Time_Value &, + const void *) +{ + ACE_DEBUG ((LM_DEBUG, + "Deadlock timeout\n")); + + return 0; +} + +class Event_Handler : public ACE_Event_Handler +{ +public: + + Event_Handler (Deadlock &deadlock); + + int handle_timeout (const ACE_Time_Value ¤t_time, + const void *act); + + int handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask close_mask); + + Deadlock &deadlock_; +}; + +Event_Handler::Event_Handler (Deadlock &deadlock) + : deadlock_ (deadlock) +{ +} + +int +Event_Handler::handle_timeout (const ACE_Time_Value &, + const void *) +{ + ACE_DEBUG ((LM_DEBUG, + "Event_Handler timeout\n")); + + return -1; +} + +int +Event_Handler::handle_close (ACE_HANDLE, + ACE_Reactor_Mask) +{ + ACE_DEBUG ((LM_DEBUG, + "Event_Handler closed\n")); + + // Activate Deadlock. + this->deadlock_.activate (); + + // Give Deadlock a chance to deadlock... ;-) + ACE_OS::sleep (1); + + ACE_DEBUG ((LM_DEBUG, + "Event Handler starts accessing Reactor....\n")); + + // This is a superfluous call to the Reactor to acquire its lock. + this->reactor ()->max_notify_iterations (); + + ACE_DEBUG ((LM_DEBUG, + "Event Handler completes accessing Reactor....\n")); + + return 0; +} + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT ("Timer_Cancellation_Test")); + + ACE_Reactor reactor (new ACE_TP_Reactor, + 1); + + Deadlock deadlock; + deadlock.reactor (&reactor); + + Event_Handler handler (deadlock); + + // Scheduler a timer to kick things off. + reactor.schedule_timer (&handler, + 0, + ACE_Time_Value (1)); + + // Run the event loop for a while. + ACE_Time_Value timeout (4); + reactor.run_reactor_event_loop (timeout); + + ACE_END_TEST; + + return 0; +} + +#else /* ACE_HAS_THREADS */ + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT ("Timer_Cancellation_Test")); + + ACE_ERROR ((LM_INFO, + ACE_TEXT ("threads not supported on this platform\n"))); + + ACE_END_TEST; + + return 0; +} + +#endif /* ACE_HAS_THREADS */ diff --git a/tests/Timer_Cancellation_Test.dsp b/tests/Timer_Cancellation_Test.dsp new file mode 100644 index 00000000000..e77caebb275 --- /dev/null +++ b/tests/Timer_Cancellation_Test.dsp @@ -0,0 +1,158 @@ +# Microsoft Developer Studio Project File - Name="Timer_Cancellation_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Timer_Cancellation_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "Timer_Cancellation_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Timer_Cancellation_Test.mak" CFG="Timer_Cancellation_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Timer_Cancellation_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "Timer_Cancellation_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Timer_Cancellation_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Timer_Cancellation_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Timer_Cancellation_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Timer_Cancellation_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Timer_Cancellation_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Timer_Cancellation_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Timer_Cancellation_Test - Win32 Static Debug"
+# Name "Timer_Cancellation_Test - Win32 Static Release"
+# Name "Timer_Cancellation_Test - Win32 Release"
+# Name "Timer_Cancellation_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ".cpp"
+# Begin Source File
+
+SOURCE=.\Timer_Cancellation_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ".h"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/tests/Timer_Queue_Reference_Counting_Test.cpp b/tests/Timer_Queue_Reference_Counting_Test.cpp new file mode 100644 index 00000000000..33db9d8a5fb --- /dev/null +++ b/tests/Timer_Queue_Reference_Counting_Test.cpp @@ -0,0 +1,716 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// Timer_Queue_Reference_Counting_Test.cpp +// +// = DESCRIPTION +// This test is used to check reference counting of the Event +// Handler when it interacts with Timer Queues. +// +// = AUTHOR +// Irfan Pyarali <irfan@oomworks.com> +// +// ============================================================================ + +#include "test_config.h" +#include "ace/Get_Opt.h" +#include "ace/Timer_Queue.h" +#include "ace/Timer_Heap.h" +#include "ace/Timer_List.h" +#include "ace/Timer_Hash.h" +#include "ace/Timer_Wheel.h" +#include "ace/Reactor.h" + +ACE_RCSID(tests, Timer_Queue_Reference_Counting_Test, "$Id$") + +static int debug = 0; +static const char *one_second_timeout = "one second timeout"; +static const char *two_second_timeout = "two second timeout"; + +class Reference_Counted_Event_Handler : public ACE_Event_Handler +{ +public: + + Reference_Counted_Event_Handler (int expected_number_of_handle_close_calls); + + ~Reference_Counted_Event_Handler (void); + + int handle_timeout (const ACE_Time_Value &, + const void *); + + int handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask masks); + + int expected_number_of_handle_close_calls_; + int number_of_handle_close_calls_; +}; + +Reference_Counted_Event_Handler::Reference_Counted_Event_Handler (int expected_number_of_handle_close_calls) + : expected_number_of_handle_close_calls_ (expected_number_of_handle_close_calls), + number_of_handle_close_calls_ (0) +{ + this->reference_counting_policy ().value + (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); + + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in Reference_Counted_Event_Handler() is %d\n", + this->reference_count_.value ())); +} + +Reference_Counted_Event_Handler::~Reference_Counted_Event_Handler (void) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in ~Reference_Counted_Event_Handler() is %d\n", + this->reference_count_.value ())); + + if (this->expected_number_of_handle_close_calls_ != -1) + ACE_ASSERT (this->number_of_handle_close_calls_ == + this->expected_number_of_handle_close_calls_); +} + +int +Reference_Counted_Event_Handler::handle_timeout (const ACE_Time_Value &, + const void *arg) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference count in Reference_Counted_Event_Handler::handle_timeout() for arg = %s is %d\n", + (const char *) arg, + this->reference_count_.value ())); + + return 0; +} + +int +Reference_Counted_Event_Handler::handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask masks) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Reference_Counted_Event_Handler::handle_close() called with handle = %d and masks = %d. " + "Reference count is %d\n", + handle, + masks, + this->reference_count_.value ())); + + ++this->number_of_handle_close_calls_; + + return 0; +} + +void +cancellation (ACE_Timer_Queue &timer_queue, + int repeat_timer, + int cancel_timers, + int cancel_handler, + int second_timer, + int dont_call_handle_close) +{ + int result = 0; + + int expected_number_of_handle_close_calls = -1; + if (!dont_call_handle_close) + { + if (second_timer) + expected_number_of_handle_close_calls = 2; + else + expected_number_of_handle_close_calls = 1; + } + + Reference_Counted_Event_Handler *handler = + new Reference_Counted_Event_Handler (expected_number_of_handle_close_calls); + + ACE_Event_Handler_var safe_handler (handler); + + long first_timer_id = -1; + long second_timer_id = -1; + + if (repeat_timer) + { + first_timer_id = + timer_queue.schedule (handler, + one_second_timeout, + ACE_Time_Value (1) + timer_queue.gettimeofday (), + ACE_Time_Value (1)); + ACE_ASSERT (first_timer_id != -1); + } + else + { + first_timer_id = + timer_queue.schedule (handler, + one_second_timeout, + ACE_Time_Value (1) + timer_queue.gettimeofday ()); + ACE_ASSERT (first_timer_id != -1); + } + + if (second_timer) + { + second_timer_id = + timer_queue.schedule (handler, + two_second_timeout, + ACE_Time_Value (2) + timer_queue.gettimeofday (), + ACE_Time_Value (2)); + ACE_ASSERT (second_timer_id != -1); + } + + if (!cancel_timers) + return; + + if (cancel_handler) + { + result = + timer_queue.cancel (handler, + dont_call_handle_close); + + if (second_timer) + ACE_ASSERT (result == 2); + else + ACE_ASSERT (result == 1); + } + else + { + result = + timer_queue.cancel (first_timer_id, + 0, + dont_call_handle_close); + ACE_ASSERT (result == 1); + + if (second_timer) + { + result = + timer_queue.cancel (second_timer_id, + 0, + dont_call_handle_close); + ACE_ASSERT (result == 1); + } + } +} + +template <class TIMER_QUEUE> +class cancellation_test +{ +public: + cancellation_test (const char *); +}; + +template <class TIMER_QUEUE> +cancellation_test<TIMER_QUEUE>::cancellation_test (const char *timer_queue_type) +{ + ACE_DEBUG ((LM_DEBUG, + "\nCancellation test for %s\n\n", + timer_queue_type)); + + int configs[][5] = { + { 0, 0, 0, 0, 0, }, + { 0, 0, 0, 0, 1, }, + { 0, 0, 0, 1, 0, }, + { 0, 0, 0, 1, 1, }, + { 0, 0, 1, 0, 0, }, + { 0, 0, 1, 0, 1, }, + { 0, 0, 1, 1, 0, }, + { 0, 0, 1, 1, 1, }, + { 0, 1, 0, 0, 0, }, + { 0, 1, 0, 0, 1, }, + { 0, 1, 0, 1, 0, }, + { 0, 1, 0, 1, 1, }, + { 0, 1, 1, 0, 0, }, + { 0, 1, 1, 0, 1, }, + { 0, 1, 1, 1, 0, }, + { 0, 1, 1, 1, 1, }, + { 1, 0, 0, 0, 0, }, + { 1, 0, 0, 0, 1, }, + { 1, 0, 0, 1, 0, }, + { 1, 0, 0, 1, 1, }, + { 1, 0, 1, 0, 0, }, + { 1, 0, 1, 0, 1, }, + { 1, 0, 1, 1, 0, }, + { 1, 0, 1, 1, 1, }, + { 1, 1, 0, 0, 0, }, + { 1, 1, 0, 0, 1, }, + { 1, 1, 0, 1, 0, }, + { 1, 1, 0, 1, 1, }, + { 1, 1, 1, 0, 0, }, + { 1, 1, 1, 0, 1, }, + { 1, 1, 1, 1, 0, }, + { 1, 1, 1, 1, 1, }, + }; + + for (int i = 0; + i < (int) (sizeof configs / (sizeof (int) * 5)); + i++) + { + TIMER_QUEUE timer_queue; + + cancellation (timer_queue, + configs[i][0], + configs[i][1], + configs[i][2], + configs[i][3], + configs[i][4]); + } +} + +typedef int (*Expire_Function) (ACE_Timer_Queue &timer_queue); + +int +invoke_expire (ACE_Timer_Queue &timer_queue) +{ + return timer_queue.expire (); +} + +int +invoke_one_upcall (ACE_Timer_Queue &timer_queue) +{ + // Get the current time + ACE_Time_Value current_time (timer_queue.gettimeofday () + + timer_queue.timer_skew ()); + + // Look for a node in the timer queue whose timer <= the present + // time. + ACE_Timer_Node_Dispatch_Info dispatch_info; + + if (timer_queue.dispatch_info (current_time, + dispatch_info)) + { + const void *upcall_act = 0; + + // Preinvoke. + timer_queue.preinvoke (dispatch_info, + current_time, + upcall_act); + + // Call the functor + timer_queue.upcall (dispatch_info, + current_time); + + // Postinvoke + timer_queue.postinvoke (dispatch_info, + current_time, + upcall_act); + + // We have dispatched a timer + return 1; + } + + return 0; +} + +void +expire (ACE_Timer_Queue &timer_queue, + Expire_Function expire_function) +{ + int events = 0; + int result = 0; + + Reference_Counted_Event_Handler *handler = + new Reference_Counted_Event_Handler (1); + + ACE_Event_Handler_var safe_handler (handler); + + long timer_id = + timer_queue.schedule (handler, + one_second_timeout, + ACE_Time_Value (1) + timer_queue.gettimeofday (), + ACE_Time_Value (1)); + ACE_ASSERT (timer_id != -1); + + timer_id = + timer_queue.schedule (handler, + two_second_timeout, + ACE_Time_Value (2) + timer_queue.gettimeofday ()); + ACE_ASSERT (result != -1); + + events += 4; + + for (int i = 0; i < events;) + { + ACE_Time_Value sleep_time; + + ACE_Time_Value earliest_time = + timer_queue.earliest_time (); + + ACE_Time_Value time_of_day = + timer_queue.gettimeofday (); + + if (earliest_time > time_of_day) + sleep_time = + earliest_time - time_of_day; + else + sleep_time = ACE_Time_Value::zero; + + ACE_OS::sleep (sleep_time); + + result = + expire_function (timer_queue); + + ACE_ASSERT (result >= 0); + + i += result; + } +} + +template<class TIMER_QUEUE> +class expire_test +{ +public: + expire_test (const char *); +}; + +template <class TIMER_QUEUE> +expire_test<TIMER_QUEUE>::expire_test (const char *timer_queue_type) +{ + ACE_DEBUG ((LM_DEBUG, + "\nExpire test for %s\n\n", + timer_queue_type)); + + TIMER_QUEUE timer_queue; + + expire (timer_queue, + invoke_expire); +} + +template<class TIMER_QUEUE> +class upcall_test +{ +public: + upcall_test (const char *); +}; + +template <class TIMER_QUEUE> +upcall_test<TIMER_QUEUE>::upcall_test (const char *timer_queue_type) +{ + ACE_DEBUG ((LM_DEBUG, + "\nOne upcall test for %s\n\n", + timer_queue_type)); + + TIMER_QUEUE timer_queue; + + expire (timer_queue, + invoke_one_upcall); +} + +class Simple_Event_Handler : public ACE_Event_Handler +{ +public: + + Simple_Event_Handler (void); + + ~Simple_Event_Handler (void); + + int handle_timeout (const ACE_Time_Value &, + const void *); + + int handle_close (ACE_HANDLE, + ACE_Reactor_Mask); + + ACE_Event_Handler::Reference_Count add_reference (void); + + ACE_Event_Handler::Reference_Count remove_reference (void); + +}; + +Simple_Event_Handler::Simple_Event_Handler (void) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler()\n")); +} + +Simple_Event_Handler::~Simple_Event_Handler (void) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "~Simple_Event_Handler()\n")); +} + +int +Simple_Event_Handler::handle_timeout (const ACE_Time_Value &, + const void *arg) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler::handle_timeout() for arg = %s\n", + (const char *) arg)); + return 0; +} + +int +Simple_Event_Handler::handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask masks) +{ + if (debug) + ACE_DEBUG ((LM_DEBUG, + "Simple_Event_Handler::handle_close() called with handle = %d and masks = %d.\n", + handle, + masks)); + + delete this; + + return 0; +} + +ACE_Event_Handler::Reference_Count +Simple_Event_Handler::add_reference (void) +{ + // This should not get called. + ACE_ASSERT (0); + return 0; +} + +ACE_Event_Handler::Reference_Count +Simple_Event_Handler::remove_reference (void) +{ + // This should not get called. + ACE_ASSERT (0); + return 0; +} + +void +simple (ACE_Timer_Queue &timer_queue) +{ + int events = 0; + int result = 0; + + { + Simple_Event_Handler *handler = + new Simple_Event_Handler; + + long timer_id = + timer_queue.schedule (handler, + one_second_timeout, + ACE_Time_Value (1) + timer_queue.gettimeofday (), + ACE_Time_Value (1)); + ACE_ASSERT (timer_id != -1); + + result = + timer_queue.cancel (timer_id, + 0, + 0); + ACE_ASSERT (result == 1); + } + + { + Simple_Event_Handler *handler = + new Simple_Event_Handler; + + long timer_id = + timer_queue.schedule (handler, + one_second_timeout, + ACE_Time_Value (1) + timer_queue.gettimeofday (), + ACE_Time_Value (1)); + ACE_ASSERT (timer_id != -1); + + events += 3; + } + + for (int i = 0; i < events;) + { + ACE_OS::sleep (timer_queue.earliest_time () - + timer_queue.gettimeofday ()); + + result = + timer_queue.expire (); + + ACE_ASSERT (result >= 0); + + i += result; + } +} + +template <class TIMER_QUEUE> +class simple_test +{ +public: + simple_test (const char *); +}; + +template <class TIMER_QUEUE> +simple_test<TIMER_QUEUE>::simple_test (const char *timer_queue_type) +{ + ACE_DEBUG ((LM_DEBUG, + "\nSimple test for %s\n\n", + timer_queue_type)); + + TIMER_QUEUE timer_queue; + + simple (timer_queue); +} + +static int heap = 1; +static int list = 1; +static int hash = 1; +static int wheel = 1; +static int test_cancellation = 1; +static int test_expire = 1; +static int test_one_upcall = 1; +static int test_simple = 1; + +static int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("a:b:c:d:l:m:n:o:z:")); + + int cc; + while ((cc = get_opt ()) != -1) + { + switch (cc) + { + case 'a': + heap = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'b': + list = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'c': + hash = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'd': + wheel = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'l': + test_cancellation = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'm': + test_expire = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'n': + test_one_upcall = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'o': + test_simple = ACE_OS::atoi (get_opt.opt_arg ()); + break; + case 'z': + debug = ACE_OS::atoi (get_opt.opt_arg ()); + break; + default: + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("\nusage: %s \n\n") + ACE_TEXT ("\t[-a heap] (defaults to %d)\n") + ACE_TEXT ("\t[-b list] (defaults to %d)\n") + ACE_TEXT ("\t[-c hash] (defaults to %d)\n") + ACE_TEXT ("\t[-d wheel] (defaults to %d)\n") + ACE_TEXT ("\t[-l test_cancellation] (defaults to %d)\n") + ACE_TEXT ("\t[-m test_expire] (defaults to %d)\n") + ACE_TEXT ("\t[-n test_one_upcall] (defaults to %d)\n") + ACE_TEXT ("\t[-o test_simple] (defaults to %d)\n") + ACE_TEXT ("\t[-z debug] (defaults to %d)\n") + ACE_TEXT ("\n"), + argv[0], + heap, + list, + hash, + wheel, + test_cancellation, + test_expire, + test_one_upcall, + test_simple, + debug)); + return -1; + } + } + + return 0; +} + +int +ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + ACE_START_TEST (ACE_TEXT ("Timer_Queue_Reference_Counting_Test")); + + // Validate options. + int result = + parse_args (argc, argv); + if (result != 0) + return result; + + if (test_cancellation) + { + ACE_DEBUG ((LM_DEBUG, + "\nCancellation test...\n\n")); + + if (heap) { cancellation_test<ACE_Timer_Heap> test ("ACE_Timer_Heap"); ACE_UNUSED_ARG (test); } + if (list) { cancellation_test<ACE_Timer_List> test ("ACE_Timer_List"); ACE_UNUSED_ARG (test); } + if (hash) { cancellation_test<ACE_Timer_Hash> test ("ACE_Timer_Hash"); ACE_UNUSED_ARG (test); } + if (wheel) { cancellation_test<ACE_Timer_Wheel> test ("ACE_Timer_Wheel"); ACE_UNUSED_ARG (test); } + } + + if (test_expire) + { + ACE_DEBUG ((LM_DEBUG, + "\nExpire test...\n\n")); + + if (heap) { expire_test<ACE_Timer_Heap> test ("ACE_Timer_Heap"); ACE_UNUSED_ARG (test); } + if (list) { expire_test<ACE_Timer_List> test ("ACE_Timer_List"); ACE_UNUSED_ARG (test); } + if (hash) { expire_test<ACE_Timer_Hash> test ("ACE_Timer_Hash"); ACE_UNUSED_ARG (test); } + if (wheel) { expire_test<ACE_Timer_Wheel> test ("ACE_Timer_Wheel"); ACE_UNUSED_ARG (test); } + } + + if (test_one_upcall) + { + ACE_DEBUG ((LM_DEBUG, + "\nOne upcall at a time test...\n\n")); + + if (heap) { upcall_test<ACE_Timer_Heap> test ("ACE_Timer_Heap"); ACE_UNUSED_ARG (test); } + if (list) { upcall_test<ACE_Timer_List> test ("ACE_Timer_List"); ACE_UNUSED_ARG (test); } + if (hash) { upcall_test<ACE_Timer_Hash> test ("ACE_Timer_Hash"); ACE_UNUSED_ARG (test); } + if (wheel) { upcall_test<ACE_Timer_Wheel> test ("ACE_Timer_Wheel"); ACE_UNUSED_ARG (test); } + } + + if (test_simple) + { + ACE_DEBUG ((LM_DEBUG, + "\nSimple test...\n\n")); + + if (heap) { simple_test<ACE_Timer_Heap> test ("ACE_Timer_Heap"); ACE_UNUSED_ARG (test); } + if (list) { simple_test<ACE_Timer_List> test ("ACE_Timer_List"); ACE_UNUSED_ARG (test); } + if (hash) { simple_test<ACE_Timer_Hash> test ("ACE_Timer_Hash"); ACE_UNUSED_ARG (test); } + if (wheel) { simple_test<ACE_Timer_Wheel> test ("ACE_Timer_Wheel"); ACE_UNUSED_ARG (test); } + } + + ACE_END_TEST; + + return 0; +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class simple_test<ACE_Timer_Heap>; +template class simple_test<ACE_Timer_List>; +template class simple_test<ACE_Timer_Hash>; +template class simple_test<ACE_Timer_Wheel>; +template class upcall_test<ACE_Timer_Heap>; +template class upcall_test<ACE_Timer_List>; +template class upcall_test<ACE_Timer_Hash>; +template class upcall_test<ACE_Timer_Wheel>; +template class expire_test<ACE_Timer_Heap>; +template class expire_test<ACE_Timer_List>; +template class expire_test<ACE_Timer_Hash>; +template class expire_test<ACE_Timer_Wheel>; +template class cancellation_test<ACE_Timer_Heap>; +template class cancellation_test<ACE_Timer_List>; +template class cancellation_test<ACE_Timer_Hash>; +template class cancellation_test<ACE_Timer_Wheel>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate simple_test<ACE_Timer_Heap> +#pragma instantiate simple_test<ACE_Timer_List> +#pragma instantiate simple_test<ACE_Timer_Hash> +#pragma instantiate simple_test<ACE_Timer_Wheel> +#pragma instantiate upcall_test<ACE_Timer_Heap> +#pragma instantiate upcall_test<ACE_Timer_List> +#pragma instantiate upcall_test<ACE_Timer_Hash> +#pragma instantiate upcall_test<ACE_Timer_Wheel> +#pragma instantiate expire_test<ACE_Timer_Heap> +#pragma instantiate expire_test<ACE_Timer_List> +#pragma instantiate expire_test<ACE_Timer_Hash> +#pragma instantiate expire_test<ACE_Timer_Wheel> +#pragma instantiate cancellation_test<ACE_Timer_Heap> +#pragma instantiate cancellation_test<ACE_Timer_List> +#pragma instantiate cancellation_test<ACE_Timer_Hash> +#pragma instantiate cancellation_test<ACE_Timer_Wheel> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/tests/Timer_Queue_Reference_Counting_Test.dsp b/tests/Timer_Queue_Reference_Counting_Test.dsp new file mode 100644 index 00000000000..9b8cdb68337 --- /dev/null +++ b/tests/Timer_Queue_Reference_Counting_Test.dsp @@ -0,0 +1,162 @@ +# Microsoft Developer Studio Project File - Name="Timer_Queue_Reference_Counting_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Timer_Queue_Reference_Counting_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "Timer_Queue_Reference_Counting_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Timer_Queue_Reference_Counting_Test.mak" CFG="Timer_Queue_Reference_Counting_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Timer_Queue_Reference_Counting_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "Timer_Queue_Reference_Counting_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Timer_Queue_Reference_Counting_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Timer_Queue_Reference_Counting_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Timer_Queue_Reference_Counting_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Timer_Queue_Reference_Counting_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Timer_Queue_Reference_Counting_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Timer_Queue_Reference_Counting_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Timer_Queue_Reference_Counting_Test - Win32 Static Debug"
+# Name "Timer_Queue_Reference_Counting_Test - Win32 Static Release"
+# Name "Timer_Queue_Reference_Counting_Test - Win32 Release"
+# Name "Timer_Queue_Reference_Counting_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\Timer_Queue_Reference_Counting_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/tests/WFMO_Reactor_Test.cpp b/tests/WFMO_Reactor_Test.cpp new file mode 100644 index 00000000000..6bea596a615 --- /dev/null +++ b/tests/WFMO_Reactor_Test.cpp @@ -0,0 +1,157 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// WFMO_Reactor_Test.cpp +// +// = DESCRIPTION +// This is a simple test of the WFMO_Reactor. It makes sure that +// removals and suspensions work correctly. +// +// = AUTHOR +// Irfan Pyarali <irfan@oomworks.com> +// +// ============================================================================ + +#include "tests/test_config.h" +#include "ace/Reactor.h" +#include "ace/WFMO_Reactor.h" +#include "ace/Pipe.h" + +ACE_RCSID(tests, WFMO_Reactor_Test, "$Id$") + +#if defined (ACE_WIN32) + +static int number_of_handlers = 6; +static int number_of_closes = 0; + +class Event_Handler : public ACE_Event_Handler +{ +public: + + Event_Handler (ACE_Reactor &reactor); + + ~Event_Handler (void); + + ACE_Pipe pipe_; + +}; + +Event_Handler::Event_Handler (ACE_Reactor &reactor) +{ + this->reference_counting_policy ().value + (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); + + ACE_DEBUG ((LM_DEBUG, + "Reference count in Event_Handler() is %d\n", + this->reference_count_.value ())); + + this->reactor (&reactor); + + int result = + this->pipe_.open (); + + ACE_ASSERT (result == 0); + ACE_UNUSED_ARG (result); + + this->reactor ()->register_handler (this->pipe_.read_handle (), + this, + ACE_Event_Handler::READ_MASK); + ACE_ASSERT (result == 0); + + this->reactor ()->register_handler (this->pipe_.write_handle (), + this, + ACE_Event_Handler::READ_MASK); + ACE_ASSERT (result == 0); +} + +Event_Handler::~Event_Handler (void) +{ + ACE_DEBUG ((LM_DEBUG, + "Reference count in ~Event_Handler() is %d\n", + this->reference_count_.value ())); + + ++number_of_closes; +} + +void +test (void) +{ + int result = 0; + int i = 0; + + ACE_Reactor reactor (new ACE_WFMO_Reactor, 1); + + ACE_Event_Handler_var *safe_event_handlers = + new ACE_Event_Handler_var[number_of_handlers]; + + Event_Handler **event_handlers = + new Event_Handler*[number_of_handlers]; + + for (i = 0; i < number_of_handlers; ++i) + { + event_handlers[i] = + new Event_Handler (reactor); + + safe_event_handlers[i] = + event_handlers[i]; + } + + ACE_Time_Value timeout (0, 500 * 1000); + + result = reactor.run_reactor_event_loop (timeout); + ACE_ASSERT (result != -1); + + for (i = 0; i < number_of_handlers; ++i) + { + if (i % 2 == 0) + continue; + + result = reactor.suspend_handler (event_handlers[i]->pipe_.read_handle ()); + ACE_ASSERT (result == 0); + + result = reactor.suspend_handler (event_handlers[i]->pipe_.write_handle ()); + ACE_ASSERT (result == 0); + } + + result = reactor.run_reactor_event_loop (timeout); + ACE_ASSERT (result != -1); + + delete[] safe_event_handlers; + delete[] event_handlers; +} + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT ("WFMO_Reactor_Test")); + + test (); + + ACE_ASSERT (number_of_closes == number_of_handlers); + + ACE_END_TEST; + + return 0; +} + +#else /* ACE_WIN32 */ + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT ("WFMO_Reactor_Test")); + + ACE_ERROR ((LM_INFO, + ACE_TEXT ("WFMO_Reactor not supported on this platform\n"))); + + ACE_END_TEST; + + return 0; +} + +#endif /* ACE_WIN32 */ diff --git a/tests/WFMO_Reactor_Test.dsp b/tests/WFMO_Reactor_Test.dsp new file mode 100644 index 00000000000..59c0b4aa874 --- /dev/null +++ b/tests/WFMO_Reactor_Test.dsp @@ -0,0 +1,158 @@ +# Microsoft Developer Studio Project File - Name="WFMO_Reactor_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=WFMO_Reactor_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "WFMO_Reactor_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "WFMO_Reactor_Test.mak" CFG="WFMO_Reactor_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "WFMO_Reactor_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "WFMO_Reactor_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "WFMO_Reactor_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "WFMO_Reactor_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "WFMO_Reactor_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "WFMO_Reactor_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "WFMO_Reactor_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "WFMO_Reactor_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "WFMO_Reactor_Test - Win32 Static Debug"
+# Name "WFMO_Reactor_Test - Win32 Static Release"
+# Name "WFMO_Reactor_Test - Win32 Release"
+# Name "WFMO_Reactor_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ".cpp"
+# Begin Source File
+
+SOURCE=.\WFMO_Reactor_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter ".h"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/tests/icc.bat b/tests/icc.bat deleted file mode 100644 index 131c04b17a9..00000000000 --- a/tests/icc.bat +++ /dev/null @@ -1,81 +0,0 @@ -vacbld -SEV=E Aio_Platform_Test.icc -vacbld -SEV=E Atomic_Op_Test.icc -vacbld -SEV=E Barrier_Test.icc -vacbld -SEV=E Basic_Types_Test.icc -vacbld -SEV=E Buffer_Stream_Test.icc -vacbld -SEV=E CDR_Test.icc -vacbld -SEV=E CLASSIX_Addr_Test.icc -vacbld -SEV=E CLASSIX_CLD_Connector_Test.icc -vacbld -SEV=E CLASSIX_Con_Acc_Test.icc -vacbld -SEV=E CLASSIX_Group_Test.icc -vacbld -SEV=E CLASSIX_Notify_Test.icc -vacbld -SEV=E CLASSIX_OS_Test.icc -vacbld -SEV=E CLASSIX_Reactor_Test.icc -vacbld -SEV=E CLASSIX_Select_Reactor_Test.icc -vacbld -SEV=E CLASSIX_Stream_Test.icc -vacbld -SEV=E Collection_Test.icc -vacbld -SEV=E Conn_Test.icc -vacbld -SEV=E DLL_Test.icc -vacbld -SEV=E DLList_Test.icc -vacbld -SEV=E Dynamic_Priority_Test.icc -vacbld -SEV=E Enum_Interfaces_Test.icc -vacbld -SEV=E Env_Value_Test.icc -vacbld -SEV=E Future_Set_Test.icc -vacbld -SEV=E Future_Test.icc -vacbld -SEV=E Handle_Set_Test.icc -vacbld -SEV=E Hash_Map_Manager_Test.icc -vacbld -SEV=E High_Res_Timer_Test.icc -vacbld -SEV=E IOStream_Test.icc -vacbld -SEV=E MM_Shared_Memory_Test.icc -vacbld -SEV=E MT_Reactor_Timer_Test.icc -vacbld -SEV=E MT_Reactor_Upcall_Test.icc -vacbld -SEV=E MT_SOCK_Test.icc -vacbld -SEV=E Map_Manager_Test.icc -vacbld -SEV=E Map_Test.icc -vacbld -SEV=E Mem_Map_Test.icc -vacbld -SEV=E Message_Block_Test.icc -vacbld -SEV=E Message_Queue_Notifications_Test.icc -vacbld -SEV=E Message_Queue_Test.icc -vacbld -SEV=E Multihomed_INET_Addr_Test.icc -vacbld -SEV=E Naming_Test.icc -vacbld -SEV=E Notify_Performance_Test.icc -vacbld -SEV=E Object_Manager_Test.icc -vacbld -SEV=E OrdMultiSet_Test.icc -vacbld -SEV=E Pipe_Test.icc -vacbld -SEV=E Priority_Buffer_Test.icc -vacbld -SEV=E Priority_Reactor_Test.icc -vacbld -SEV=E Priority_Task_Test.icc -vacbld -SEV=E Process_Mutex_Test.icc -vacbld -SEV=E Process_Strategy_Test.icc -vacbld -SEV=E RB_Tree_Test.icc -vacbld -SEV=E Reactor_Dispatch_Order_Test.icc -vacbld -SEV=E Reactor_Exceptions_Test.icc -vacbld -SEV=E Reactor_Notify_Test.icc -vacbld -SEV=E Reactor_Performance_Test.icc -vacbld -SEV=E Reactor_Timer_Test.icc -vacbld -SEV=E Reactors_Test.icc -vacbld -SEV=E Reader_Writer_Test.icc -vacbld -SEV=E Recursive_Mutex_Test.icc -vacbld -SEV=E SOCK_Connector_Test.icc -vacbld -SEV=E SOCK_Test.icc -vacbld -SEV=E SPIPE_Test.icc -vacbld -SEV=E SString_Test.icc -vacbld -SEV=E SV_Shared_Memory_Test.icc -vacbld -SEV=E Semaphore_Test.icc -vacbld -SEV=E Service_Config_Test.icc -vacbld -SEV=E Sigset_Ops_Test.icc -vacbld -SEV=E Simple_Message_Block_Test.icc -vacbld -SEV=E TSS_Test.icc -vacbld -SEV=E Task_Test.icc -vacbld -SEV=E Thread_Manager_Test.icc -vacbld -SEV=E Thread_Mutex_Test.icc -vacbld -SEV=E Thread_Pool_Reactor_Test.icc -vacbld -SEV=E Thread_Pool_Test.icc -vacbld -SEV=E Time_Service_Test.icc -vacbld -SEV=E Time_Value_Test.icc -vacbld -SEV=E Timeprobe_Test.icc -vacbld -SEV=E Timer_Queue_Test.icc -vacbld -SEV=E Tokens_Test.icc -vacbld -SEV=E UPIPE_SAP_Test.icc -vacbld -SEV=E Upgradable_RW_Test.icc -vacbld -SEV=E XtReactor_Test.icc diff --git a/tests/run_test.lst b/tests/run_test.lst index e682e02e2ac..cd089bc1608 100644 --- a/tests/run_test.lst +++ b/tests/run_test.lst @@ -24,62 +24,65 @@ Barrier_Test Basic_Types_Test Bound_Ptr_Test Buffer_Stream_Test +CDR_Array_Test +CDR_File_Test +CDR_Test Cache_Map_Manager_Test -Cached_Conn_Test: !LynxOS !VxWorks +Cached_Accept_Conn_Test: !VxWorks Cached_Allocator_Test +Cached_Conn_Test: !LynxOS !VxWorks Capabilities_Test -CDR_Test -CDR_File_Test -CDR_Array_Test -Cached_Accept_Conn_Test: !VxWorks Codecs_Test Collection_Test Config_Test Conn_Test: !chorus -Date_Time_Test -Dirent_Test DLL_Test: !Unicos !STATIC !KCC_Linux DLList_Test +Date_Time_Test +Dirent_Test Dynamic_Priority_Test Enum_Interfaces_Test Env_Value_Test: !chorus !WinCE FIFO_Test: !Win32 Framework_Component_Test: !STATIC -Future_Test Future_Set_Test +Future_Test Get_Opt_Test Handle_Set_Test -Hash_Map_Manager_Test Hash_Map_Bucket_Iterator_Test +Hash_Map_Manager_Test High_Res_Timer_Test INET_Addr_Test IOStream_Test Lazy_Map_Manager_Test Log_Msg_Test Logging_Strategy_Test: !STATIC !ST +MEM_Stream_Test: !VxWorks +MM_Shared_Memory_Test: !chorus !Unicos !VxWorks +MT_Reactor_Timer_Test: !VxWorks +MT_Reactor_Upcall_Test: !VxWorks +MT_Reference_Counted_Event_Handler_Test +MT_Reference_Counted_Notify_Test +MT_SOCK_Test: !chorus +Malloc_Test: !VxWorks Map_Manager_Test Map_Test Max_Default_Port_Test: !ST -MEM_Stream_Test: !VxWorks Mem_Map_Test: !chorus !Unicos !VxWorks Message_Block_Test: !chorus Message_Queue_Notifications_Test Message_Queue_Test: !chorus Message_Queue_Test_Ex: !chorus -MM_Shared_Memory_Test: !chorus !Unicos !VxWorks -MT_Reactor_Timer_Test: !VxWorks -MT_Reactor_Upcall_Test: !VxWorks -MT_SOCK_Test: !chorus -Malloc_Test: !VxWorks Multicast_Test: !ST Multihomed_INET_Addr_Test Naming_Test: OTHER !chorus !LynxOS !Unicos !VxWorks New_Fail_Test: ALL !DISABLED +NonBlocking_Conn_Test Notify_Performance_Test +OS_Test Object_Manager_Test Obstack_Test OrdMultiSet_Test -OS_Test Pipe_Test: !chorus !VxWorks Priority_Buffer_Test Priority_Reactor_Test: !chorus @@ -91,44 +94,49 @@ Process_Manager_Test: !chorus !VxWorks Process_Mutex_Test: !chorus !VxWorks Process_Strategy_Test: !chorus !LynxOS !VxWorks RB_Tree_Test -Reactors_Test +Reactor_Dispatch_Order_Test Reactor_Exceptions_Test Reactor_Notify_Test: !ST -Reactor_Dispatch_Order_Test Reactor_Performance_Test: !chorus +Reactor_Registration_Test Reactor_Timer_Test +Reactors_Test Reader_Writer_Test -Recursive_Condition_Test: !ST Recursive_Condition_Bug_Test: !ST +Recursive_Condition_Test: !ST Recursive_Mutex_Test: !ST Refcounted_Auto_Ptr_Test: !VxWorks +Reference_Counted_Event_Handler_Test Reverse_Lock_Test -Semaphore_Test -Service_Config_Test: !STATIC -Sigset_Ops_Test -Simple_Message_Block_Test: !chorus -Svc_Handler_Test -SOCK_Test: !chorus SOCK_Connector_Test SOCK_Send_Recv_Test: !LynxOS +SOCK_Test: !chorus SPIPE_Test: !VxWorks SString_Test SV_Shared_Memory_Test: !MSVC !Unicos !VxWorks !RH_7.1 +Semaphore_Test +Service_Config_Test: !STATIC +Sigset_Ops_Test +Simple_Message_Block_Test: !chorus +Svc_Handler_Test +TP_Reactor_Test: ALL +TSS_Test Task_Test Thread_Manager_Test: !Unicos Thread_Mutex_Test: !chorus -Thread_Pool_Reactor_Test: OTHER Thread_Pool_Reactor_Resume_Test: OTHER !ST +Thread_Pool_Reactor_Test: OTHER Thread_Pool_Test: !LynxOS !VxWorks -Timer_Queue_Test -Timeprobe_Test Time_Service_Test: ALL !STATIC !DISABLED !missing_netsvcs TOKEN !chorus !Unicos Time_Value_Test +Timeprobe_Test +Timer_Cancellation_Test +Timer_Queue_Reference_Counting_Test +Timer_Queue_Test Token_Strategy_Test: !ST Tokens_Test: ALL MSVC !DISABLED TOKEN !chorus !Unicos -TP_Reactor_Test: ALL -TSS_Test -Vector_Test -Unbounded_Set_Test_Ex UPIPE_SAP_Test: !VxWorks +Unbounded_Set_Test_Ex Upgradable_RW_Test: !chorus +Vector_Test +WFMO_Reactor_Test diff --git a/tests/tests.dsw b/tests/tests.dsw index 3cad845fc11..46a0eac3845 100644 --- a/tests/tests.dsw +++ b/tests/tests.dsw @@ -1,1826 +1 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "ACE_Init_Test"=.\ACE_Init_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "ACE_Test"=.\ACE_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "ARGV_Test"=.\ARGV_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Arg_Shifter_Test"=.\Arg_Shifter_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Atomic_Op_Test"=.\Atomic_Op_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Auto_IncDec_Test"=.\Auto_IncDec_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Barrier_Test"=.\Barrier_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Basic_Types_Test"=.\Basic_Types_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Bound_Ptr_Test"=.\Bound_Ptr_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Buffer_Stream_Test"=.\Buffer_Stream_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "CDR_Array_Test"=.\CDR_Array_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "CDR_File_Test"=.\CDR_File_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "CDR_Test"=.\CDR_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Cache_Map_Manager_Test"=.\Cache_Map_Manager_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Cached_Accept_Conn_Test"=.\Cached_Accept_Conn_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Cached_Allocator_Test"=.\Cached_Allocator_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Cached_Conn_Test"=.\Cached_Conn_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Capabilities_Test"=.\Capabilities_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Codecs_Test"=.\Codecs_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Collection_Test"=.\Collection_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Config_Test"=.\Config_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Conn_Test"=.\Conn_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "DLL_Test"=.\DLL_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name DLL_Test DLL
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "DLL_Test DLL"=.\DLL_Test_Impl.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "DLList_Test"=.\DLList_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Date_Time_Test"=.\Date_Time_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Dirent_Test"=.\Dirent_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Dynamic_Priority_Test"=.\Dynamic_Priority_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Enum_Interfaces_Test"=.\Enum_Interfaces_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Env_Value_Test"=.\Env_Value_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Framework_Component_Test"=.\Framework_Component_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Framework_Component_Test DLL
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Framework_Component_Test DLL"=.\Framework_Component_DLL.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Future_Set_Test"=.\Future_Set_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Future_Test"=.\Future_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Get_Opt_Test"=.\Get_Opt_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Handle_Set_Test"=.\Handle_Set_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Hash_Map_Bucket_Iterator_Test"=.\Hash_Map_Bucket_Iterator_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Hash_Map_Manager_Test"=.\Hash_Map_Manager_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "High_Res_Timer_Test"=.\High_Res_Timer_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "INET_Addr_Test"=.\INET_Addr_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "IOStream_Test"=.\IOStream_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Lazy_Map_Manager_Test"=.\Lazy_Map_Manager_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Log_Msg_Test"=.\Log_Msg_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Logging_Strategy_Test"=.\Logging_Strategy_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "MEM_Stream_Test"=.\MEM_Stream_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "MM_Shared_Memory_Test"=.\MM_Shared_Memory_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "MT_Reactor_Timer_Test"=.\MT_Reactor_Timer_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "MT_Reactor_Upcall_Test"=.\MT_Reactor_Upcall_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "MT_SOCK_Test"=.\MT_SOCK_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Malloc_Test"=.\Malloc_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Map_Manager_Test"=.\Map_Manager_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Map_Test"=.\Map_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Max_Default_Port_Test"=.\Max_Default_Port_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Mem_Map_Test"=.\Mem_Map_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Message_Block_Test"=.\Message_Block_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Message_Queue_Notifications_Test"=.\Message_Queue_Notifications_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Message_Queue_Test"=.\Message_Queue_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Message_Queue_Test_Ex"=.\Message_Queue_Test_Ex.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Multicast_Test"=.\Multicast_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Multihomed_INET_Addr_Test"=.\Multihomed_INET_Addr_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Naming_Test"=.\Naming_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "New_Fail_Test"=.\New_Fail_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Notify_Performance_Test"=.\Notify_Performance_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "OS_Test"=.\OS_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Object_Manager_Test"=.\Object_Manager_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Obstack_Test"=.\Obstack_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "OrdMultiSet_Test"=.\OrdMultiSet_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Pipe_Test"=.\Pipe_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Priority_Buffer_Test"=.\Priority_Buffer_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Priority_Reactor_Test"=.\Priority_Reactor_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Priority_Task_Test"=.\Priority_Task_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Proactor_Scatter_Gather_Test"=.\Proactor_Scatter_Gather_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Proactor_Test"=.\Proactor_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Proactor_Timer_Test"=.\Proactor_Timer_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Process_Manager_Test"=.\Process_Manager_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Process_Mutex_Test"=.\Process_Mutex_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Process_Strategy_Test"=.\Process_Strategy_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "RB_Tree_Test"=.\RB_Tree_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Reactor_Dispatch_Order_Test"=.\Reactor_Dispatch_Order_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Reactor_Exceptions_Test"=.\Reactor_Exceptions_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Reactor_Notify_Test"=.\Reactor_Notify_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Reactor_Performance_Test"=.\Reactor_Performance_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Reactor_Timer_Test"=.\Reactor_Timer_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Reactors_Test"=.\Reactors_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Reader_Writer_Test"=.\Reader_Writer_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Recursive_Condition_Bug_Test"=.\Recursive_Condition_Bug_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Recursive_Condition_Test"=.\Recursive_Condition_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Recursive_Mutex_Test"=.\Recursive_Mutex_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Refcounted_Auto_Ptr_Test"=.\Refcounted_Auto_Ptr_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Reverse_Lock_Test"=.\Reverse_Lock_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "SOCK_Connector_Test"=.\SOCK_Connector_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "SOCK_Send_Recv_Test"=.\SOCK_Send_Recv_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "SOCK_Test"=.\SOCK_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "SPIPE_Test"=.\SPIPE_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "SString_Test"=.\SString_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "SV_Shared_Memory_Test"=.\SV_Shared_Memory_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Semaphore_Test"=.\Semaphore_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Service_Config_DLL"=.\Service_Config_DLL.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Service_Config_Test"=.\Service_Config_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Service_Config_DLL
- End Project Dependency
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Sigset_Ops_Test"=.\Sigset_Ops_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Simple_Message_Block_Test"=.\Simple_Message_Block_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Svc_Handler_Test"=.\Svc_Handler_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "TP_Reactor_Test"=.\TP_Reactor_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "TSS_Test"=.\TSS_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Task_Test"=.\Task_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Test_Output DLL"=.\Test_Output.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Thread_Manager_Test"=.\Thread_Manager_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Thread_Mutex_Test"=.\Thread_Mutex_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Thread_Pool_Reactor_Resume_Test"=.\Thread_Pool_Reactor_Resume_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Thread_Pool_Reactor_Test"=.\Thread_Pool_Reactor_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Thread_Pool_Test"=.\Thread_Pool_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Time_Service_Test"=.\Time_Service_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Time_Value_Test"=.\Time_Value_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Timeprobe_Test"=.\Timeprobe_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Timer_Queue_Test"=.\Timer_Queue_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Token_Strategy_Test"=.\Token_Strategy_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Tokens_Test"=.\Tokens_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "UPIPE_SAP_Test"=.\UPIPE_SAP_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Unbounded_Set_Test_Ex"=.\Unbounded_Set_Test_Ex.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Upgradable_RW_Test"=.\Upgradable_RW_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "Vector_Test"=.\Vector_Test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name Test_Output DLL
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
+Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "ACE_Init_Test"=.\ACE_Init_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "ACE_Test"=.\ACE_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "ARGV_Test"=.\ARGV_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Arg_Shifter_Test"=.\Arg_Shifter_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Atomic_Op_Test"=.\Atomic_Op_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Auto_IncDec_Test"=.\Auto_IncDec_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Barrier_Test"=.\Barrier_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Basic_Types_Test"=.\Basic_Types_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Bound_Ptr_Test"=.\Bound_Ptr_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Buffer_Stream_Test"=.\Buffer_Stream_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "CDR_Array_Test"=.\CDR_Array_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "CDR_File_Test"=.\CDR_File_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "CDR_Test"=.\CDR_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Cache_Map_Manager_Test"=.\Cache_Map_Manager_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Cached_Accept_Conn_Test"=.\Cached_Accept_Conn_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Cached_Allocator_Test"=.\Cached_Allocator_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Cached_Conn_Test"=.\Cached_Conn_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Capabilities_Test"=.\Capabilities_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Codecs_Test"=.\Codecs_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Collection_Test"=.\Collection_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Config_Test"=.\Config_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Conn_Test"=.\Conn_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "DLL_Test"=.\DLL_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name DLL_Test DLL
End Project Dependency
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "DLL_Test DLL"=.\DLL_Test_Impl.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "DLList_Test"=.\DLList_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Date_Time_Test"=.\Date_Time_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Dirent_Test"=.\Dirent_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Dynamic_Priority_Test"=.\Dynamic_Priority_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Enum_Interfaces_Test"=.\Enum_Interfaces_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Env_Value_Test"=.\Env_Value_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Framework_Component_Test"=.\Framework_Component_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Framework_Component_Test DLL
End Project Dependency
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Framework_Component_Test DLL"=.\Framework_Component_DLL.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "Future_Set_Test"=.\Future_Set_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Future_Test"=.\Future_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Get_Opt_Test"=.\Get_Opt_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Handle_Set_Test"=.\Handle_Set_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Hash_Map_Bucket_Iterator_Test"=.\Hash_Map_Bucket_Iterator_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Hash_Map_Manager_Test"=.\Hash_Map_Manager_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "High_Res_Timer_Test"=.\High_Res_Timer_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "INET_Addr_Test"=.\INET_Addr_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "IOStream_Test"=.\IOStream_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Lazy_Map_Manager_Test"=.\Lazy_Map_Manager_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Log_Msg_Test"=.\Log_Msg_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Logging_Strategy_Test"=.\Logging_Strategy_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "MEM_Stream_Test"=.\MEM_Stream_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "MM_Shared_Memory_Test"=.\MM_Shared_Memory_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "MT_Reactor_Timer_Test"=.\MT_Reactor_Timer_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "MT_Reactor_Upcall_Test"=.\MT_Reactor_Upcall_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "MT_Reference_Counted_Event_Handler_Test"=.\MT_Reference_Counted_Event_Handler_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "MT_Reference_Counted_Notify_Test"=.\MT_Reference_Counted_Notify_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "MT_SOCK_Test"=.\MT_SOCK_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Malloc_Test"=.\Malloc_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Map_Manager_Test"=.\Map_Manager_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Map_Test"=.\Map_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Max_Default_Port_Test"=.\Max_Default_Port_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Mem_Map_Test"=.\Mem_Map_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Message_Block_Test"=.\Message_Block_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Message_Queue_Notifications_Test"=.\Message_Queue_Notifications_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Message_Queue_Test"=.\Message_Queue_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Message_Queue_Test_Ex"=.\Message_Queue_Test_Ex.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Multicast_Test"=.\Multicast_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Multihomed_INET_Addr_Test"=.\Multihomed_INET_Addr_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Naming_Test"=.\Naming_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "New_Fail_Test"=.\New_Fail_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "NonBlocking_Conn_Test"=.\NonBlocking_Conn_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Notify_Performance_Test"=.\Notify_Performance_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "OS_Test"=.\OS_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Object_Manager_Test"=.\Object_Manager_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Obstack_Test"=.\Obstack_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "OrdMultiSet_Test"=.\OrdMultiSet_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Pipe_Test"=.\Pipe_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Priority_Buffer_Test"=.\Priority_Buffer_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Priority_Reactor_Test"=.\Priority_Reactor_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Priority_Task_Test"=.\Priority_Task_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Proactor_Scatter_Gather_Test"=.\Proactor_Scatter_Gather_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Proactor_Test"=.\Proactor_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Proactor_Timer_Test"=.\Proactor_Timer_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "Process_Manager_Test"=.\Process_Manager_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Process_Mutex_Test"=.\Process_Mutex_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Process_Strategy_Test"=.\Process_Strategy_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "RB_Tree_Test"=.\RB_Tree_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reactor_Dispatch_Order_Test"=.\Reactor_Dispatch_Order_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reactor_Exceptions_Test"=.\Reactor_Exceptions_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reactor_Notify_Test"=.\Reactor_Notify_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reactor_Performance_Test"=.\Reactor_Performance_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reactor_Registration_Test"=.\Reactor_Registration_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reactor_Timer_Test"=.\Reactor_Timer_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reactors_Test"=.\Reactors_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reader_Writer_Test"=.\Reader_Writer_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Recursive_Condition_Bug_Test"=.\Recursive_Condition_Bug_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Recursive_Condition_Test"=.\Recursive_Condition_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Recursive_Mutex_Test"=.\Recursive_Mutex_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Refcounted_Auto_Ptr_Test"=.\Refcounted_Auto_Ptr_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reference_Counted_Event_Handler_Test"=.\Reference_Counted_Event_Handler_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Reverse_Lock_Test"=.\Reverse_Lock_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "SOCK_Connector_Test"=.\SOCK_Connector_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "SOCK_Send_Recv_Test"=.\SOCK_Send_Recv_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "SOCK_Test"=.\SOCK_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "SPIPE_Test"=.\SPIPE_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "SString_Test"=.\SString_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "SV_Shared_Memory_Test"=.\SV_Shared_Memory_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Semaphore_Test"=.\Semaphore_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Service_Config_DLL"=.\Service_Config_DLL.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "Service_Config_Test"=.\Service_Config_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Service_Config_DLL
End Project Dependency
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Sigset_Ops_Test"=.\Sigset_Ops_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Simple_Message_Block_Test"=.\Simple_Message_Block_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Svc_Handler_Test"=.\Svc_Handler_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "TP_Reactor_Test"=.\TP_Reactor_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "TSS_Test"=.\TSS_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Task_Test"=.\Task_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Test_Output DLL"=.\Test_Output.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "Thread_Manager_Test"=.\Thread_Manager_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Thread_Mutex_Test"=.\Thread_Mutex_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Thread_Pool_Reactor_Resume_Test"=.\Thread_Pool_Reactor_Resume_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Thread_Pool_Reactor_Test"=.\Thread_Pool_Reactor_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Thread_Pool_Test"=.\Thread_Pool_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Time_Service_Test"=.\Time_Service_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Time_Value_Test"=.\Time_Value_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Timeprobe_Test"=.\Timeprobe_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Timer_Cancellation_Test"=.\Timer_Cancellation_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Timer_Queue_Reference_Counting_Test"=.\Timer_Queue_Reference_Counting_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Timer_Queue_Test"=.\Timer_Queue_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Token_Strategy_Test"=.\Token_Strategy_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Tokens_Test"=.\Tokens_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "UPIPE_SAP_Test"=.\UPIPE_SAP_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Unbounded_Set_Test_Ex"=.\Unbounded_Set_Test_Ex.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Upgradable_RW_Test"=.\Upgradable_RW_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "Vector_Test"=.\Vector_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Project: "WFMO_Reactor_Test"=.\WFMO_Reactor_Test.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name Test_Output DLL
End Project Dependency
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
\ No newline at end of file diff --git a/tests/tests.icp b/tests/tests.icp index 7e580d72b66..f8388513b13 100644 --- a/tests/tests.icp +++ b/tests/tests.icp @@ -2,7 +2,7 @@ // // Visual Age C++ 5 Project file for building all the tests. -subproject libTest_Output icc "libTest_Output.icc", ics "libTest_Output.ics" +subproject Aio_Platform_Test icc "Aio_Platform_Test.icc", ics "Aio_Platform_Test.ics" { } @@ -14,10 +14,6 @@ subproject ARGV_Test icc "ARGV_Test.icc", ics "ARGV_Test.ics" { } -subproject Aio_Platform_Test icc "Aio_Platform_Test.icc", ics "Aio_Platform_Test.ics" -{ -} - subproject Atomic_Op_Test icc "Atomic_Op_Test.icc", ics "Atomic_Op_Test.ics" { } @@ -42,31 +38,31 @@ subproject Buffer_Stream_Test icc "Buffer_Stream_Test.icc", ics "Buffer_Stream_T { } -subproject CDR_Array_Test icc "CDR_Array_Test.icc", ics "CDR_Array_Test.ics" +subproject Cache_Map_Manager_Test icc "Cache_Map_Manager_Test.icc", ics "Cache_Map_Manager_Test.ics" { } -subproject CDR_File_Test icc "CDR_File_Test.icc", ics "CDR_File_Test.ics" +subproject Cached_Accept_Conn_Test icc "Cached_Accept_Conn_Test.icc", ics "Cached_Accept_Conn_Test.ics" { } -subproject CDR_Test icc "CDR_Test.icc", ics "CDR_Test.ics" +subproject Cached_Conn_Test icc "Cached_Conn_Test.icc", ics "Cached_Conn_Test.ics" { } -subproject Cache_Map_Manager_Test icc "Cache_Map_Manager_Test.icc", ics "Cache_Map_Manager_Test.ics" +subproject Capabilities_Test icc "Capabilities_Test.icc", ics "Capabilities_Test.ics" { } -subproject Cached_Accept_Conn_Test icc "Cached_Accept_Conn_Test.icc", ics "Cached_Accept_Conn_Test.ics" +subproject CDR_Array_Test icc "CDR_Array_Test.icc", ics "CDR_Array_Test.ics" { } -subproject Cached_Conn_Test icc "Cached_Conn_Test.icc", ics "Cached_Conn_Test.ics" +subproject CDR_File_Test icc "CDR_File_Test.icc", ics "CDR_File_Test.ics" { } -subproject Capabilities_Test icc "Capabilities_Test.icc", ics "Capabilities_Test.ics" +subproject CDR_Test icc "CDR_Test.icc", ics "CDR_Test.ics" { } @@ -86,11 +82,11 @@ subproject Date_Time_Test icc "Date_Time_Test.icc", ics "Date_Time_Test.ics" { } -subproject DLL_Test icc "DLL_Test.icc", ics "DLL_Test.ics" +subproject Dirent_Test icc "Dirent_Test.icc", ics "Dirent_Test.ics" { } -subproject libDLL_Test icc "libDLL_Test.icc", ics "libDLL_Test.ics" +subproject DLL_Test icc "DLL_Test.icc", ics "DLL_Test.ics" { } @@ -98,10 +94,6 @@ subproject DLList_Test icc "DLList_Test.icc", ics "DLList_Test.ics" { } -subproject Dirent_Test icc "Dirent_Test.icc", ics "Dirent_Test.ics" -{ -} - subproject Dynamic_Priority_Test icc "Dynamic_Priority_Test.icc", ics "Dynamic_Priority_Test.ics" { } @@ -162,31 +154,23 @@ subproject Lazy_Map_Manager_Test icc "Lazy_Map_Manager_Test.icc", ics "Lazy_Map_ { } -subproject Log_Msg_Test icc "Log_Msg_Test.icc", ics "Log_Msg_Test.ics" -{ -} - -subproject Logging_Strategy_Test icc "Logging_Strategy_Test.icc", ics "Logging_Strategy_Test.ics" -{ -} - -subproject MEM_Stream_Test icc "MEM_Stream_Test.icc", ics "MEM_Stream_Test.ics" +subproject libDLL_Test icc "libDLL_Test.icc", ics "libDLL_Test.ics" { } -subproject MM_Shared_Memory_Test icc "MM_Shared_Memory_Test.icc", ics "MM_Shared_Memory_Test.ics" +subproject libService_Config_DLL icc "libService_Config_DLL.icc", ics "libService_Config_DLL.ics" { } -subproject MT_Reactor_Timer_Test icc "MT_Reactor_Timer_Test.icc", ics "MT_Reactor_Timer_Test.ics" +subproject libTest_Output icc "libTest_Output.icc", ics "libTest_Output.ics" { } -subproject MT_Reactor_Upcall_Test icc "MT_Reactor_Upcall_Test.icc", ics "MT_Reactor_Upcall_Test.ics" +subproject Log_Msg_Test icc "Log_Msg_Test.icc", ics "Log_Msg_Test.ics" { } -subproject MT_SOCK_Test icc "MT_SOCK_Test.icc", ics "MT_SOCK_Test.ics" +subproject Logging_Strategy_Test icc "Logging_Strategy_Test.icc", ics "Logging_Strategy_Test.ics" { } @@ -210,6 +194,10 @@ subproject Mem_Map_Test icc "Mem_Map_Test.icc", ics "Mem_Map_Test.ics" { } +subproject MEM_Stream_Test icc "MEM_Stream_Test.icc", ics "MEM_Stream_Test.ics" +{ +} + subproject Message_Block_Test icc "Message_Block_Test.icc", ics "Message_Block_Test.ics" { } @@ -226,6 +214,30 @@ subproject Message_Queue_Test_Ex icc "Message_Queue_Test_Ex.icc", ics "Message_Q { } +subproject MM_Shared_Memory_Test icc "MM_Shared_Memory_Test.icc", ics "MM_Shared_Memory_Test.ics" +{ +} + +subproject MT_Reactor_Timer_Test icc "MT_Reactor_Timer_Test.icc", ics "MT_Reactor_Timer_Test.ics" +{ +} + +subproject MT_Reactor_Upcall_Test icc "MT_Reactor_Upcall_Test.icc", ics "MT_Reactor_Upcall_Test.ics" +{ +} + +subproject MT_Reference_Counted_Event_Handler_Test icc "MT_Reference_Counted_Event_Handler_Test.icc", ics "MT_Reference_Counted_Event_Handler_Test.ics" +{ +} + +subproject MT_Reference_Counted_Notify_Test icc "MT_Reference_Counted_Nofity_Test.icc", ics "MT_Reference_Counted_Notify_Test.ics" +{ +} + +subproject MT_SOCK_Test icc "MT_SOCK_Test.icc", ics "MT_SOCK_Test.ics" +{ +} + subproject Multihomed_INET_Addr_Test icc "Multihomed_INET_Addr_Test.icc", ics "Multihomed_INET_Addr_Test.ics" { } @@ -238,11 +250,11 @@ subproject New_Fail_Test icc "New_Fail_Test.icc", ics "New_Fail_Test.ics" { } -subproject Notify_Performance_Test icc "Notify_Performance_Test.icc", ics "Notify_Performance_Test.ics" +subproject NonBlocking_Conn_Test icc "NonBlocking_Conn_Test.icc", ics "NonBlocking_Conn_Test.ics" { } -subproject OS_Test icc "OS_Test.icc", ics "OS_Test.ics" +subproject Notify_Performance_Test icc "Notify_Performance_Test.icc", ics "Notify_Performance_Test.ics" { } @@ -258,6 +270,10 @@ subproject OrdMultiSet_Test icc "OrdMultiSet_Test.icc", ics "OrdMultiSet_Test.ic { } +subproject OS_Test icc "OS_Test.icc", ics "OS_Test.ics" +{ +} + subproject Pipe_Test icc "Pipe_Test.icc", ics "Pipe_Test.ics" { } @@ -290,6 +306,10 @@ subproject RB_Tree_Test icc "RB_Tree_Test.icc", ics "RB_Tree_Test.ics" { } +subproject Reactor_Dispatch_Order_Test icc "Reactor_Dispatch_Order_Test.icc", ics "Reactor_Dispatch_Order_Test.ics" +{ +} + subproject Reactor_Exceptions_Test icc "Reactor_Exceptions_Test.icc", ics "Reactor_Exceptions_Test.ics" { } @@ -298,11 +318,11 @@ subproject Reactor_Notify_Test icc "Reactor_Notify_Test.icc", ics "Reactor_Notif { } -subproject Reactor_Dispatch_Order_Test icc "Reactor_Dispatch_Order_Test.icc", ics "Reactor_Dispatch_Order_Test.ics" +subproject Reactor_Performance_Test icc "Reactor_Performance_Test.icc", ics "Reactor_Performance_Test.ics" { } -subproject Reactor_Performance_Test icc "Reactor_Performance_Test.icc", ics "Reactor_Performance_Test.ics" +subproject Reactor_Registration_Test icc "Reactor_Registration_Test.icc", ics "Reactor_Registration_Test.ics" { } @@ -330,59 +350,59 @@ subproject Refcounted_Auto_Ptr_Test icc "Refcounted_Auto_Ptr_Test.icc", ics "Ref { } -subproject Reverse_Lock_Test icc "Reverse_Lock_Test.icc", ics "Reverse_Lock_Test.ics" +subproject Reference_Counted_Event_Handler_Test icc "Reference_Counted_Event_Handler_Test.icc", ics "Reference_Counted_Event_Handler_Test.ics" { } -subproject Service_Config_Test icc "Service_Config_Test.icc", ics "Service_Config_Test.ics" +subproject Reverse_Lock_Test icc "Reverse_Lock_Test.icc", ics "Reverse_Lock_Test.ics" { } -subproject libService_Config_DLL icc "libService_Config_DLL.icc", ics "libService_Config_DLL.ics" +subproject Semaphore_Test icc "Semaphore_Test.icc", ics "Semaphore_Test.ics" { } -subproject SOCK_Connector_Test icc "SOCK_Connector_Test.icc", ics "SOCK_Connector_Test.ics" +subproject Service_Config_Test icc "Service_Config_Test.icc", ics "Service_Config_Test.ics" { } -subproject SOCK_Send_Recv_Test icc "SOCK_Send_Recv_Test.icc", ics "SOCK_Send_Recv_Test.ics" +subproject Service_Config_Test icc "Service_Config_Test.icc", ics "Service_Config_Test.ics" { } -subproject SOCK_Test icc "SOCK_Test.icc", ics "SOCK_Test.ics" +subproject Signal_Test icc "Signal_Test.icc", ics "Signal_Test.ics" { } -subproject SPIPE_Test icc "SPIPE_Test.icc", ics "SPIPE_Test.ics" +subproject Sigset_Ops_Test icc "Sigset_Ops_Test.icc", ics "Sigset_Ops_Test.ics" { } -subproject SString_Test icc "SString_Test.icc", ics "SString_Test.ics" +subproject Simple_Message_Block_Test icc "Simple_Message_Block_Test.icc", ics "Simple_Message_Block_Test.ics" { } -subproject SV_Shared_Memory_Test icc "SV_Shared_Memory_Test.icc", ics "SV_Shared_Memory_Test.ics" +subproject SOCK_Connector_Test icc "SOCK_Connector_Test.icc", ics "SOCK_Connector_Test.ics" { } -subproject Semaphore_Test icc "Semaphore_Test.icc", ics "Semaphore_Test.ics" +subproject SOCK_Send_Recv_Test icc "SOCK_Send_Recv_Test.icc", ics "SOCK_Send_Recv_Test.ics" { } -subproject Service_Config_Test icc "Service_Config_Test.icc", ics "Service_Config_Test.ics" +subproject SOCK_Test icc "SOCK_Test.icc", ics "SOCK_Test.ics" { } -subproject Signal_Test icc "Signal_Test.icc", ics "Signal_Test.ics" +subproject SPIPE_Test icc "SPIPE_Test.icc", ics "SPIPE_Test.ics" { } -subproject Sigset_Ops_Test icc "Sigset_Ops_Test.icc", ics "Sigset_Ops_Test.ics" +subproject SString_Test icc "SString_Test.icc", ics "SString_Test.ics" { } -subproject Simple_Message_Block_Test icc "Simple_Message_Block_Test.icc", ics "Simple_Message_Block_Test.ics" +subproject SV_Shared_Memory_Test icc "SV_Shared_Memory_Test.icc", ics "SV_Shared_Memory_Test.ics" { } @@ -390,10 +410,6 @@ subproject Svc_Handler_Test icc "Svc_Handler_Test.icc", ics "Svc_Handler_Test.ic { } -subproject TSS_Test icc "TSS_Test.icc", ics "TSS_Test.ics" -{ -} - subproject Task_Test icc "Task_Test.icc", ics "Task_Test.ics" { } @@ -406,11 +422,11 @@ subproject Thread_Mutex_Test icc "Thread_Mutex_Test.icc", ics "Thread_Mutex_Test { } -subproject Thread_Pool_Reactor_Test icc "Thread_Pool_Reactor_Test.icc", ics "Thread_Pool_Reactor_Test.ics" +subproject Thread_Pool_Reactor_Resume_Test icc "Thread_Pool_Reactor_Resume_Test.icc", ics "Thread_Pool_Reactor_Resume_Test.ics" { } -subproject Thread_Pool_Reactor_Resume_Test icc "Thread_Pool_Reactor_Resume_Test.icc", ics "Thread_Pool_Reactor_Resume_Test.ics" +subproject Thread_Pool_Reactor_Test icc "Thread_Pool_Reactor_Test.icc", ics "Thread_Pool_Reactor_Test.ics" { } @@ -430,6 +446,14 @@ subproject Timeprobe_Test icc "Timeprobe_Test.icc", ics "Timeprobe_Test.ics" { } +subproject Timer_Cancellation_Test icc "Timer_Cancellation_Test.icc", ics "Timer_Cancellation_Test.ics" +{ +} + +subproject Timer_Queue_Reference_Counting_Test icc "Timer_Queue_Reference_Counting_Test.icc", ics "Timer_Queue_Reference_Counting_Test.ics" +{ +} + subproject Timer_Queue_Test icc "Timer_Queue_Test.icc", ics "Timer_Queue_Test.ics" { } @@ -442,7 +466,7 @@ subproject Tokens_Test icc "Tokens_Test.icc", ics "Tokens_Test.ics" { } -subproject UPIPE_SAP_Test icc "UPIPE_SAP_Test.icc", ics "UPIPE_SAP_Test.ics" +subproject TSS_Test icc "TSS_Test.icc", ics "TSS_Test.ics" { } @@ -454,10 +478,18 @@ subproject Upgradable_RW_Test icc "Upgradable_RW_Test.icc", ics "Upgradable_RW_T { } +subproject UPIPE_SAP_Test icc "UPIPE_SAP_Test.icc", ics "UPIPE_SAP_Test.ics" +{ +} + subproject Vector_Test icc "Vector_Test.icc", ics "Vector_Test.ics" { } +subproject WFMO_Reactor_Test icc "WFMO_Reactor_Test.icc", ics "WFMO_Reactor_Test.ics" +{ +} + subproject XtReactor_Test icc "XtReactor_Test.icc", ics "XtReactor_Test.ics" { } @@ -465,27 +497,26 @@ subproject XtReactor_Test icc "XtReactor_Test.icc", ics "XtReactor_Test.ics" build all { -use ARGV_Test use Aio_Platform_Test +use ARGV_Test use Atomic_Op_Test use Auto_IncDec_Test use Barrier_Test use Basic_Types_Test use Buffer_Stream_Test -use CDR_Array_Test -use CDR_File_Test -use CDR_Test use Cache_Map_Manager_Test use Cached_Accept_Conn_Test use Cached_Conn_Test use Capabilities_Test +use CDR_Array_Test +use CDR_File_Test +use CDR_Test use Collection_Test use Config_Test use Conn_Test +use Dirent_Test use DLL_Test -use libDLL_Test use DLList_Test -use Dirent_Test use Dynamic_Priority_Test use Enum_Interfaces_Test use Env_Value_Test @@ -499,27 +530,32 @@ use Hash_Map_Manager_Test use High_Res_Timer_Test use IOStream_Test use Lazy_Map_Manager_Test +use libDLL_Test +use libTest_Output use Log_Msg_Test use Logging_Strategy_Test -use MEM_Stream_Test -use MM_Shared_Memory_Test -use MT_Reactor_Timer_Test -use MT_Reactor_Upcall_Test -use MT_SOCK_Test use Malloc_Test use Map_Manager_Test use Map_Test use Mem_Map_Test +use MEM_Stream_Test use Message_Block_Test use Message_Queue_Notifications_Test use Message_Queue_Test use Message_Queue_Test_Ex +use MM_Shared_Memory_Test +use MT_Reactor_Timer_Test +use MT_Reactor_Upcall_Test +use MT_Reference_Counted_Event_Handler_Test +use MT_Reference_Counted_Notify_Test +use MT_SOCK_Test use Naming_Test use New_Fail_Test +use NonBlocking_Conn_Test use Notify_Performance_Test -use OS_Test use Object_Manager_Test use OrdMultiSet_Test +use OS_Test use Pipe_Test use Priority_Buffer_Test use Priority_Reactor_Test @@ -528,29 +564,30 @@ use Process_Manager_Test use Process_Mutex_Test use Process_Strategy_Test use RB_Tree_Test +use Reactor_Dispatch_Order_Test use Reactor_Exceptions_Test use Reactor_Notify_Test -use Reactor_Dispatch_Order_Test use Reactor_Performance_Test +use Reactor_Registration_Test use Reactor_Timer_Test use Reactors_Test use Reader_Writer_Test use Recursive_Mutex_Test use Refcounted_Auto_Ptr_Test +use Reference_Counted_Event_Handler_Test use Reverse_Lock_Test +use Semaphore_Test +use Service_Config_Test +use Signal_Test +use Sigset_Ops_Test +use Simple_Message_Block_Test use SOCK_Connector_Test use SOCK_Send_Recv_Test use SOCK_Test use SPIPE_Test use SString_Test use SV_Shared_Memory_Test -use Semaphore_Test -use Service_Config_Test -use Signal_Test -use Sigset_Ops_Test -use Simple_Message_Block_Test use Svc_Handler_Test -use TSS_Test use Task_Test use Thread_Manager_Test use Thread_Mutex_Test @@ -559,12 +596,16 @@ use Thread_Pool_Test use Time_Service_Test use Time_Value_Test use Timeprobe_Test +use Timer_Cancellation_Test +use Timer_Queue_Reference_Counting_Test use Timer_Queue_Test use TkReactor_Test use Tokens_Test -use UPIPE_SAP_Test +use TSS_Test use Unbounded_Set_Test_Ex use Upgradable_RW_Test +use UPIPE_SAP_Test use Vector_Test +use WFMO_Reactor_Test use XtReactor_Test } diff --git a/tests/tests.mpc b/tests/tests.mpc index f6f2cd6056c..79d7f94da0f 100644 --- a/tests/tests.mpc +++ b/tests/tests.mpc @@ -1548,3 +1548,75 @@ project(Unbounded Set Ex Test) : aceexe { Header_Files { } } + +project(WFMO Reactor Test) : aceexe { + exename = WFMO_Reactor_Test + Source_Files { + WFMO_Reactor_Test.cpp + } + Header_Files { + } +} + +project(NonBlocking Conn Test) : aceexe { + exename = NonBlocking_Conn_Test + Source_Files { + NonBlocking_Conn_Test.cpp + } + Header_Files { + } +} + +project(Reference Counted Event Handler Test) : aceexe { + exename = Reference_Counted_Event_Handler_Test + Source_Files { + Reference_Counted_Event_Handler_Test.cpp + } + Header_Files { + } +} + +project(MT Reference Counted Event Handler Test) : aceexe { + exename = MT_Reference_Counted_Event_Handler_Test + Source_Files { + MT_Reference_Counted_Event_Handler_Test.cpp + } + Header_Files { + } +} + +project(MT Reference Counted Notify Test) : aceexe { + exename = MT_Reference_Counted_Notify_Test + Source_Files { + MT_Reference_Counted_Notify_Test.cpp + } + Header_Files { + } +} + +project(Timer Cancellation Test) : aceexe { + exename = Timer_Cancellation_Test + Source_Files { + Timer_Cancellation_Test.cpp + } + Header_Files { + } +} + +project(Timer Queue Reference Counting Test) : aceexe { + exename = Timer_Queue_Reference_Counting_Test + Source_Files { + Timer_Queue_Reference_Counting_Test.cpp + } + Header_Files { + } +} + +project(Reactor Registration Test) : aceexe { + exename = Reactor_Registration_Test + Source_Files { + Reactor_Registration_Test.cpp + } + Header_Files { + } +} |
