diff options
author | msmit <msmit@remedy.nl> | 2009-12-08 15:09:46 +0000 |
---|---|---|
committer | msmit <msmit@remedy.nl> | 2009-12-08 15:09:46 +0000 |
commit | 04785f4bae71c2c2665f24076b004e574e8b3fc8 (patch) | |
tree | acb3607a657708f5cb3b5f328320d2e33a90f333 | |
parent | f5f4b859186cd0e134b6d2926c0bc62723234c45 (diff) | |
download | ATCD-04785f4bae71c2c2665f24076b004e574e8b3fc8.tar.gz |
Tue Dec 8 15:11:22 UTC 2009 Marcel Smit <msmit@remedy.nl>
* DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl:
* DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl:
* tests/Bug_3769_Regression/descriptors/run_test.pl:
Resolved fuzz errors.
-rw-r--r-- | CIAO/ChangeLog | 7 | ||||
-rwxr-xr-x | CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl | 97 | ||||
-rwxr-xr-x | CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl | 72 | ||||
-rw-r--r-- | CIAO/tests/Bug_3769_Regression/descriptors/run_test.pl | 68 |
4 files changed, 119 insertions, 125 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index 8469d66e9eb..ade1c62060c 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,10 @@ +Tue Dec 8 15:11:22 UTC 2009 Marcel Smit <msmit@remedy.nl> + + * DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl: + * DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl: + * tests/Bug_3769_Regression/descriptors/run_test.pl: + Resolved fuzz errors. + Tue Dec 8 15:01:58 UTC 2009 Marcel Smit <msmit@remedy.nl> * examples/BasicSP/descriptors/run_test.pl: diff --git a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl index 0fcb1625f32..cfd47dc7b60 100755 --- a/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl +++ b/CIAO/DAnCE/tests/CIAO/ExecutionManager-Deployments/run_test.pl @@ -42,63 +42,61 @@ sub delete_ior_files { } sub kill_node_daemons { - for ($i = 0; $i < $daemons; ++$i) { - $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); - } + 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); - } + if ($daemons_running == 1) { + kill_node_daemons (); + } - if ($ns_running == 1) { - $NS->Kill (); - $NS->TimedWait (1); - } + if ($em_running == 1) { + $EM->Kill (); + $EM->TimedWait (1); + } + if ($ns_running == 1) { + $NS->Kill (); + $NS->TimedWait (1); + } } sub run_node_daemons { - for ($i = 0; $i < $daemons; ++$i) - { - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; - - $d_cmd = "$DAnCE/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService --instance-nc corbaloc:rir:/NameService"; - - $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); - $result = $Daemons[$i]->Spawn (); - push(@processes, $Daemons[$i]); - - if (PerlACE::waitforfile_timed ($iorfile, - 30) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); - } - return -1; - } - } - return 0; + for ($i = 0; $i < $daemons; ++$i) { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DAnCE/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30 --domain-nc corbaloc:rir:/NameService --instance-nc corbaloc:rir:/NameService"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + 30) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + return 0; } -if ($#ARGV == -1) -{ +if ($#ARGV == -1) { opendir(DIR, "."); @files = grep(/\.cdp$/,readdir(DIR)); closedir(DIR); -} else { +} +else { @files = @ARGV; } @@ -111,19 +109,17 @@ foreach $file (@files) { $NS = new PerlACE::Process ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 0 -ORBEndpoint iiop://localhost:60003 -o ns.ior"); $NS->Spawn (); - if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) - { + if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; $NS->Kill (); exit 1; } $ns_running = 1; -# Set up NamingService environment + # Set up NamingService environment $ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; - -# Invoke node daemons. + # Invoke node daemons. print "Invoking node daemons\n"; $status = run_node_daemons (); @@ -158,8 +154,7 @@ foreach $file (@files) { $status = $E->SpawnWaitKill (60); - if ($status != 0) - { + if ($status != 0) { print "ERROR: simple_em_launcher returned an error code while deploying $file\n"; $retval = -1; } diff --git a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl index 250f021fd8c..17975e31730 100755 --- a/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl +++ b/CIAO/DAnCE/tests/CIAO/NodeManager-Deployments/run_test.pl @@ -31,52 +31,51 @@ sub delete_ior_files { } sub kill_node_daemons { - for ($i = 0; $i < $daemons; ++$i) { - $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); - } + 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 ($daemons_running == 1) { + kill_node_daemons (); + } } sub run_node_daemons { - for ($i = 0; $i < $daemons; ++$i) - { - $iorfile = $iorfiles[$i]; - $port = $ports[$i]; - $nodename = $nodenames[$i]; - $iiop = "iiop://localhost:$port"; - $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; - - $d_cmd = "$DAnCE/bin/dance_node_manager"; - $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30"; - - $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); - $result = $Daemons[$i]->Spawn (); - push(@processes, $Daemons[$i]); - - if (PerlACE::waitforfile_timed ($iorfile, - 30) == -1) { - print STDERR - "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; - for (; $i >= 0; --$i) { - $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); - } - return -1; - } - } - return 0; + for ($i = 0; $i < $daemons; ++$i) { + $iorfile = $iorfiles[$i]; + $port = $ports[$i]; + $nodename = $nodenames[$i]; + $iiop = "iiop://localhost:$port"; + $node_app = "$CIAO_ROOT/bin/ciao_componentserver"; + + $d_cmd = "$DAnCE/bin/dance_node_manager"; + $d_param = "-ORBEndpoint $iiop -s $node_app -n $nodename=$iorfile -t 30"; + + $Daemons[$i] = new PerlACE::Process ($d_cmd, $d_param); + $result = $Daemons[$i]->Spawn (); + push(@processes, $Daemons[$i]); + + if (PerlACE::waitforfile_timed ($iorfile, + 30) == -1) { + print STDERR + "ERROR: The ior $iorfile file of node daemon $i could not be found\n"; + for (; $i >= 0; --$i) { + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + } + return -1; + } + } + return 0; } -if ($#ARGV == -1) -{ +if ($#ARGV == -1) { opendir(DIR, "."); @files = grep(/\.cdp$/,readdir(DIR)); closedir(DIR); -} else { +} +else { @files = @ARGV; } @@ -104,8 +103,7 @@ foreach $file (@files) { $status = $E->SpawnWaitKill (60); - if ($status != 0) - { + if ($status != 0) { print "ERROR: simple_nm_launcher returned error status $status\n"; } diff --git a/CIAO/tests/Bug_3769_Regression/descriptors/run_test.pl b/CIAO/tests/Bug_3769_Regression/descriptors/run_test.pl index fa318011c5e..c1615271b1a 100644 --- a/CIAO/tests/Bug_3769_Regression/descriptors/run_test.pl +++ b/CIAO/tests/Bug_3769_Regression/descriptors/run_test.pl @@ -40,31 +40,29 @@ sub delete_ior_files { } sub kill_node_daemons { - for ($i = 0; $i < $daemons; ++$i) { - $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); - } + 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); - } + if ($daemons_running == 1) { + kill_node_daemons (); + } - if ($ns_running == 1) { - $NS->Kill (); - $NS->TimedWait (1); - } + if ($em_running == 1) { + $EM->Kill (); + $EM->TimedWait (1); + } + if ($ns_running == 1) { + $NS->Kill (); + $NS->TimedWait (1); + } } sub run_node_daemons { - for ($i = 0; $i < $daemons; ++$i) - { + for ($i = 0; $i < $daemons; ++$i) { $iorfile = $iorfiles[$i]; $port = $ports[$i]; $nodename = $nodenames[$i]; @@ -81,9 +79,9 @@ sub run_node_daemons { if (PerlACE::waitforfile_timed ($iorfile, 30) == -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) { - $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); + $Daemons[$i]->Kill (); $Daemons[$i]->TimedWait (1); } return -1; } @@ -91,12 +89,12 @@ sub run_node_daemons { return 0; } -if ($#ARGV == -1) -{ +if ($#ARGV == -1) { opendir(DIR, "."); @files = grep(/\.cdp$/,readdir(DIR)); closedir(DIR); -} else { +} +else { @files = @ARGV; } @@ -109,19 +107,18 @@ foreach $file (@files) { $NS = new PerlACE::Process ("$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service", "-m 0 -ORBEndpoint iiop://localhost:60003 -o ns.ior"); $NS->Spawn (); - if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) - { + if (PerlACE::waitforfile_timed ($nsior, $PerlACE::wait_interval_for_process_creation) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; $NS->Kill (); exit 1; } $ns_running = 1; -# Set up NamingService environment + # Set up NamingService environment $ENV{"NameServiceIOR"} = "corbaloc:iiop:localhost:60003/NameService"; -# Invoke node daemons. + # Invoke node daemons. print "Invoking node daemons\n"; $status = run_node_daemons (); @@ -149,26 +146,23 @@ foreach $file (@files) { $em_running = 1; -# Invoke executor - start the application -. + # Invoke executor - start the application -. print "Invoking executor - start the application -\n"; - $E = - new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", - "-x $file -k file://EM.ior"); + $E = new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-x $file -k file://EM.ior"); - $E->SpawnWaitKill (5000); + $E->SpawnWaitKill (50); - if ($status != 0) - { + if ($status != 0) { print "ERROR: dance_plan_launcher returned an error code while deploying $file\n"; $retval = -1; } # Invoke executor - stop the application -. print "Invoking executor - stop the application -\n"; - $E = - new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", - "-k file://EM.ior -x $file -q"); - $E->SpawnWaitKill (3000); + $E = new PerlACE::Process ("$DAnCE/bin/dance_plan_launcher", + "-k file://EM.ior -x $file -q"); + $E->SpawnWaitKill (30); print "Executor returned.\n"; |