summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-12-08 05:18:08 +0000
committermarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-12-08 05:18:08 +0000
commit9daeae7c3f327862fa1a21815cf1cecb5fe3f289 (patch)
tree66aec64cdda455d67e737bb3099ace34076c75f9
parentab5dc0cc26c10de6d04c8adf699f0614187076da (diff)
downloadATCD-9daeae7c3f327862fa1a21815cf1cecb5fe3f289.tar.gz
ChangeLogTag:Thu Dec 07 23:15:38 2000 Marina Spivak <marina@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a14
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README138
-rw-r--r--TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp2
-rwxr-xr-xTAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl26
4 files changed, 172 insertions, 8 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 5eb84f3577f..b530baaef2c 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,17 @@
+Thu Dec 07 23:15:38 2000 Marina Spivak <administrator@cs.wustl.edu>
+
+ * tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp:
+
+ Changed default value of protocol1 to be SHMIOP.
+
+ * tests/RTCORBA/MT_Client_Protocol_Priority/README:
+
+ Added test description.
+
+ * tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl:
+
+ Modified to provide more descriptive messages in case of errors.
+
Thu Dec 07 22:20:12 2000 Irfan Pyarali <irfan@cs.wustl.edu>
* tao/Object.cpp (_is_a): Checking the hint of the object can be
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README
index 055c8729cdc..103c04aa4bc 100644
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README
+++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/README
@@ -1 +1,139 @@
$Id$
+
+This test involves a multithreaded client. The purpose of the test is
+to verify that client-side and server-side RTCORBA processing works ok
+when multiple threads are making invocations.
+
+NOTE:
+-----
+Since output verification script relies on ORB debug messages, i.e.,
+it checks for certain debug messages, it is BRITTLE. Whenever ORB
+developers modify/remove certain debug messages in the ORB, the output
+verification script may start reporting that there is an error, since
+something it was looking for was not found. In such case,
+process-output.pl must be updated to reflect debug output changes.
+
+Description
+-----------
+
+Server creates a POA threadpool with lanes (until POA threadpools are
+fully supported, this is emulated with global threadpools), creates an
+object with RTCORBA::CLIENT_PROPAGATED priority model, and writes its
+IOR to the file.
+
+Client spawns two threads of different priorities. Each thread sets
+RTCORBA::ClientProtocolPolicy override to a single protocol on the
+PolicyCurrent level. After setting the override, each thread performs
+a number of invocations on the server object in a loop. The number of
+invocations, each thread's priority and protocol are all specified
+through command-line arguments.
+
+This test consists of two parts. In the first, we run client and
+server, which follow the description above. We also turn on the
+debugging output for the server, and collect the entire test output
+(client and server) into a data file. The second part of the test is
+verifying the output of the test using process-output.pl perl script.
+(The perl script is used since a large number of iterations results in
+a sizeable output, which is impractical to verify manually).
+
+run_test.pl does both, i.e., it runs client and server and then runs
+the verification script on the output. Below are instructions on how
+to run both client/server and the verification script.
+
+
+To run (on Unix):
+-------
+$./server [-o <ior_output_file>]
+ -ORBdebuglevel 1 -ORBSvcConf server.conf
+ -ORBendpoint iiop://targethost:0/priority=<priority1>
+ -ORBendpoint iiop://targethost:0/priority=<priority2>
+ -ORBendpoint shmiop://targethost:0/priority=<priority1>
+ -ORBendpoint shmiop://targethost:0/priority=<priority2>
+ [more endpoints if desired]
+
+$./client [-o <ior> -n <iterations>]
+ -a <client_priority1> -b <client_priority2>
+ [-e <protocol_id1> -f <protocol_id2>]
+
+
+To run output verification script:
+
+$./process-output.pl <data-file-name>
+ <number-of-iterations>
+ <priority1>
+ <priority2>
+
+where
+
+<data_file_name> is the name of the file where output from running
+ server and client was collected
+<number_of_iterations> number of iterations specified to the client
+ with -n command-line option
+<priority1> priority for the first client thread (was specified to the
+ client with -a command-line option)
+
+<priority2> priority for the second client thread (was specified to the
+ client with -a command-line option)
+
+Note: Verification script is currently hardcoded to assume that
+ protocol used for one of the threads is iiop, and for the other
+ is shmiop.
+
+
+Options:
+--------
+ Server:
+
+-o <ior_output_file> Default: test.ior
+ Filename for output of object's IOR.
+
+-ORBdebuglevel 1 Default: none
+ This ORB option should be supplied to the
+ server in order to obtain ORB debug output,
+ which can then be verified with
+ process-output.pl for correctness.
+
+The following are the required server ORB options for this test.
+These options help set up server resources to emulate POA
+threadpool with ORB pool. Once POA threadpools are implemented, these
+options will go away.
+-ORBSvcConf server.conf
+-ORBendpoint xxx://targethost:0/priority=<priority1>
+-ORBendpoint xxxx://targethost:0/priority=<priority2>
+...
+For an example, see run_test.pl
+
+ Client:
+
+-o <ior> Default: file://test.ior
+ IOR for the server object.
+
+-n <n_iterations> Default: 100
+ Number of invocations each client thread will
+ make on the server.
+
+-a <client_priority1> Default: -1, must be overridden.
+ CORBA thread priority of the first client
+ thread.
+
+-b <client_priority2> Default: -1, must be overridden.
+ CORBA thread priority of the second client
+ thread.
+
+-e <profile_id1> Default: 1413566210 (SHMIOP)
+ Protocol for ClientProtocolPolicy override for
+ the first client thread.
+
+-f <profile_id2> Default: 0 (IIOP)
+ Protocol for ClientProtocolPolicy override for
+ the second client thread.
+
+
+Expected output:
+----------------
+If there are no problems, run_test.pl will output
+
+
+********** MT Client Protocol & CLIENT_PROPAGATED combo Test
+
+Test output is ok \ No newline at end of file
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp
index b73d360dfbc..a37164b4769 100644
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp
+++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/client.cpp
@@ -49,7 +49,7 @@ const char *ior = "file://test.ior";
int iterations = 100;
CORBA::Short priority1 = -1;
CORBA::Short priority2 = -1;
-CORBA::ULong protocol1 = 0;
+CORBA::ULong protocol1 = 1413566210;
CORBA::ULong protocol2 = 0;
int
diff --git a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl
index 34a77f12dac..93dfae14ab0 100755
--- a/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl
+++ b/TAO/tests/RTCORBA/MT_Client_Protocol_Priority/process-output.pl
@@ -39,7 +39,8 @@ if ($input_file and $ARGV[1])
}
else
{
- die "Usage: process-output.pl output-file-name number-of-iterations \n";
+ die "Usage: process-output.pl output-file-name "
+ ."number-of-iterations priority1 priority2\n";
}
$thread_priority_pattern =
@@ -114,15 +115,26 @@ close (DATA);
if ($server_shutdown == 0
or $threads_finished == 0)
{
- print "Missing test over message\n";
+ print "ERROR: 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)
+ or $iiop_requests != $iterations)
{
- print "Error in invocation log messages count\n";
+ print "ERROR: Number of iiop requests differs from shmiop differs from "
+ ."number of iterations\n";
+}
+elsif (($priority1 != $priority2
+ and ($priority1_requests != $priority2_requests
+ or $priority1_requests != $iterations))
+ or ($priority1 == $priority2
+ and ($priority2_requests != 0
+ or $priority1_requests != @*$iterations)))
+{
+ print "ERROR: Nonmatching number of requests of each priority\n";
+}
+elsif ($test_method != 2*$iterations)
+{
+ print "ERROR: Incorrect number servant invocations\n";
}
else
{