diff options
Diffstat (limited to 'CIAO')
-rw-r--r-- | CIAO/ChangeLog | 19 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp | 35 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp | 26 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp | 12 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp | 25 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp | 24 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/PlanNoHash.cdp | 206 | ||||
-rw-r--r-- | CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/PlanWrongNames.cdp (renamed from CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/Plan.cdp) | 0 | ||||
-rwxr-xr-x | CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl | 141 |
9 files changed, 414 insertions, 74 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index e0f21de4bc6..9c694b0cbb8 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,22 @@ +Wed May 4 11:37:31 UTC 2011 Marcel Smit <msmit@remedy.nl> + + * connectors/dds4ccm/impl/ndds/DomainParticipant.cpp: + * connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp: + * connectors/dds4ccm/impl/ndds/Publisher.cpp: + * connectors/dds4ccm/impl/ndds/Subscriber.cpp: + * connectors/dds4ccm/impl/ndds/Utils.cpp: + Improved handling of Qos profile string. Throwing a ::CORBA::INTERAL + when the Qos profile string does not meet the requirements + (i.e. containing a '#'-sign). + + * connectors/dds4ccm/tests/QosProfile/descriptors/PlanNoHash.cdp: + * connectors/dds4ccm/tests/QosProfile/descriptors/PlanWrongNames.cdp: + * connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl: + Extended this test with a malformed Qos profile string. + + * connectors/dds4ccm/tests/QosProfile/descriptors/Plan.cdp: + Removed this file. + Thu Apr 28 14:00:42 UTC 2011 Marcel Smit <msmit@remedy.nl> * bin/generate_component_mpc.pl: diff --git a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp index b56d64e1c0b..a6707e03503 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipant.cpp @@ -69,6 +69,18 @@ namespace CIAO char * lib_name = get_library_name(qos_profile); char * prof_name = get_profile_name(qos_profile); + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (lib_name); + ACE_OS::free (prof_name); + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipant_i::create_publisher_with_profile<%C> - " + "Malformed qos_profile. Expected format: " + "<library_name>#<profile_name>\n", + qos_profile)); + throw ::CORBA::INTERNAL (); + } + DDSPublisher * ccm_dds_pub = this->rti_entity ()->create_publisher_with_profile ( lib_name, @@ -242,6 +254,18 @@ namespace CIAO char * lib_name = get_library_name(qos_profile); char * prof_name = get_profile_name(qos_profile); + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (lib_name); + ACE_OS::free (prof_name); + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipant_i::create_subscriber_with_profile<%C> - " + "Malformed qos_profile. Expected format: " + "<library_name>#<profile_name>\n", + qos_profile)); + throw ::CORBA::INTERNAL (); + } + DDSSubscriber * ccm_dds_sub = this->rti_entity ()->create_subscriber_with_profile ( lib_name, @@ -549,6 +573,17 @@ namespace CIAO char * lib_name = get_library_name(qos_profile); char * prof_name = get_profile_name(qos_profile); + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (lib_name); + ACE_OS::free (prof_name); + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipant_i::create_topic_with_profile <%C> - " + "Malformed qos_profile. Expected format: " + "<library_name>#<profile_name>\n", + qos_profile)); + throw ::CORBA::INTERNAL (); + } dds_tp = this->rti_entity ()->create_topic_with_profile ( impl_name, type_name, diff --git a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp index 4363a03b9a1..df9ed0d542b 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/DomainParticipantFactory.cpp @@ -151,6 +151,19 @@ namespace CIAO char * lib_name = get_library_name(qos_profile); char * prof_name = get_profile_name(qos_profile); + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (lib_name); + ACE_OS::free (prof_name); + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipantFactory_i::" + "create_participant_with_profile <%C> - " + "Malformed qos_profile. Expected format: " + "<library_name>#<profile_name>\n", + qos_profile)); + throw ::CORBA::INTERNAL (); + } + dds_dp = DDSDomainParticipantFactory::get_instance ()-> create_participant_with_profile (domain_id, lib_name, @@ -343,6 +356,19 @@ namespace CIAO char * lib_name = get_library_name(qos_profile); char * prof_name = get_profile_name(qos_profile); + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (lib_name); + ACE_OS::free (prof_name); + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_DomainParticipantFactory_i::" + "set_default_participant_qos_with_profile <%C> - " + "Malformed qos_profile. Expected format: " + "<library_name>#<profile_name>\n", + qos_profile)); + throw ::CORBA::INTERNAL (); + } + ::DDS::ReturnCode_t retcode = DDSDomainParticipantFactory::get_instance ()-> set_default_participant_qos_with_profile (lib_name, prof_name); diff --git a/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp b/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp index 78e4a2e9c37..2b0c7d98c71 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/Publisher.cpp @@ -119,6 +119,18 @@ namespace CIAO char * lib_name = get_library_name(qos_profile); char * prof_name = get_profile_name(qos_profile); + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (lib_name); + ACE_OS::free (prof_name); + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_Publisher_i::create_datawriter_with_profile <%C> - " + "Malformed qos_profile. Expected format: " + "<library_name>#<profile_name>\n", + qos_profile)); + throw ::CORBA::INTERNAL (); + } + DDSDataWriter *ccm_dds_dw = this->rti_entity ()->create_datawriter_with_profile ( topic->get_rti_entity (), lib_name, diff --git a/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp b/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp index 1f623a56194..74a3db0d8ea 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/Subscriber.cpp @@ -112,6 +112,18 @@ namespace CIAO char * lib_name = get_library_name(qos_profile); char * prof_name = get_profile_name(qos_profile); + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (lib_name); + ACE_OS::free (prof_name); + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_Subscriber_i::create_datareader_with_profile <%C> - " + "Malformed qos_profile. Expected format: " + "<library_name>#<profile_name>\n", + qos_profile)); + throw ::CORBA::INTERNAL (); + } + DDSDataReader * dr = this->rti_entity ()->create_datareader_with_profile ( topic, lib_name, @@ -133,6 +145,19 @@ namespace CIAO { char * lib_name = get_library_name (qos_profile); char * prof_name = get_profile_name (qos_profile); + + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (lib_name); + ACE_OS::free (prof_name); + DDS4CCM_ERROR (DDS4CCM_LOG_LEVEL_ERROR, (LM_ERROR, DDS4CCM_INFO + "DDS_Subscriber_i::create_datareader_with_profile <%C> - " + "Malformed qos_profile. Expected format: " + "<library_name>#<profile_name>\n", + qos_profile)); + throw ::CORBA::INTERNAL (); + } + DDSDataReader * dr = this->rti_entity ()->create_datareader_with_profile (topic, lib_name, prof_name, diff --git a/CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp b/CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp index 5b6dc8e3151..722eecdd245 100644 --- a/CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp +++ b/CIAO/connectors/dds4ccm/impl/ndds/Utils.cpp @@ -1,7 +1,7 @@ // $Id$ #include "dds4ccm/impl/ndds/Utils.h" -#include "ace/Log_Msg.h" +#include "dds4ccm/impl/logger/Log_Macros.h" #include "ace/Tokenizer_T.h" namespace CIAO @@ -13,7 +13,15 @@ namespace CIAO char* buf = ACE_OS::strdup (qos_profile); ACE_Tokenizer_T<char> tok (buf); tok.delimiter_replace ('#', 0); - char * ret = ACE_OS::strdup (tok.next ()); + const char * lib_name = tok.next (); + + if (lib_name == 0) + { + ACE_OS::free (buf); + return 0; + } + + char * ret = ACE_OS::strdup (lib_name); ACE_OS::free (buf); return ret; } @@ -23,8 +31,16 @@ namespace CIAO char* buf = ACE_OS::strdup (qos_profile); ACE_Tokenizer_T<char> tok (buf); tok.delimiter_replace ('#', 0); - tok.next (); - char * ret = ACE_OS::strdup (tok.next ()); + const char * lib_name = tok.next (); + const char * prof_name = tok.next (); + + if (lib_name == 0 || prof_name == 0) + { + ACE_OS::free (buf); + return 0; + } + + char * ret = ACE_OS::strdup (prof_name); ACE_OS::free (buf); return ret; } diff --git a/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/PlanNoHash.cdp b/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/PlanNoHash.cdp new file mode 100644 index 00000000000..9a65db49669 --- /dev/null +++ b/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/PlanNoHash.cdp @@ -0,0 +1,206 @@ +<!-- $Id$ --> +<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 Deployment.xsd"> + <label>QosProfile_Test_Depl_1</label> + <UUID>QosProfile_Test_Depl_1</UUID> + + <implementation xmi:id="ComponentComponentImplementation"> + <name>ComponentComponentImplementation</name> + <source/> + <artifact xmi:idref="Component_ExecArtifact" /> + <artifact xmi:idref="Component_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_QosProfile_Test_Component_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_QosProfile_Test_QosProfileComponent_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Component_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>Component_exec</string> + </value> + </value> + </execParameter> + </implementation> + + <implementation xmi:id="QosProfile_Test_ConnectorComponentImplementation"> + <name>QosProfile_Test_ConnectorComponentImplementation</name> + <source/> + <artifact xmi:idref="QosProfile_Test_Connector_ExecArtifact" /> + <artifact xmi:idref="QosProfile_Test_Connector_SvntArtifact" /> + <execParameter> + <!-- entrypoint as exec parameter (see 10.6.1) --> + <name>component factory</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_QosProfile_Test_QosProfileTestConnector_DDS_Event_Impl</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantEntrypoint</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>create_QosProfile_Test_QosProfileTestConnector_DDS_Event_Servant</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ServantArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>QosProfile_Test_Connector_svnt</string> + </value> + </value> + </execParameter> + <execParameter> + <name>edu.vanderbilt.dre.CIAO.ExecutorArtifact</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>QosProfile_Test_Connector_exec</string> + </value> + </value> + </execParameter> + </implementation> + <instance xmi:id="ComponentComponentInstance"> + <name>ComponentComponent</name> + <node>ComponentNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="ComponentComponentImplementation" /> + </instance> + <instance xmi:id="QosProfile_Test_ConnectorComponentInstance"> + <name>QosProfile_Test_ConnectorComponent</name> + <node>ComponentNode</node> + <!-- hostname --> + <source/> + <implementation xmi:idref="QosProfile_Test_ConnectorComponentImplementation" /> + <configProperty> + <name>qos_profile</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>QosProfile_Library::QosProfile_Profile</string> + </value> + </value> + </configProperty> + <configProperty> + <name>topic_name</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>QosProfile_Test</string> + </value> + </value> + </configProperty> + </instance> + + <connection> + <name>info_write_data</name> + <deployRequirement> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name> + <resourceType>Local_Interface</resourceType> + </deployRequirement> + <internalEndpoint> + <portName>info_write_data</portName> + <provider>false</provider> + <kind>SimplexReceptacle</kind> + <instance xmi:idref="ComponentComponentInstance" /> + </internalEndpoint> + <internalEndpoint> + <portName>supplier_data</portName> + <provider>true</provider> + <kind>Facet</kind> + <instance xmi:idref="QosProfile_Test_ConnectorComponentInstance" /> + </internalEndpoint> + </connection> + + <artifact xmi:id="QosProfile_Test_Connector_ExecArtifact"> + <name>QosProfile_Test_Connector_exec</name> + <source/> + <node/> + <location>QosProfile_Test_Connector_exec</location> + </artifact> + <artifact xmi:id="QosProfile_Test_Connector_SvntArtifact"> + <name>QosProfile_Test_Connector_svnt</name> + <source/> + <node/> + <location>QosProfile_Test_Connector_svnt</location> + </artifact> + <artifact xmi:id="QosProfile_Test_Connector_StubArtifact"> + <name>QosProfile_Test_Connector_stub</name> + <source/> + <node/> + <location>QosProfile_Test_Connector_stub</location> + </artifact> + <artifact xmi:id="Component_ExecArtifact"> + <name>Component_exec</name> + <source/> + <node/> + <location>Component_exec</location> + </artifact> + <artifact xmi:id="Component_SvntArtifact"> + <name>Component_svnt</name> + <source/> + <node/> + <location>Component_svnt</location> + </artifact> + <artifact xmi:id="Component_StubArtifact"> + <name>Component_stub</name> + <source/> + <node/> + <location>Component_stub</location> + </artifact> +</Deployment:DeploymentPlan> diff --git a/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/Plan.cdp b/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/PlanWrongNames.cdp index 485bb4425ed..485bb4425ed 100644 --- a/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/Plan.cdp +++ b/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/PlanWrongNames.cdp diff --git a/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl b/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl index 5218d19af9c..c4d3d4cd08d 100755 --- a/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl +++ b/CIAO/connectors/dds4ccm/tests/QosProfile/descriptors/run_test.pl @@ -23,7 +23,6 @@ $nr_daemon = 1; @nodenames = ( "ComponentNode" ); # ior files other than daemon -# ior files other than daemon $ior_nsbase = "ns.ior"; $ior_nsfile = 0; $ior_embase = "EM.ior"; @@ -42,7 +41,6 @@ $tg_exe_man = 0; $tg_executor = 0; $status = 0; -$cdp_file = "Plan.cdp"; sub create_targets { # naming service @@ -102,9 +100,9 @@ sub kill_open_processes { } # in case shutdown did not perform as expected $tg_executor->KillAll ('dance_locality_manager'); - delete_ior_files (); } + sub run_node_daemons { for ($i = 0; $i < $nr_daemon; ++$i) { $iorbase = $iorbases[$i]; @@ -117,7 +115,7 @@ sub run_node_daemons { $d_cmd = "$DANCE_ROOT/bin/dance_node_manager"; $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService"; - print "Run dance_node_manager with $d_param\n"; + print "Run node daemon\n"; $DEAMONS[$i] = $tg_daemons[$i]->CreateProcess ($d_cmd, $d_param); $DEAMONS[$i]->Spawn (); @@ -125,7 +123,7 @@ sub run_node_daemons { if ($tg_daemons[$i]->WaitForFileTimed($iorbase, $tg_daemons[$i]->ProcessStartWaitInterval ()) == -1) { print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; for (; $i >= 0; --$i) { $DEAMONS[$i]->Kill (); $DEAMONS[$i]->TimedWait (1); } @@ -135,93 +133,96 @@ sub run_node_daemons { return 0; } +if ($#ARGV == -1) { + opendir(DIR, "."); + @files = grep(/\.cdp$/,readdir(DIR)); + closedir(DIR); +} +else { + @files = @ARGV; +} + create_targets (); init_ior_files (); -# Invoke naming service - -$NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile"); - -$ns_status = $NS->Spawn (); +foreach $file (@files) { + print "*********** Starting test for deployment $file ***********\n"; -if ($ns_status != 0) { - print STDERR "ERROR: Unable to execute the naming service\n"; - kill_open_processes (); - exit 1; -} + print STDERR "Starting Naming Service\n"; -print STDERR "Starting Naming Service with -ORBEndpoint iiop://localhost:60003 -o ns.ior\n"; + $NS = $tg_naming->CreateProcess ("$TAO_ROOT/orbsvcs/Naming_Service/tao_cosnaming", " -ORBEndpoint iiop://localhost:60003 -o $ior_nsfile"); + $NS->Spawn (); -if ($tg_naming->WaitForFileTimed ($ior_nsbase, - $tg_naming->ProcessStartWaitInterval ()) == -1) { - print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); $NS->TimedWait (1); - exit 1; -} + if ($tg_naming->WaitForFileTimed ($ior_nsbase, + $tg_naming->ProcessStartWaitInterval ()) == -1) { + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; + } -$ns_running = 1; -# Set up NamingService environment -$ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; + $ns_running = 1; + # Set up NamingService environment + $ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; -# Invoke node daemon. -print "Invoking node daemon\n"; -$status = run_node_daemons (); + # Invoke node daemon. + print "Invoking node daemon\n"; + $status = run_node_daemons (); -if ($status != 0) { - print STDERR "ERROR: Unable to execute the node daemon\n"; - kill_open_processes (); - exit 1; -} + if ($status != 0) { + print STDERR "ERROR: Unable to execute the node daemons\n"; + kill_open_processes (); + exit 1; + } -$daemons_running = 1; + $daemons_running = 1; -# Invoke execution manager. -print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n"; -$EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", + # Invoke execution manager. + print "Invoking execution manager\n"; + $EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", "-e$ior_emfile --domain-nc corbaloc:rir:/NameService"); -$em_status = $EM->Spawn (); + $EM->Spawn (); -if ($em_status != 0) { - print STDERR "ERROR: dance_execution_manager returned $em_status"; - exit 1; -} + if ($tg_exe_man->WaitForFileTimed ($ior_embase, + $tg_exe_man->ProcessStartWaitInterval ()) == -1) { + print STDERR + "ERROR: The ior file of execution manager could not be found\n"; + kill_open_processes (); + exit 1; + } -if ($tg_exe_man->WaitForFileTimed ($ior_embase, - $tg_exe_man->ProcessStartWaitInterval ()) == -1) { - print STDERR - "ERROR: The ior file of execution manager could not be found\n"; - kill_open_processes (); - exit 1; -} + $em_running = 1; -$em_running = 1; + # Invoke executor - start the application -. -# Invoke executor - start the application -. -print "Invoking executor - launch the application -\n"; + print "Invoking executor - launch the application -\n"; -print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n"; -$E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", - "-x $cdp_file -k file://$ior_emfile -q"); -$pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ()); + print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n"; + $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", + "-x $file -k file://$ior_emfile -q"); + $pl_status = $E->SpawnWaitKill ($tg_executor->ProcessStartWaitInterval ()); -if ($pl_status != 0) { - print STDERR "OK: dance_plan_launcher returned an error status ($pl_status)\n"; - kill_open_processes (); - exit 0; -} + if ($pl_status != 0) { + print STDERR "OK: dance_plan_launcher returned an error status ($pl_status)\n"; + kill_open_processes (); + } + else { + print "ERROR : dance_plan_launcher didn't return with an error.\n"; + } -$status=$pl_status; + $status=$pl_status; -for ($i = 0; $i < $nr_daemon; ++$i) { - if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i], - $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) { - print STDERR "ERROR: The ior file of daemon $i could not be found\n"; - kill_open_processes (); - exit 1; + for ($i = 0; $i < $nr_daemon; ++$i) { + if ($tg_daemons[$i]->WaitForFileTimed ($iorbases[$i], + $tg_daemons[$i]->ProcessStopWaitInterval ()) == -1) { + print STDERR "ERROR: The ior file of daemon $i could not be found\n"; + kill_open_processes (); + exit 1; + } } -} -print "ERROR : dance_plan_launcher didn't return with an error.\n"; + delete_ior_files (); + kill_open_processes (); +} delete_ior_files (); kill_open_processes (); |