diff options
author | marina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-12-07 09:31:06 +0000 |
---|---|---|
committer | marina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-12-07 09:31:06 +0000 |
commit | df7f700ae39d77872fadb5d4a8504e7cfb81610b (patch) | |
tree | d62be8a463ddd6199c5dd15a9f9a0019d4db37fb | |
parent | 22af0a32ef126d06e2ea2f824efaaa642f18e639 (diff) | |
download | ATCD-df7f700ae39d77872fadb5d4a8504e7cfb81610b.tar.gz |
ChangeLogTag:Thu Dec 7 03:04:51 2000 Marina Spivak <marina@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 33 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connect.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Object_Adapter.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Connect.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Connect.cpp | 7 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README | 140 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp | 25 | ||||
-rwxr-xr-x | TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl | 130 | ||||
-rwxr-xr-x | TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl | 71 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf | 3 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp | 4 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/README | 16 |
12 files changed, 260 insertions, 190 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 24e48d8b947..40fc8ba1eba 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,24 @@ +Thu Dec 7 03:04:51 2000 Marina Spivak <marina@cs.wustl.edu> + + * tests/RTCORBA/MT_Client_Protocol_Priority/README + * tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp + * tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl + * tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl + * tests/RTCORBA/MT_Client_Protocol_Priority/server.conf + * tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp + * tests/RTCORBA/README: + + Added perl script which processes test output and reports + any errors to the user. Other fixes and enhancements, e.g., + number of iterations can be specified on the command-line, etc. + + * tao/IIOP_Connect.cpp + * tao/Strategies/SHMIOP_Connect.cpp + * tao/Strategies/UIOP_Connect.cpp + * tao/PortableServer/Object_Adapter.cpp: + + Debug messages. + Wed Dec 6 23:52:48 2000 Pradeep Gore <pradeep@cs.wustl.edu> * orbsvcs/orbsvcs/Notify/Notify_ProxyConsumer_T.cpp: @@ -9,11 +30,11 @@ Wed Dec 6 23:52:48 2000 Pradeep Gore <pradeep@cs.wustl.edu> * orbsvcs/Notify_Service/README: Updated the usage section to show how the "-Notify_TPReactor"option. * orbsvcs/orbsvcs/Notify/README: - Updated with some explaination of the various MT options for the + Updated with some explaination of the various MT options for the Notify. Thanks to Sarabjeet Duhra <sarabjeet_duhra@hp.com> for reporting the problem with the -MTListenerEval option - + Wed Dec 6 16:20:36 2000 Darrell Brunsch <brunsch@uci.edu> * tests/Faults/Faults.dsw: @@ -68,7 +89,7 @@ Wed Dec 6 17:06:17 2000 Jeff Parsons <parsons@cs.wustl.edu> or a return type. We were adding '_ptr' to the scoped name. This fix also involved adding 'typedef TCKind &TCKind_out' to corbafwd.h, the same - as would be generated for an IDL enum. + as would be generated for an IDL enum. Wed Dec 6 14:32:07 2000 Jeff Parsons <parsons@cs.wustl.edu> @@ -107,13 +128,13 @@ Wed Dec 6 14:32:07 2000 Jeff Parsons <parsons@cs.wustl.edu> * tao/RT_ORBInitializer.h - Added #if TAO_HAS_RT_CORBA == 1 guard to this file + Added #if TAO_HAS_RT_CORBA == 1 guard to this file to correspond with a similar guard in the .cpp file. * tao/Messaging_Policy_i.cpp Added #if (TAO_HAS_RELATIVE_ROUNDTRIP_TIMEOUT_POLICY == 1) - guard to this file to correspond with a similar guard in + guard to this file to correspond with a similar guard in the .h file. Wed Dec 6 14:13:26 2000 Jeff Parsons <parsons@cs.wustl.edu> @@ -121,7 +142,7 @@ Wed Dec 6 14:13:26 2000 Jeff Parsons <parsons@cs.wustl.edu> * tao/DynamicAny/DynEnum_i.cpp: Fixed init() method, which tried to make a call on - the DynEnum's typecode member before it had been + the DynEnum's typecode member before it had been initialized. * tao/DynamicAny/DynArray_i.cpp: diff --git a/TAO/tao/IIOP_Connect.cpp b/TAO/tao/IIOP_Connect.cpp index a6d7fc9527f..01db7358807 100644 --- a/TAO/tao/IIOP_Connect.cpp +++ b/TAO/tao/IIOP_Connect.cpp @@ -261,6 +261,13 @@ int TAO_IIOP_Server_Connection_Handler::handle_input_i (ACE_HANDLE, ACE_Time_Value *max_wait_time) { + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) - ") + ACE_TEXT ("IIOP_Server_Connection_Handler::handle_input\n"))); + } + this->refcount_++; int result = this->acceptor_factory_->handle_input (this->transport (), @@ -285,7 +292,6 @@ TAO_IIOP_Server_Connection_Handler::handle_input_i (ACE_HANDLE, //this->TAO_IIOP_SVC_HANDLER::handle_close (); return result; } - // // Take out all the information from the <message_state> and reset // it so that nested upcall on the same transport can be handled. diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp index 7d21bb04e06..2d5a5399d38 100644 --- a/TAO/tao/PortableServer/Object_Adapter.cpp +++ b/TAO/tao/PortableServer/Object_Adapter.cpp @@ -1473,6 +1473,12 @@ TAO_Object_Adapter::Priority_Model_Processing::pre_invoke ( this->state_ = PRIORITY_RESET_REQUIRED; } + else if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("RTCORBA::CLIENT_PROPAGATED processing") + ACE_TEXT (" (%P|%t): original thread priority =") + ACE_TEXT (" requested priority = %d\n"), + target_priority)); } } diff --git a/TAO/tao/Strategies/SHMIOP_Connect.cpp b/TAO/tao/Strategies/SHMIOP_Connect.cpp index 56f8ed072a5..6f947500339 100644 --- a/TAO/tao/Strategies/SHMIOP_Connect.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connect.cpp @@ -249,6 +249,13 @@ int TAO_SHMIOP_Server_Connection_Handler::handle_input_i (ACE_HANDLE, ACE_Time_Value *max_wait_time) { + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) - ") + ACE_TEXT ("SHMIOP_Server_Connection_Handler::handle_input\n"))); + } + this->refcount_++; int result = this->acceptor_factory_->handle_input (this->transport (), diff --git a/TAO/tao/Strategies/UIOP_Connect.cpp b/TAO/tao/Strategies/UIOP_Connect.cpp index 0ffea424877..9aa24aeaf52 100644 --- a/TAO/tao/Strategies/UIOP_Connect.cpp +++ b/TAO/tao/Strategies/UIOP_Connect.cpp @@ -238,6 +238,13 @@ int TAO_UIOP_Server_Connection_Handler::handle_input_i (ACE_HANDLE, ACE_Time_Value *max_wait_time) { + if (TAO_debug_level > 0) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) - ") + ACE_TEXT ("UIOP_Server_Connection_Handler::handle_input\n"))); + } + this->refcount_++; int result = diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README index 8e586c73468..055c8729cdc 100644 --- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README @@ -1,141 +1 @@ $Id$ - -This is a unit test for RTCORBA::SERVER_DECLARED priority model. - -Description: ---------- -This test consists of five mini-tests, each exercising -ClientProtocolPolicy in a different configuration: - -1. Invoke an operation on the object that had ClientProtocolPolicy set - on the server side. Make sure the protocol dictated by the policy is - used for communication. - -2. Set ORB-level ClientProtocolPolicy override on the client ORB, and - invoke an operation on an object that had ClientProtocolPolicy set - on the server side. Should receive CORBA::INV_POLICY exception - since the policy is set on both client and server sides. - -3. Set ORB-level ClientProtocolPolicy override on the client ORB, and - invoke an operation on an object that did *not* have - ClientProtocolPolicy set on the server side. Make sure the - protocol dictated by the policy override is used for communication. - -4. Set ClientProtocolPolicy override on the Current level in the - client ORB, and invoke an operation on an object that did *not* - have ClientProtocolPolicy set on the server. The override value is - a sequence of protocols none of which are available in the server - ORB. Should receive CORBA::INV_POLICY exception since none of the - protocols specified in the policy are available for communication. - -5. Set ClientProtocolPolicy override on the Current level in the - client ORB, and invoke an operation on an object that did *not* - have ClientProtocolPolicy set on the server. The override value is - a sequence of two protocols, in which the first protocol isn't - available in the server ORB, and the second protocol is available - in both client and server ORBs. Make sure the second protocol - specified in the override is used for communication. - - -Scenario: - -The server creates two objects: one with ClientProtocolPolicy set and -the other one without the policy being set. The value of the -ClientProtocolPolicy is a single protocol specified using server -command-line option (see Options section below). The client obtains -two object references and uses them to run five tests decribed -above. Finally, the client invokes <shutdown> method on the server to -terminate the processes. - -To run (on Unix): -------- -$./server [-s <ior_output_file1> -c <ior_output_file2> -p <profile_id>] -$./client [-s <ior1> -c <ior2> -p <profile_id>] -ORBdebuglevel 1 - - -Options: --------- - Server: - --s <ior_output_file1> Default: test1.ior - Filename for output of IOR for the object that - had ClientProtocolPolicy set on the server. - --c <ior_output_file2> Default: test2.ior - Filename for output of IOR for the object that - did not have ClientProtocolPolicy set on the - server. - --p <profile_id> Default: 0 (IIOP) - Protocol used as a ClientProtocolPolicy value - for one of the server's objects. - - Client: - --s <ior_output_file1> Default: file://test1.ior - IOR for the object that had - ClientProtocolPolicy set on the server. - --c <ior_output_file2> Default: file://test2.ior - IOR for the object that did not have - ClientProtocolPolicy set on the server. - --p <profile_id> Default: 0 (IIOP) - Protocol used as a ClientProtocolPolicy value - on the client. - --ORBdebuglevel 1 Recommended ORB option for the client in order to see - which protocols are being used in each - mini-test for client-server communication. - - - -Expected output: ----------------- -Test 1: invocation should succeed using the protocol specified with - <-p> option to the server. -Tests 2 and 4: should produce INV_POLICY exception. -Tests 3 and 5: invocation should succeed using the protocol specified - with <-p> option to the client. - -Below is the expected output from run_test.pl on a Unix platform. See -run_test.pl for command-line options used for client and server. -NOTE: expected output differs on windows due to UIOP not being -available. - - -********** RTCORBA Client Protocol Policy Unit Test - - -Activated object one as <IOR:000000000000000d49444c3a546573743a312e30000000000000000012000010200000000116163652e63732e777573746c2e6564750000c62d00000023439e940eb000e405a000000010000000100000000000000010000000100000000040000000000054414f000000000100000014000000000001000100000000000101090000000054414f0200000000004000000116163652e63732e777573746c2e6564750000c62d00000000000000116167573746c2e6564750000c62d00000000000000116163652e63732e777573746c2e656475000000000126163652e646f632e777573746c2e65647500c62d0000000000000002000000240000041000500000014000000000000000154414f00000100000001000054414f00000000d0000102661722f746d702f54414f414141514d614f53580000000000002314010f004e535439e940eb00100000001000000000000000100000001000000000400000000000000080000000054414f00014000000000001000100000000000101090000000054414f020000002400000000000000010722f746d702f54414f414141514d614f535800000000000002000000240000000000000001544000000000000000154414f00000100000001000054414f02000000cc00010200000000116167573746c2e6564750061c62e0000002314010f004e535439e940eb000e405a000000010000000000100000001000000000400000000000000080000000054414f00000000010000001400000000000000101090000000054414f02000000220000000000000001000000116163652e63732e564750000c62e00004f5300000002000000240000000000000001544100050000001400000004f000001000000010000> - - -Activated object two as <IOR:000000000000000d49444c3a546573743a312e3000000000000000000ea00010200000000116163652e63732e777573746c2e6564750000c62d0000001b439e940eb000e257a000000000000000100000001000000000300000000000000080000000050100000014000000000001000100000000000101090000000054414f0200000076000000000016163652e63732e777573746c2e6564750000c62d00000000000000116163652e63732e777570009c62d0000cb40000000116163652e63732e777573746c2e6564750000c62d00000000000046f632e777573746c2e65647500c62d0000000054414f000000009c00010200000000162f76654414f414141514d614f535800001b0000001b14010f0052535439e940eb000e257a00000000001030000000300000000000000080000000054414f00000000010000001400000000000100001090000000054414f02000000240000000000000001000000162f7661722f746d702f54414ff535800000054414f020000009600010200000000116163652e63732e777573746c2e65647501b14010f0052535439e940eb000e257a00000000000000010000000100000000030000000000054414f000000000100000014000000000001000100000000000101090000000054414f0200000000001000000116163652e63732e777573746c2e6564750063c62e0000> - -TAO (25450|1) Loaded default protocol <IIOP_Factory> -TAO (25450|1) Loaded default protocol <UIOP_Factory> -TAO (25450|1) Loaded default protocol <SHMIOP_Factory> - - Test 1 -TAO (25450|1) Connector::connect - looking for UIOP connection. -TAO (25450|1) UIOP connection to server <> on 8 -Test method invoked on the sever - - Test 2 -INV_POLICY exception is caught as expected. - - Test 3 -TAO (25450|1) Connector::connect - looking for SHMIOP connection. -TAO (25450|1) SHMIOP connection to server <127.0.0.1:50734> on 9 -Test method invoked on the sever - - Test 4 -INV_POLICY exception is caught as expected. - - Test 5 -TAO (25450|1) Connector::connect - looking for SHMIOP connection. -Test method invoked on the sever - - Testing over -TAO (25450|1) Connector::connect - looking for SHMIOP connection. -Server ORB event loop finished diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp index f6c8ce9b8f4..b73d360dfbc 100644 --- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp @@ -55,12 +55,15 @@ CORBA::ULong protocol2 = 0; int parse_args (int argc, char *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "o:a:b:e:f:"); + ACE_Get_Opt get_opts (argc, argv, "o:a:b:e:f:n:"); int c, result; while ((c = get_opts ()) != -1) switch (c) { + case 'n': + iterations = ACE_OS::atoi (get_opts.optarg); + break; case 'o': ior = get_opts.optarg; break; @@ -109,6 +112,7 @@ parse_args (int argc, char *argv[]) "-b <priority2> " "-e <protocol_type1> " "-f <protocol_type2> " + "-n <number_of_iterations> " "\n", argv [0]), -1); @@ -181,6 +185,16 @@ main (int argc, char *argv[]) RTCORBA::PriorityMapping *pm = mapping_manager->mapping (); + // RTCurrent. + object = + orb->resolve_initial_references ("RTCurrent", ACE_TRY_ENV); + ACE_TRY_CHECK; + RTCORBA::Current_var current = + RTCORBA::Current::_narrow (object.in (), ACE_TRY_ENV); + ACE_TRY_CHECK; + if (check_for_nil (current.in (), "RTCurrent") == -1) + return 1; + // Obtain Test object reference. object = orb->string_to_object (ior, ACE_TRY_ENV); @@ -256,8 +270,10 @@ main (int argc, char *argv[]) // Wait for worker threads to finish. ACE_Thread_Manager::instance ()->wait (); - // Testing over. Shut down server ORB. + // Testing over. Shut down the server. ACE_DEBUG ((LM_DEBUG, "Client threads finished\n")); + current->the_priority (priority1, ACE_TRY_ENV); + ACE_TRY_CHECK; server->shutdown (ACE_TRY_ENV); ACE_TRY_CHECK; } @@ -332,11 +348,6 @@ Worker_Thread::svc (void) ACE_TRY_ENV); ACE_TRY_CHECK; - // Prime: establish a connection. - // @@ Replace with validate_connection? - this->server_->test_method (ACE_TRY_ENV); - ACE_TRY_CHECK; - // Wait for other threads. this->synchronizer_->wait (); diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl new file mode 100755 index 00000000000..34a77f12dac --- /dev/null +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl @@ -0,0 +1,130 @@ +# $Id$ +# -*- perl -*- +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +unshift @INC, '../../../../bin'; +require Process; +require Uniqueid; + +# Usage: +# process-output.pl output-filename number-of-iterations priority1 priority2 + +# This is a Perl script that processes the output of the +# MT_Client_Protocol_Priority test run. + +# The following checks are performed: +# 1) There are no errors or excpetion messages. +# 2) Both server and client termination messages are present, i.e., +# "Client thrreads finished" and "Server ORB event loop finished". +# 3) Number of times servant is invoked equals 2 * number of +# iterations (for two threads). +# 4) Number of requests using iiop is equal to the number of requests using +# shmiop, which is equal to the specified number of iterations. +# 5) Number of requests at priority1 is equal to the number of +# requests at priority2, which is equal to the specified number of +# iterations. + +# Command-line args. +$input_file = $ARGV[0]; +$iterations = $ARGV[1]; +$priority1 = $ARGV[2]; +$priority2 = $ARGV[3]; + +# Open the output file. +if ($input_file and $ARGV[1]) +{ + open (DATA, $input_file); +} +else +{ + die "Usage: process-output.pl output-file-name number-of-iterations \n"; +} + +$thread_priority_pattern = + "original thread priority = requested priority ="; + +$iiop_requests = 0; +$shmiop_requests = 0; +$priority1_requests = 0; +$priority2_requests = 0; +$threads_finished = 0; +$server_shutdown = 0; +$test_method = 0; + +# Process the output. +while ($line = <DATA>) +{ + # Process the line. + chomp $line; + @words = split (/ /, $line); + + if ($line eq "test_method invoked") + { + ++$test_method; + } + + if ($words[3] eq "SHMIOP_Server_Connection_Handler::handle_input" + and $threads_finished == 0) + { + ++$shmiop_requests; + } + + if ($words[3] eq "IIOP_Server_Connection_Handler::handle_input" + and $threads_finished == 0) + { + ++$iiop_requests; + } + + if ($line eq "Client threads finished") + { + $threads_finished = 1; + } + + if ($line eq "Server ORB event loop finished") + { + $server_shutdown = 1; + } + + if ($line =~ /$thread_priority_pattern/ + and $threads_finished == 0) + { + if ($words[10] == $priority1) + { + ++$priority1_requests; + } + elsif ($words[10] == $priority2) + { + ++$priority2_requests; + } + } + + # Make sure there are no errors or exceptions. + if ($line =~ /error/i + or $line =~ /exception/i) + { + close (DATA); + die "Error is detected in the output file <$input_file> \n"; + } +} +close (DATA); + +# Go through processing results. +if ($server_shutdown == 0 + or $threads_finished == 0) +{ + print "Missing test over message\n"; +} +elsif ($iiop_requests != $shmiop_requests + or $iiop_requests != $iterations + or $priority1_requests != $priority2_requests + or $priority1_requests != $iterations + or $test_method != 2*$iterations) +{ + print "Error in invocation log messages count\n"; +} +else +{ + print "Test output is ok \n"; +} diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl index cd23e185301..5fdd0e9e5ee 100755 --- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/run_test.pl @@ -10,41 +10,51 @@ require ACEutils; use Cwd; $cwd = getcwd(); + +# Test parameters. $iorfile = "$cwd$DIR_SEPARATOR" . "test.ior"; +$data_file = "$cwd$DIR_SEPARATOR" . "test_run.data"; +$iterations = 50; +$priority1 = 65; +$priority2 = 70; +$priority3 = 75; +if ($^O eq "MSWin32") +{ + $priority1 = 6; + $priority2 = 1; + $priority3 = 5; +} ACE::checkForTarget($cwd); -print STDERR "\n********** MT Client Protocol & CLIENT_PROPAGATED combo Test\n\n"; - +# Clean up leftovers from previous runs. unlink $iorfile; +unlink $data_file; -# CORBA priorities 65, 70 and 75 are for the SCHED_OTHER class on -# Solaris. May need to use different values for other platforms -# depending on their native priorities scheme, i.e., based on the -# available range. $server_args = - "-o $iorfile " - ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=65 " - ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=75 " - ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=70 " - ."-ORBendpoint shmiop://$TARGETHOSTNAME:0/priority=65 " - ."-ORBendpoint shmiop://$TARGETHOSTNAME:0/priority=75 " - ."-ORBendpoint shmiop://$TARGETHOSTNAME:0/priority=70 "; + "-o $iorfile -ORBdebuglevel 1 -ORBsvcconf server.conf " + ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=$priority1 " + ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=$priority2 " + ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=$priority3 " + ."-ORBendpoint shmiop://$TARGETHOSTNAME:0/priority=$priority1 " + ."-ORBendpoint shmiop://$TARGETHOSTNAME:0/priority=$priority2 " + ."-ORBendpoint shmiop://$TARGETHOSTNAME:0/priority=$priority3 "; $client_args = - "-o file://$iorfile -ORBdebuglevel 1 " - ."-a 65 -b 70 -e 1413566210 -f 0"; + "-o file://$iorfile " + ."-a $priority1 -b $priority2 -e 1413566210 -f 0 -n $iterations"; -if ($^O eq "MSWin32") -{ - $server_args = - "-o $iorfile1 -o $iorfile2 -a 3 -b 5 -c 2 -ORBSvcConf server.conf " - ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=3 " - ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=5 " - ."-ORBendpoint iiop://$TARGETHOSTNAME:0/priority=1 "; -} +print STDERR "\n********** MT Client Protocol & CLIENT_PROPAGATED combo Test\n\n"; + +# Redirect the output of the test run to a file, so that we can process it later. +open (OLDOUT, ">&STDOUT"); +open (STDOUT, ">$data_file") or die "can't redirect stdout: $!"; +open (OLDERR, ">&STDERR"); +open (STDERR, ">&STDOUT") or die "can't redirect stderror: $!"; + +# Run server and client. $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", $server_args); @@ -69,10 +79,25 @@ if ($server == -1) { $SV->Kill (); $SV->TimedWait (1); } +close (STDERR); +close (STDOUT); +open (STDOUT, ">&OLDOUT"); +open (STDERR, ">&OLDERR"); + unlink $iorfile; if ($server != 0 || $client != 0) { exit 1; } +# Run a processing script on the test output. +$FL = Process::Create ($EXEPREFIX."process-output.pl", + " $data_file $iterations $priority1 $priority2"); +$filter = $FL->TimedWait (60); +if ($filter == -1) { + print STDERR "ERROR: filter timedout\n"; + $FL->Kill (); $FL->TimedWait (1); +} + print STDERR "\n"; + exit 0; diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf index ab4b16ac40c..3d8c51515b1 100644 --- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.conf @@ -1,4 +1,3 @@ # $Id$ # -static Resource_Factory "-ORBReactorType tp" -dynamic Resource_Factory Service_Object *TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBReactorRegistry per-priority" +static Advanced_Resource_Factory "-ORBReactorType tp -ORBReactorRegistry per-priority" diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp index b567207a4ed..413cc68e701 100644 --- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp +++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/server.cpp @@ -38,6 +38,7 @@ void Test_i::test_method (CORBA::Environment& /* ACE_TRY_ENV */) ACE_THROW_SPEC ((CORBA::SystemException)) { + ACE_DEBUG ((LM_DEBUG, "test_method invoked\n")); } void @@ -180,15 +181,12 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; - /* // Start ORB event loop. // @@ Currently we are using Reactor per priority to emulate // threadpool with lanes. Once POA threadpools are implemented, // this code should be replaced with standard threadpool apis. TAO_Pool_Per_Endpoint pool (orb.in ()); pool.run (ACE_TRY_ENV); - */ - orb->run (ACE_TRY_ENV); ACE_TRY_CHECK; ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n")); diff --git a/TAO/tests/RTCORBA/README b/TAO/tests/RTCORBA/README index 2d70795d7bb..b3f33d84254 100644 --- a/TAO/tests/RTCORBA/README +++ b/TAO/tests/RTCORBA/README @@ -23,7 +23,7 @@ includes the following: value. . Server_Declared - + Tests PriorityModelPolicy with RTCORBA::SERVER_DECLARED value. @@ -35,13 +35,6 @@ includes the following: Tests various settings of RTCORBA::ClientProtocolPolicy. - . MT_Client_Protocol_Priority - - Multithreaded test with two client threads [with different - priorities and different ClientProtocolPolicy Current-level - overrides] concurrently making invocations on one object - reference, which has a CLIENT_PROPAGATED priority model. - . Private_Connection Tests RTCORBA::PrivateConnectionPolicy support. @@ -54,3 +47,10 @@ includes the following: Tests <Object::_validate_connection>. + . MT_Client_Protocol_Priority + + Multithreaded client test. Two client threads [with + different priorities and different ClientProtocolPolicy + Current-level overrides] concurrently making invocations on + one object reference, which has a CLIENT_PROPAGATED priority + model. |