summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-30 12:27:09 +0000
committerdbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2009-11-30 12:27:09 +0000
commita19b1510a2a333f084f242e7233484353ff840c4 (patch)
tree0fba79d7557b34f6b867adce936f24ae08a22875
parent1a279119c6efec26ddf864e27d07c162330b3f85 (diff)
downloadATCD-a19b1510a2a333f084f242e7233484353ff840c4.tar.gz
Mon Nov 30 12:26:32 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/Simple_Naming/run_test.pl: * orbsvcs/tests/AVStreams/Full_Profile/run_test.pl: * tests/Oneway_Timeouts/run_test.pl: * tests/Parallel_Connect_Strategy/run_test.pl: * tests/Muxed_GIOP_Versions/run_test.pl: * tests/InterOp-Naming/run_test.pl: * bin/tao_other_tests.lst: Test are converted to use new test framework and added to fuzz build.
-rw-r--r--TAO/ChangeLog13
-rw-r--r--TAO/bin/tao_other_tests.lst2
-rwxr-xr-xTAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl1
-rwxr-xr-xTAO/orbsvcs/tests/Simple_Naming/run_test.pl87
-rwxr-xr-xTAO/tests/InterOp-Naming/run_test.pl2
-rwxr-xr-xTAO/tests/Muxed_GIOP_Versions/run_test.pl11
-rwxr-xr-xTAO/tests/Oneway_Timeouts/run_test.pl6
-rwxr-xr-xTAO/tests/Parallel_Connect_Strategy/run_test.pl4
8 files changed, 56 insertions, 70 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index b4bf75bd63b..7da6567a22a 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,16 @@
+Mon Nov 30 12:26:32 UTC 2009 Denis Budko <denis.budko@remedy.nl>
+
+ * orbsvcs/tests/Simple_Naming/run_test.pl:
+ * orbsvcs/tests/AVStreams/Full_Profile/run_test.pl:
+ * tests/Oneway_Timeouts/run_test.pl:
+ * tests/Parallel_Connect_Strategy/run_test.pl:
+ * tests/Muxed_GIOP_Versions/run_test.pl:
+ * tests/InterOp-Naming/run_test.pl:
+ * bin/tao_other_tests.lst:
+
+ Test are converted to use new test framework
+ and added to fuzz build.
+
Mon Nov 30 10:01:49 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/default_configuration.pl:
diff --git a/TAO/bin/tao_other_tests.lst b/TAO/bin/tao_other_tests.lst
index 16cfa224ffd..f37d5f56106 100644
--- a/TAO/bin/tao_other_tests.lst
+++ b/TAO/bin/tao_other_tests.lst
@@ -76,7 +76,7 @@ TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl: !ST !MINIMUM !CORBA_E_COMPACT !COR
TAO/orbsvcs/tests/HTIOP/Hello/run_test.pl: !NO_UUID !ST !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ !LynxOS
TAO/orbsvcs/tests/HTIOP/AMI/run_test.pl: !NO_UUID !ST !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ
TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl: !NO_UUID !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !LynxOS
-TAO/orbsvcs/tests/Simple_Naming/run_test.pl: !ST !SUNCC5_1 !NO_MESSAGING !ACE_FOR_TAO !LynxOS !CORBA_E_MICRO
+TAO/orbsvcs/tests/Simple_Naming/run_test.pl: !ST !SUNCC5_1 !NO_MESSAGING !ACE_FOR_TAO !LynxOS !CORBA_E_MICRO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ
TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl: !ST !SUNCC5_1 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_MESSAGING !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ
TAO/orbsvcs/tests/Redundant_Naming/run_test.pl: !ST !SUNCC5_1 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ
TAO/orbsvcs/tests/Trading/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !SUNCC5_1
diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl
index f5681cd96b6..0e635812264 100755
--- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl
+++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl
@@ -32,7 +32,6 @@ my $cl_inputfile = $cl->LocalFile ($inputfile);
my $ns_nsiorfile = $ns->LocalFile ($nsiorfile);
my $sv_nsiorfile = $sv->LocalFile ($nsiorfile);
my $cl_nsiorfile = $cl->LocalFile ($nsiorfile);
-my $cl_inputfile = $cl->LocalFile ($inputfile);
$ns->DeleteFile ($nsiorfile);
$sv->DeleteFile ($nsiorfile);
$cl->DeleteFile ($nsiorfile);
diff --git a/TAO/orbsvcs/tests/Simple_Naming/run_test.pl b/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
index 325c7c708ad..1faec988917 100755
--- a/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
+++ b/TAO/orbsvcs/tests/Simple_Naming/run_test.pl
@@ -10,7 +10,7 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
# It starts all the servers and clients as necessary.
use lib "$ENV{ACE_ROOT}/bin";
-use PerlACE::TestTarget;
+use PerlACE::Run_Test;
use Cwd;
## Save the starting directory
@@ -23,52 +23,30 @@ if ($ARGV[0] eq '-q') {
$quiet = 1;
}
-my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
-my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
-
# Variables for command-line arguments to client and server
# executables.
-$ns_multicast_port = 10001 + $client->RandomPort(); # Can not be 10000 on Chorus 4.0
-$ns_orb_port = 12000 + $server->RandomPort();
-
-$iorfile = "ns.ior";
-$persistent_ior_file = "pns.ior";
-$persistent_log_file = "test_log";
-$data_file = "test_run.data";
-
-my $server_iorfile = $server->LocalFile ($iorfile);
-my $client_iorfile = $client->LocalFile ($iorfile);
-$server->DeleteFile($iorfile);
-$client->DeleteFile($iorfile);
+$ns_multicast_port = 10001 + PerlACE::uniqueid (); # Can not be 10000 on Chorus 4.0
+$ns_orb_port = 12000 + PerlACE::uniqueid ();
+$iorfile = PerlACE::LocalFile ("ns.ior");
+$persistent_ior_file = PerlACE::LocalFile ("pns.ior");
+$persistent_log_file = PerlACE::LocalFile ("test_log");
+$data_file = PerlACE::LocalFile ("test_run.data");
$status = 0;
sub name_server
{
- my $args = "-ORBMulticastDiscoveryEndpoint 224.9.9.2:$server_ns_multicast_port -o $server_iorfile -m 1 @_";
+ my $args = "-ORBMulticastDiscoveryEndpoint 224.9.9.2:$ns_multicast_port -o $iorfile -m 1 @_";
my $prog = "$startdir/../../Naming_Service/Naming_Service";
-
- $SV = $server->CreateProcess ("$prog", "$args");
+ $NS = new PerlACE::Process ($prog, $args);
- $server->DeleteFile($server_iorfile);
+ unlink $iorfile;
- $SV->Spawn ();
+ $NS->Spawn ();
- if ($server->WaitForFileTimed ($iorfile,
- $server->ProcessStartWaitInterval()) == -1) {
- print STDERR "ERROR: cannot find file <$server_iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
-
- if ($server->GetFile ($iorfile) == -1) {
- print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
- exit 1;
- }
- if ($client->PutFile ($iorfile) == -1) {
- print STDERR "ERROR: cannot set file <$client_iorfile>\n";
- $SV->Kill (); $SV->TimedWait (1);
+ if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) {
+ print STDERR "ERROR: cannot find IOR file <$iorfile>\n";
+ $NS->Kill ();
exit 1;
}
}
@@ -78,15 +56,14 @@ sub client
my $args = "@_"." ";
my $prog = "$startdir/client";
- $CL = $client->CreateProcess ("$prog", "$args");
+ $CL = new PerlACE::Process ($prog, $args);
- $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
+ $client = $CL->SpawnWaitKill (60);
- if ($client_status != 0) {
- print STDERR "ERROR: client returned $client_status\n";
+ if ($client != 0) {
+ print STDERR "ERROR: client returned $client\n";
$status = 1;
}
-
}
## The options below have been reordered due to a
@@ -94,22 +71,20 @@ sub client
## that has only been seen on Windows XP.
# Options for all simple tests recognized by the 'client' program.
-@opts = ("-s -ORBInitRef NameService=file://$client_iorfile",
- "-p $persistent_ior_file -ORBInitRef NameService=file://$client_iorfile",
- "-s -ORBInitRef NameService=mcast://224.9.9.2:$client_ns_multicast_port\::/NameService",
- "-t -ORBInitRef NameService=file://$client_iorfile",
- "-i -ORBInitRef NameService=file://$client_iorfile",
- "-e -ORBInitRef NameService=file://$client_iorfile",
- "-y -ORBInitRef NameService=file://$client_iorfile",
- "-c file://$client_persistent_ior_file -ORBInitRef NameService=file://$client_iorfile",
+@opts = ("-s -ORBInitRef NameService=file://$iorfile",
+ "-p $persistent_ior_file -ORBInitRef NameService=file://$iorfile",
+ "-s -ORBInitRef NameService=mcast://224.9.9.2:$ns_multicast_port\::/NameService",
+ "-t -ORBInitRef NameService=file://$iorfile",
+ "-i -ORBInitRef NameService=file://$iorfile",
+ "-e -ORBInitRef NameService=file://$iorfile",
+ "-y -ORBInitRef NameService=file://$iorfile",
+ "-c file://$persistent_ior_file -ORBInitRef NameService=file://$iorfile",
);
-$hostname = $server->HostName ();
-
@server_opts = ("-t 30",
- "-ORBEndpoint iiop://$hostname:$server_ns_orb_port -f $server_persistent_log_file",
+ "-ORBEndpoint iiop://$TARGETHOSTNAME:$ns_orb_port -f $persistent_log_file",
"", "", "", "", "",
- "-ORBEndpoint iiop://$hostname:$server_ns_orb_port -f $server_persistent_log_file",
+ "-ORBEndpoint iiop://$TARGETHOSTNAME:$ns_orb_port -f $persistent_log_file",
);
@comments = ("Simple Test: \n",
@@ -151,7 +126,7 @@ foreach $o (@opts) {
client ($o);
- $SV->Kill ();
+ $NS->Kill ();
## For some reason, only on Windows XP, we need to
## wait before starting another Naming_Service when
@@ -180,14 +155,14 @@ $fh = \*OLDERR;
name_server ();
-client ("-ORBInitRef NameService=file://$client_iorfile", "-m15");
+client ("-ORBInitRef NameService=file://$iorfile", "-m15");
close (STDERR);
close (STDOUT);
open (STDOUT, ">&OLDOUT");
open (STDERR, ">&OLDERR");
-$SV->Kill ();
+$NS->Kill ();
unlink $iorfile;
diff --git a/TAO/tests/InterOp-Naming/run_test.pl b/TAO/tests/InterOp-Naming/run_test.pl
index c0642b0cec5..d8f2dfc0ed9 100755
--- a/TAO/tests/InterOp-Naming/run_test.pl
+++ b/TAO/tests/InterOp-Naming/run_test.pl
@@ -21,7 +21,7 @@ my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 fail
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
my $TARGETHOSTNAME = $server->HostName ();
-my $port = PerlACE::random_port ();
+my $port = $server->RandomPort ();
my $iorbase = "server.ior";
my $server_iorfile = $server->LocalFile ($iorbase);
diff --git a/TAO/tests/Muxed_GIOP_Versions/run_test.pl b/TAO/tests/Muxed_GIOP_Versions/run_test.pl
index 6130ef2b8ce..a2bc908039f 100755
--- a/TAO/tests/Muxed_GIOP_Versions/run_test.pl
+++ b/TAO/tests/Muxed_GIOP_Versions/run_test.pl
@@ -16,7 +16,7 @@ my $client2 = PerlACE::TestTarget::create_target (3) || die "Create target 3 fai
my $client3 = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n";
my $TARGETHOSTNAME = $server->HostName ();
-my $port = PerlACE::random_port ();
+my $port = $server->RandomPort ();
my $iorbase = "server.ior";
my $logbase = "orb.$port.log";
@@ -92,7 +92,7 @@ if ($server->WaitForFileTimed ($iorbase,
# leave server reap some self abuse before clients start abusing it
if ($serveriterations > 20) {
- $SV->TimedWait(10);
+ $SV->TimedWait(10);
}
if ($server->GetFile ($iorbase) == -1) {
@@ -179,11 +179,10 @@ if ($clients > 2) {
}
}
-$CLS = $client1->CreateProcess ("client",
- "-l $corbaloc_str -i 1 -x ".
- "-k file://$client1_iorfile");
+$CL1->Arguments ("-l $corbaloc_str -i 1 -x ".
+ "-k file://$client1_iorfile");
-$client_status = $CLS->SpawnWaitKill ($client1->ProcessStopWaitInterval());
+$client_status = $CL1->SpawnWaitKill ($client1->ProcessStopWaitInterval());
if ($client_status != 0) {
print STDERR "ERROR: client returned $client_status\n";
diff --git a/TAO/tests/Oneway_Timeouts/run_test.pl b/TAO/tests/Oneway_Timeouts/run_test.pl
index 86ac3ba1bd7..050a2496fac 100755
--- a/TAO/tests/Oneway_Timeouts/run_test.pl
+++ b/TAO/tests/Oneway_Timeouts/run_test.pl
@@ -26,8 +26,8 @@ my $client_iorfile = $client->LocalFile ($iorbase);
$server->DeleteFile($iorbase);
$client->DeleteFile($iorbase);
-$SV_PORT = PerlACE::random_port();
-$SV_ARGS = "-ORBListenEndpoints iiop://:$SRV_PORT -server_ior $server_iorfile";
+$SV_PORT = $server->RandomPort();
+$SV_ARGS = "-ORBListenEndpoints iiop://:$SV_PORT -server_ior $server_iorfile";
$CL_ARGS = "-server_ior file://$client_iorfile";
$SV = $server->CreateProcess ("server");
@@ -111,7 +111,7 @@ sub test_timeouts
$CL->Arguments("-sync delayed -force_timeout -request_timeout 100 -connect_timeout 200 -max_request_time 30");
run_only_client;
print "test_timeouts 6 passed...\n";
- return $ret;
+ return 0;
}
sub test_buffering
diff --git a/TAO/tests/Parallel_Connect_Strategy/run_test.pl b/TAO/tests/Parallel_Connect_Strategy/run_test.pl
index caf28c1a7bc..33f491bb35f 100755
--- a/TAO/tests/Parallel_Connect_Strategy/run_test.pl
+++ b/TAO/tests/Parallel_Connect_Strategy/run_test.pl
@@ -24,9 +24,9 @@ my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 fail
my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
my $TARGETHOSTNAME = $server->HostName ();
-my $port = PerlACE::random_port ();
+my $port = $server->RandomPort ();
my $port1 = $port + 1;
-my $port1 = $port + 2;
+my $port2 = $port + 2;
my @bogus_eps = (
"-ORBListenEndpoints iiop://$TARGETHOSTNAME:$port1/hostname_in_ior=126.0.0.123",