summaryrefslogtreecommitdiff
path: root/modules/CIAO/tests/Bug_2130_Regression/descriptors
diff options
context:
space:
mode:
Diffstat (limited to 'modules/CIAO/tests/Bug_2130_Regression/descriptors')
-rw-r--r--modules/CIAO/tests/Bug_2130_Regression/descriptors/DeploymentPlan.cdp117
-rw-r--r--modules/CIAO/tests/Bug_2130_Regression/descriptors/TestNodeManagerMap.dat2
-rw-r--r--modules/CIAO/tests/Bug_2130_Regression/descriptors/rt-config-example.csr30
-rw-r--r--modules/CIAO/tests/Bug_2130_Regression/descriptors/run_test.pl177
4 files changed, 326 insertions, 0 deletions
diff --git a/modules/CIAO/tests/Bug_2130_Regression/descriptors/DeploymentPlan.cdp b/modules/CIAO/tests/Bug_2130_Regression/descriptors/DeploymentPlan.cdp
new file mode 100644
index 00000000000..d814af11a50
--- /dev/null
+++ b/modules/CIAO/tests/Bug_2130_Regression/descriptors/DeploymentPlan.cdp
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
+<Deployment:deploymentPlan
+ xmlns:Deployment="http://www.omg.org/Deployment"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.omg.org/Deployment Modified_Deployment.xsd">
+
+ <label>CheckPoint-DeploymentPlan</label>
+
+ <UUID>CheckPoint_Plan_UUID_0001</UUID>
+
+ <realizes>
+ <label>CheckPoint-realizes-cid</label>
+ <UUID>c0965470-7b83-11d9-9669-0800200c9a66</UUID>
+ <specificType/>
+ <supportedType>IDL:ENW/Sender:1.0</supportedType>
+ <port>
+ <name>read_message</name>
+ <specificType>IDL:ENW/ISessionService:1.0</specificType>
+ <supportedType>IDL:ENW/ISessionService:1.0</supportedType>
+ <provider>false</provider>
+ <exclusiveProvider>false</exclusiveProvider>
+ <exclusiveUser>true</exclusiveUser>
+ <optional>false</optional>
+ <kind>SimplexReceptacle</kind>
+ </port>
+ </realizes>
+
+ <implementation id="CheckPoint-TSEC_CheckPoint-mdd">
+ <name>CheckPoint-TSEC_CheckPoint-mdd</name>
+ <source><!-- @@ Don't know what goes here --></source>
+ <artifact>CheckPoint-TSEC_CheckPoint_exec</artifact>
+ <artifact>CheckPoint-TSEC_CheckPoint_svnt</artifact>
+ </implementation>
+
+ <instance id="CheckPoint-TSEC_CheckPoint-idd">
+ <name>CheckPoint-TSEC_CheckPoint-idd</name>
+ <node>CheckPointNode</node>
+ <source/>
+ <implementation>CheckPoint-TSEC_CheckPoint-mdd</implementation>
+ <configProperty>
+ <name>ComponentIOR</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>TSEC_CheckPoint.ior</string>
+ </value>
+ </value>
+ </configProperty>
+
+ <deployedResource>
+ <resourceUsage>InstanceUsesResource</resourceUsage>
+ <requirementName>CIAO:PolicySet</requirementName>
+ <resourceName>test_server_resource_id</resourceName>
+ <resourceValue>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>test_policy_set_id</string>
+ </value>
+ </resourceValue>
+ </deployedResource>
+ </instance>
+
+ <artifact id="CheckPoint-TSEC_CheckPoint_exec">
+ <name>TSEC_CheckPoint_exec</name>
+ <source/>
+ <node/>
+ <location>TSEC_CheckPoint_exec</location>
+ <execParameter>
+ <name>entryPoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>createTSEC_CheckPointHome_Impl</string>
+ </value>
+ </value>
+ </execParameter>
+ </artifact>
+
+ <artifact id="CheckPoint-TSEC_CheckPoint_svnt">
+ <name>TSEC_CheckPoint_svnt</name>
+ <source/>
+ <node/>
+ <location>TSEC_CheckPoint_svnt</location>
+ <execParameter>
+ <name>entryPoint</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>create_ENW_TSEC_CheckPointHome_Servant</string>
+ </value>
+ </value>
+ </execParameter>
+ </artifact>
+
+ <infoProperty>
+ <name>CIAOServerResources</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>rt-config-example.csr</string>
+ </value>
+ </value>
+ </infoProperty>
+
+</Deployment:deploymentPlan>
+
diff --git a/modules/CIAO/tests/Bug_2130_Regression/descriptors/TestNodeManagerMap.dat b/modules/CIAO/tests/Bug_2130_Regression/descriptors/TestNodeManagerMap.dat
new file mode 100644
index 00000000000..ec06179aca7
--- /dev/null
+++ b/modules/CIAO/tests/Bug_2130_Regression/descriptors/TestNodeManagerMap.dat
@@ -0,0 +1,2 @@
+CheckPointNode corbaloc:iiop:localhost:30000/NodeManager
+
diff --git a/modules/CIAO/tests/Bug_2130_Regression/descriptors/rt-config-example.csr b/modules/CIAO/tests/Bug_2130_Regression/descriptors/rt-config-example.csr
new file mode 100644
index 00000000000..e1d120352aa
--- /dev/null
+++ b/modules/CIAO/tests/Bug_2130_Regression/descriptors/rt-config-example.csr
@@ -0,0 +1,30 @@
+
+<CIAO:ServerResources
+ xmlns:CIAO="http://www.dre.vanderbilt.edu/ServerResources"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.dre.vanderbilt.edu/ServerResources CIAOServerResources.xsd"
+ id="test_server_resource_id">
+
+ <orbConfigs>
+ <resources>
+ <threadpool id="threadpool-1">
+ <stacksize>0</stacksize>
+ <static_threads>6</static_threads>
+ <dynamic_threads>0</dynamic_threads>
+ <default_priority>2</default_priority>
+ <allow_request_buffering>false</allow_request_buffering>
+ <max_buffered_requests>0</max_buffered_requests>
+ <max_request_buffered_size>0</max_request_buffered_size>
+ </threadpool>
+ </resources>
+
+ <policySet id="test_policy_set_id">
+ <priorityModel server_priority="2">
+ <priority_model>SERVER_DECLARED</priority_model>
+ </priorityModel>
+ <threadpool>threadpool-1</threadpool>
+ </policySet>
+
+ </orbConfigs>
+</CIAO:ServerResources> \ No newline at end of file
diff --git a/modules/CIAO/tests/Bug_2130_Regression/descriptors/run_test.pl b/modules/CIAO/tests/Bug_2130_Regression/descriptors/run_test.pl
new file mode 100644
index 00000000000..6688e0a224f
--- /dev/null
+++ b/modules/CIAO/tests/Bug_2130_Regression/descriptors/run_test.pl
@@ -0,0 +1,177 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "$ENV{'ACE_ROOT'}/bin";
+use PerlACE::Run_Test;
+
+$DAnCE = "$ENV{'ACE_ROOT'}/TAO/CIAO/DAnCE";
+$CIAO_ROOT = "$ENV{'CIAO_ROOT'}";
+$TAO_ROOT = "$ENV{'TAO_ROOT'}";
+$daemons_running = 0;
+$em_running = 0;
+$daemons = 1;
+@ports = ( 30000 );
+@iorfiles = ( "NodeApp.ior" );
+$status = 0;
+$dat_file = "TestNodeManagerMap.dat";
+$cdp_file = "DeploymentPlan.cdp";
+$controller_exec = "../SEC_CheckPoint/controller";
+
+$E = 0;
+$EM = 0;
+
+# Delete if there are any .ior files.
+sub delete_ior_files {
+ for ($i = 0; $i < $daemons; ++$i) {
+ unlink $iorfiles[$i];
+ }
+ unlink PerlACE::LocalFile ("EM.ior");
+ unlink PerlACE::LocalFile ("TSEC_CheckPoint.ior");
+ unlink PerlACE::LocalFile ("DAM.ior");
+}
+
+sub kill_node_daemons {
+ for ($i = 0; $i < $daemons; ++$i) {
+ $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1);
+ }
+}
+
+sub kill_open_processes {
+ if ($daemons_running == 1) {
+ kill_node_daemons ();
+ }
+
+ if ($em_running == 1) {
+ $EM->Kill ();
+ $EM->TimedWait (1);
+ }
+}
+
+sub run_node_daemons {
+ for ($i = 0; $i < $daemons; ++$i)
+ {
+ $iorfile = $iorfiles[$i];
+ $port = $ports[$i];
+
+ $iiop = "iiop://localhost:$port";
+ $node_app = "$DAnCE/NodeApplication/NodeApplication";
+
+ $d_cmd = "$DAnCE/NodeManager/NodeManager";
+ $d_param = "-ORBEndpoint $iiop -s $node_app -o $iorfile -a \"-r\"";
+
+ $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param);
+
+
+ $result = $Daemons[$i]->Spawn ();
+ push(@processes, $Daemons[$i]);
+
+ if (PerlACE::waitforfile_timed ($iorfile,
+ $PerlACE::wait_interval_for_process_creation) == -1) {
+ print STDERR
+ "ERROR: The ior file of node daemon $i could not be found\n";
+ for (; $i > 0; --$i) {
+ $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1);
+ }
+ return -1;
+ }
+ }
+ $daemons_running = 1;
+ return 0;
+}
+
+delete_ior_files ();
+
+
+# Invoke node daemons.
+print "Invoking node daemons\n";
+$status = run_node_daemons ();
+
+if ($status != 0) {
+ print STDERR "ERROR: Unable to execute the node daemons\n";
+ exit 1;
+}
+
+$ns_running = 1;
+
+# Invoke execution manager.
+print "Invoking execution manager\n";
+$EM = new PerlACE::Process ("$DAnCE/ExecutionManager/Execution_Manager",
+ "-o EM.ior -i $dat_file");
+$EM->Spawn ();
+
+if (PerlACE::waitforfile_timed ("EM.ior",
+ $PerlACE::wait_interval_for_process_creation) == -1) {
+ print STDERR
+ "ERROR: The ior file of execution manager could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+$em_running = 1;
+
+# Invoke executor - start the application -.
+print "Invoking executor - start the application -\n";
+$E =
+ new PerlACE::Process ("$DAnCE/Plan_Launcher/plan_launcher",
+ "-p DeploymentPlan.cdp -k file://EM.ior -o DAM.ior");
+
+$E->SpawnWaitKill (5000);
+
+
+if (PerlACE::waitforfile_timed ("TSEC_CheckPoint.ior",
+ $PerlACE::wait_interval_for_process_creation) == -1) {
+ print STDERR "ERROR: The ior file of sender could not be found\n";
+ kill_open_processes ();
+ exit 1;
+}
+
+print "Running testcase 1\n";
+
+$controller = new PerlACE::Process ("$controller_exec", "-i 1 -k file://TSEC_CheckPoint.ior -t 1 -l 100000");
+$result = $controller->SpawnWaitKill (3000);
+
+if ($result != 0) {
+ print STDERR "ERROR: The controller returned $result\n";
+ $status = 1;
+}
+
+
+print "Running testcase 2\n";
+
+$controller = new PerlACE::Process ("$controller_exec", "-i 2 -k file://TSEC_CheckPoint.ior -t 1 -l 100000");
+$result = $controller->SpawnWaitKill (3000);
+
+if ($result != 0) {
+ print STDERR "ERROR: The controller returned $result\n";
+ $status = 1;
+}
+
+print "Running testcase 3\n";
+
+$controller = new PerlACE::Process ("$controller_exec", "-k file://TSEC_CheckPoint.ior -t 2 -l 100000");
+$result = $controller->SpawnWaitKill (3000);
+
+if ($result != 0) {
+ print STDERR "ERROR: The controller returned $result\n";
+ $status = 1;
+}
+
+
+# Invoke executor - stop the application -.
+print "Invoking executor - stop the application -\n";
+$E =
+ new PerlACE::Process ("$DAnCE/Plan_Launcher/plan_launcher",
+ "-k file://EM.ior -i file://DAM.ior");
+$E->SpawnWaitKill (3000);
+
+print "Executor returned.\n";
+print "Shutting down rest of the processes.\n";
+
+delete_ior_files ();
+kill_open_processes ();
+
+exit $status;