diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-18 13:00:45 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-18 13:00:45 +0000 |
commit | eb7fca8b20d0b1fbd1096788568cfb858630f65d (patch) | |
tree | afaf955e01118cd59e07cc10479ed80b8e09d084 | |
parent | 7f064ce91e9c759204b504b923d021c81f3dc9c7 (diff) | |
download | ATCD-eb7fca8b20d0b1fbd1096788568cfb858630f65d.tar.gz |
Wed Nov 18 12:58:16 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl:
* orbsvcs/tests/Bug_2925_Regression/run_test.pl:
* orbsvcs/tests/Security/Secure_Invocation/run_test.pl:
* orbsvcs/tests/Security/Bug_2908_Regression/MessengerServer.cpp:
* orbsvcs/tests/Security/Bug_2908_Regression/MessengerClient.cpp:
* orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl:
* orbsvcs/tests/Security/BiDirectional/run_test.pl:
* orbsvcs/tests/Security/Big_Request/run_test.pl:
* orbsvcs/tests/HTIOP/BiDirectional/run_test.pl:
* orbsvcs/tests/Property/run_test.pl:
* orbsvcs/tests/Bug_2316_Regression/client.cpp:
* orbsvcs/tests/Bug_2316_Regression/server.cpp:
* orbsvcs/tests/Bug_2316_Regression/run_test.pl:
* orbsvcs/tests/Bug_2615_Regression/client.cpp:
* orbsvcs/tests/Bug_2615_Regression/server.cpp:
* orbsvcs/tests/Bug_2615_Regression/run_test.pl:
* orbsvcs/tests/Bug_3216_Regression/run_test.pl:
* orbsvcs/tests/Bug_2709_Regression/client.cpp:
* orbsvcs/tests/Bug_2709_Regression/server.cpp:
* orbsvcs/tests/Bug_2709_Regression/run_test.pl:
* orbsvcs/tests/IOR_MCast/run_test_ipv6.pl:
* orbsvcs/tests/Bug_3215_Regression/run_test.pl:
* orbsvcs/tests/Bug_2287_Regression/run_test.pl:
* DevGuideExamples/SmartProxies/MessengerServer.cpp:
* DevGuideExamples/SmartProxies/LoggerServer.cpp:
* DevGuideExamples/SmartProxies/MessengerClient.cpp:
* DevGuideExamples/SmartProxies/run_test.pl:
* performance-tests/Latency/DSI/run_test.pl:
* performance-tests/Latency/Deferred/run_test.pl:
* performance-tests/Latency/DII/run_test.pl:
* performance-tests/Latency/AMI/run_test.pl:
* performance-tests/Throughput/run_test.pl:
* tests/AMI_Buffering/run_message_count.pl:
* tests/Bug_1495_Regression/run_test_complex.pl:
* tests/Bug_1495_Regression/run_test.pl:
* tests/Crashed_Callback/run_test.pl:
* tests/BiDirectional/run_test_bug3282.pl:
* tests/Bug_1020_Basic_Regression/run_test.pl:
* tests/CallbackTest/run_test_ipv6.pl:
* tests/CallbackTest/run_test_mixed_ip.pl:
* tests/Bug_2289_Regression/run_test.pl:
* tests/DIOP/run_test_ipv6.pl:
* tests/DIOP/run_test.pl:
* tests/NestedUpcall/Triangle_Test/run_test.pl:
* tests/MT_Timeout/run_test.pl:
* tests/Single_Read/server.cpp:
* tests/Single_Read/test_i.cpp:
* tests/Single_Read/run_test.pl:
* tests/Single_Read/test_i.h:
* examples/Logging/run_test.pl:
* examples/Simple/time-date/run_test.pl:
* examples/PluggableUDP/tests/Performance/run_test_ipv6.pl:
* examples/PluggableUDP/tests/Performance/run_test.pl:
Tests are converted to use new test framework and added to fuzz build.
56 files changed, 2695 insertions, 1111 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 6b5e853d0fd..e71ead948c5 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,61 @@ +Wed Nov 18 12:58:16 UTC 2009 Denis Budko <denis.budko@remedy.nl> + + * orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl: + * orbsvcs/tests/Bug_2925_Regression/run_test.pl: + * orbsvcs/tests/Security/Secure_Invocation/run_test.pl: + * orbsvcs/tests/Security/Bug_2908_Regression/MessengerServer.cpp: + * orbsvcs/tests/Security/Bug_2908_Regression/MessengerClient.cpp: + * orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl: + * orbsvcs/tests/Security/BiDirectional/run_test.pl: + * orbsvcs/tests/Security/Big_Request/run_test.pl: + * orbsvcs/tests/HTIOP/BiDirectional/run_test.pl: + * orbsvcs/tests/Property/run_test.pl: + * orbsvcs/tests/Bug_2316_Regression/client.cpp: + * orbsvcs/tests/Bug_2316_Regression/server.cpp: + * orbsvcs/tests/Bug_2316_Regression/run_test.pl: + * orbsvcs/tests/Bug_2615_Regression/client.cpp: + * orbsvcs/tests/Bug_2615_Regression/server.cpp: + * orbsvcs/tests/Bug_2615_Regression/run_test.pl: + * orbsvcs/tests/Bug_3216_Regression/run_test.pl: + * orbsvcs/tests/Bug_2709_Regression/client.cpp: + * orbsvcs/tests/Bug_2709_Regression/server.cpp: + * orbsvcs/tests/Bug_2709_Regression/run_test.pl: + * orbsvcs/tests/IOR_MCast/run_test_ipv6.pl: + * orbsvcs/tests/Bug_3215_Regression/run_test.pl: + * orbsvcs/tests/Bug_2287_Regression/run_test.pl: + * DevGuideExamples/SmartProxies/MessengerServer.cpp: + * DevGuideExamples/SmartProxies/LoggerServer.cpp: + * DevGuideExamples/SmartProxies/MessengerClient.cpp: + * DevGuideExamples/SmartProxies/run_test.pl: + * performance-tests/Latency/DSI/run_test.pl: + * performance-tests/Latency/Deferred/run_test.pl: + * performance-tests/Latency/DII/run_test.pl: + * performance-tests/Latency/AMI/run_test.pl: + * performance-tests/Throughput/run_test.pl: + * tests/AMI_Buffering/run_message_count.pl: + * tests/Bug_1495_Regression/run_test_complex.pl: + * tests/Bug_1495_Regression/run_test.pl: + * tests/Crashed_Callback/run_test.pl: + * tests/BiDirectional/run_test_bug3282.pl: + * tests/Bug_1020_Basic_Regression/run_test.pl: + * tests/CallbackTest/run_test_ipv6.pl: + * tests/CallbackTest/run_test_mixed_ip.pl: + * tests/Bug_2289_Regression/run_test.pl: + * tests/DIOP/run_test_ipv6.pl: + * tests/DIOP/run_test.pl: + * tests/NestedUpcall/Triangle_Test/run_test.pl: + * tests/MT_Timeout/run_test.pl: + * tests/Single_Read/server.cpp: + * tests/Single_Read/test_i.cpp: + * tests/Single_Read/run_test.pl: + * tests/Single_Read/test_i.h: + * examples/Logging/run_test.pl: + * examples/Simple/time-date/run_test.pl: + * examples/PluggableUDP/tests/Performance/run_test_ipv6.pl: + * examples/PluggableUDP/tests/Performance/run_test.pl: + + Tests are converted to use new test framework and added to fuzz build. + Wed Nov 18 11:09:55 UTC 2009 Marcel Smit <msmit@remedy.nl> * examples/Kokyu_dsrt_schedulers/FP_Scheduler.h: diff --git a/TAO/DevGuideExamples/SmartProxies/LoggerServer.cpp b/TAO/DevGuideExamples/SmartProxies/LoggerServer.cpp index f3f818cc430..d29453ef576 100644 --- a/TAO/DevGuideExamples/SmartProxies/LoggerServer.cpp +++ b/TAO/DevGuideExamples/SmartProxies/LoggerServer.cpp @@ -5,6 +5,36 @@ #include "Logger_i.h" #include <iostream> #include <fstream> +#include "ace/Get_Opt.h" + +const ACE_TCHAR *ior_output_file = ACE_TEXT ("Logger.ior"); + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("o:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'o': + ior_output_file = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-o <iorfile>" + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} + int ACE_TMAIN (int argc, ACE_TCHAR *argv []) { @@ -12,6 +42,9 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv []) // Initialize the ORB. CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + if (parse_args (argc, argv) != 0) + return 1; + // Get a reference to Root POA. CORBA::Object_var obj = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var poa = PortableServer::POA::_narrow(obj.in()); @@ -28,10 +61,10 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv []) PortableServer::ObjectId_var oid = poa->activate_object(logger_servant.in()); CORBA::Object_var logger_obj = poa->id_to_reference(oid.in()); CORBA::String_var str = orb->object_to_string(logger_obj.in()); - std::ofstream iorFile("Logger.ior"); + std::ofstream iorFile(ACE_TEXT_ALWAYS_CHAR(ior_output_file)); iorFile << str.in() << std::endl; iorFile.close(); - std::cout << "IOR written to file Logger.ior" << std::endl; + std::cout << "IOR written to file " << ACE_TEXT_ALWAYS_CHAR(ior_output_file) << std::endl; // Accept requests from clients. orb->run(); diff --git a/TAO/DevGuideExamples/SmartProxies/MessengerClient.cpp b/TAO/DevGuideExamples/SmartProxies/MessengerClient.cpp index d45f36fc96b..add68848b60 100644 --- a/TAO/DevGuideExamples/SmartProxies/MessengerClient.cpp +++ b/TAO/DevGuideExamples/SmartProxies/MessengerClient.cpp @@ -2,14 +2,46 @@ #include "MessengerC.h" #include "Smart_Messenger_Proxy.h" - #include <iostream> +#include "ace/Get_Opt.h" + +const ACE_TCHAR *ior = ACE_TEXT ("file://Messenger.ior"); + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-k <ior> " + "\n", + argv [0]), + -1); + } + // Indicates successful parsing of the command line + return 0; +} + int ACE_TMAIN(int argc, ACE_TCHAR * argv[]) { try { // Initialize the ORB CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + if (parse_args (argc, argv) != 0) + return 1; + // Create a smart proxy factory. It will register itself with the // smart proxy factory adapter so it can be used to create // Messenger proxies. It must be created on the heap, but is @@ -17,7 +49,7 @@ int ACE_TMAIN(int argc, ACE_TCHAR * argv[]) new Smart_Messenger_Proxy_Factory(orb.in()); // Convert the contents of the Messenger.ior file to an object reference. - CORBA::Object_var obj = orb->string_to_object("file://Messenger.ior"); + CORBA::Object_var obj = orb->string_to_object(ior); if (CORBA::is_nil(obj.in())) { std::cerr << "Nil Messenger reference" << std::endl; return 1; diff --git a/TAO/DevGuideExamples/SmartProxies/MessengerServer.cpp b/TAO/DevGuideExamples/SmartProxies/MessengerServer.cpp index b332e2ca65a..5e0fc0b2cbb 100644 --- a/TAO/DevGuideExamples/SmartProxies/MessengerServer.cpp +++ b/TAO/DevGuideExamples/SmartProxies/MessengerServer.cpp @@ -3,6 +3,36 @@ #include "Messenger_i.h" #include <iostream> #include <fstream> +#include "ace/Get_Opt.h" + +const ACE_TCHAR *ior_output_file = ACE_TEXT ("Messenger.ior"); + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("o:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'o': + ior_output_file = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-o <iorfile>" + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} + int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { @@ -10,6 +40,9 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) // Initialize orb CORBA::ORB_var orb = CORBA::ORB_init( argc, argv ); + if (parse_args (argc, argv) != 0) + return 1; + //Get reference to Root POA CORBA::Object_var obj = orb->resolve_initial_references( "RootPOA" ); PortableServer::POA_var poa = PortableServer::POA::_narrow( obj.in() ); @@ -26,10 +59,10 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) poa->activate_object( messenger_servant.in() ); CORBA::Object_var messenger_obj = poa->id_to_reference( oid.in() ); CORBA::String_var str = orb->object_to_string( messenger_obj.in() ); - std::ofstream iorFile( "Messenger.ior" ); + std::ofstream iorFile(ACE_TEXT_ALWAYS_CHAR(ior_output_file)); iorFile << str.in() << std::endl; iorFile.close(); - std::cout << "IOR written to file Messenger.ior" << std::endl; + std::cout << "IOR written to file " << ACE_TEXT_ALWAYS_CHAR(ior_output_file) << std::endl; // Accept requests orb->run(); diff --git a/TAO/DevGuideExamples/SmartProxies/run_test.pl b/TAO/DevGuideExamples/SmartProxies/run_test.pl index 43f207bf703..e83e2e21d0d 100755 --- a/TAO/DevGuideExamples/SmartProxies/run_test.pl +++ b/TAO/DevGuideExamples/SmartProxies/run_test.pl @@ -1,54 +1,105 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + # $Id$ +# -*- perl -*- -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +$status = 0; +$debug_level = '0'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; +my $logger = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n"; + +my $iorbase = "Messenger.ior"; +my $iorlogger = "Logger.ior"; + +my $server_iorfile_base = $server->LocalFile ($iorbase); +my $client_iorfile_base = $client->LocalFile ($iorbase); +my $logger_iorfile_logger = $logger->LocalFile ($iorlogger); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); +$logger->DeleteFile($iorlogger); + +$SV = $server->CreateProcess ("MessengerServer", "-ORBdebuglevel $debug_level ". + "-o $server_iorfile_base"); +$CL = $client->CreateProcess ("MessengerClient", "-k file://$client_iorfile_base"); +$LR = $logger->CreateProcess ("LoggerServer", "-ORBdebuglevel $debug_level ". + "-o $logger_iorfile_logger"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} -use Env (ACE_ROOT); -use lib "$ACE_ROOT/bin"; -use PerlACE::Run_Test; +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile_base>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile_base>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -$M_ior = "Messenger.ior"; -$L_ior = "Logger.ior"; +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile_base>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -unlink $M_ior; -unlink $L_ior; +$logger_status = $LR->Spawn (); -# start MessengerServer -$S = new PerlACE::Process("MessengerServer"); -$S->Spawn(); -if (PerlACE::waitforfile_timed ($M_ior, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file $M_ior\n"; - $S->Kill(); +if ($logger_status != 0) { + print STDERR "ERROR: logger returned $logger_status\n"; exit 1; } -# start LoggerServer -$L = new PerlACE::Process("LoggerServer"); -$L->Spawn(); -if (PerlACE::waitforfile_timed ($L_ior, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file $L_ior\n"; - $L->Kill(); - $S->Kill(); +if ($logger->WaitForFileTimed ($iorlogger, + $logger->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$logger_iorfile_logger>\n"; + $LR->Kill (); $LR->TimedWait (1); + $SV->Kill (); $SV->TimedWait (1); exit 1; } - -# start MessengerClient -$C = new PerlACE::Process("MessengerClient"); -if ($C->SpawnWaitKill(20) != 0) { - $S->Kill(); - $L->Kill(); - exit (1); + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval()); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $status = 1; } -# clean-up -$S->Kill(); -$L->Kill(); -unlink $M_ior; -unlink $L_ior; +$server_status = $SV->Kill (); -exit 0; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $status = 1; +} + +$logger_status = $LR->Kill (); +if ($logger_status != 0) { + print STDERR "ERROR: logger returned $logger_status\n"; + $status = 1; +} +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); +$logger->DeleteFile($iorlogger); +exit $status; diff --git a/TAO/bin/tao_orb_tests.lst b/TAO/bin/tao_orb_tests.lst index 72f998563ed..5fd233b3c4b 100644 --- a/TAO/bin/tao_orb_tests.lst +++ b/TAO/bin/tao_orb_tests.lst @@ -51,14 +51,14 @@ TAO/tests/Multiple_Inheritance/run_test.pl: !CORBA_E_MICRO TAO/tests/Bug_933_Regression/run_test.pl: TAO/tests/Bug_1269_Regression/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !QUICK !LabVIEW_RT !WinCE !FUZZ TAO/tests/Bug_1269_Regression/run_test.pl -quick : !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO QUICK !LabVIEW_RT !WinCE !FUZZ -TAO/tests/Bug_1495_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !DISABLE_INTERCEPTORS !LabVIEW_RT !WinCE !FUZZ +TAO/tests/Bug_1495_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !DISABLE_INTERCEPTORS TAO/tests/Bug_1535_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ TAO/tests/Bug_1568_Regression/run_test.pl: !NO_MESSAGING !CORBA_E_MICRO TAO/tests/Bug_1670_Regression/run_test.pl: !NO_MESSAGING !CORBA_E_MICRO TAO/tests/Bug_1270_Regression/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !QUICK !LabVIEW_RT !WinCE !FUZZ TAO/tests/Bug_1270_Regression/run_test.pl -quick : !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO QUICK !LabVIEW_RT !WinCE !FUZZ -TAO/tests/Bug_1020_Basic_Regression/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !VxWorks !QUICK !LabVIEW_RT !WinCE !FUZZ -TAO/tests/Bug_1020_Basic_Regression/run_test.pl -quick : !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !VxWorks QUICK !LabVIEW_RT !WinCE !FUZZ +TAO/tests/Bug_1020_Basic_Regression/run_test.pl: !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !QUICK +TAO/tests/Bug_1020_Basic_Regression/run_test.pl -quick : !Win32 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST QUICK TAO/tests/Bug_1020_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !Win32 !QUICK !LabVIEW_RT !WinCE !FUZZ TAO/tests/Bug_1020_Regression/run_test.pl -quick : !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !Win32 QUICK !LabVIEW_RT !WinCE !FUZZ TAO/tests/Bug_1254_Regression/run_test.pl: @@ -83,7 +83,7 @@ TAO/tests/Bug_2188_Regression/run_test.pl: TAO/tests/Bug_2201_Regression/run_test.pl: TAO/tests/Bug_2234_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS TAO/tests/Bug_2243_Regression/run_test.pl: -TAO/tests/Bug_2289_Regression/run_test.pl: !LabVIEW_RT !WinCE !FUZZ +TAO/tests/Bug_2289_Regression/run_test.pl: TAO/tests/Bug_2319_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !FIXED_BUGS_ONLY TAO/tests/Bug_2328_Regression/run_test.pl: TAO/tests/Bug_2345_Regression/run_test.pl: !CORBA_E_MICRO @@ -169,7 +169,7 @@ TAO/tests/Bug_3743_Regression/run_test.pl: !NO_IFR !LabVIEW_RT !WinCE !FUZZ TAO/tests/Bug_3746_Regression/run_test.pl: TAO/tests/Bug_3748_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS TAO/tests/Bug_3755_Regression/run_test.pl: !STATIC -TAO/tests/DIOP/run_test.pl: !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ +TAO/tests/DIOP/run_test.pl: !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_MICRO TAO/tests/DIOP/run_test_ipv6.pl: IPV6 !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_MICRO TAO/tests/RTCORBA/Activate_Object_Multiple_ORBs/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST TAO/tests/RTCORBA/Banded_Connections/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST @@ -234,14 +234,14 @@ TAO/tests/Faults/run_test.pl: !VxWorks !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO TAO/tests/CallbackTest/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO TAO/tests/CallbackTest/run_test_ipv6.pl: IPV6 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO TAO/tests/CallbackTest/run_test_mixed_ip.pl: IPV6 !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO -TAO/tests/Crashed_Callback/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !OpenVMS_IA64Crash !LabVIEW_RT !WinCE !FUZZ +TAO/tests/Crashed_Callback/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !OpenVMS_IA64Crash # Disabled Crash On Write on Win32, see bugzilla 959 why !LabVIEW_RT !WinCE !FUZZ TAO/tests/Crash_On_Write/run_test.pl: !ST !Win32 TAO/tests/Nested_Upcall_Crash/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !OpenVMS_IA64Crash !QUICK !LabVIEW_RT !WinCE !FUZZ TAO/tests/Nested_Upcall_Crash/run_test.pl -quick: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !OpenVMS_IA64Crash QUICK !LabVIEW_RT !WinCE !FUZZ TAO/tests/NestedUpcall/Simple/run_test.pl: !ST !LabVIEW_RT !WinCE !FUZZ TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl: !ST !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ -TAO/tests/NestedUpcall/Triangle_Test/run_test.pl: !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ +TAO/tests/NestedUpcall/Triangle_Test/run_test.pl: !CORBA_E_MICRO TAO/tests/Nested_Event_Loop/run_test.pl: !ACE_FOR_TAO TAO/tests/POA/Identity/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO TAO/tests/POA/Forwarding/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO @@ -283,9 +283,9 @@ TAO/tests/IORManipulation/run_test.pl: TAO/tests/IORManipulation/filter/run_test.pl: TAO/tests/Policies/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT !WinCE !FUZZ TAO/tests/Timeout/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO -TAO/tests/MT_Timeout/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !OpenVMS_IA64Crash !LabVIEW_RT !WinCE !FUZZ +TAO/tests/MT_Timeout/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !OpenVMS_IA64Crash TAO/tests/Timed_Buffered_Oneways/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO -TAO/tests/Single_Read/run_test.pl: !LabVIEW_RT !WinCE !FUZZ +TAO/tests/Single_Read/run_test.pl: TAO/tests/Connection_Timeout/run_test.pl: !VxWorks !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO #TAO/tests/Connection_Failure/run_test.pl ! Timesout for good reasons TAO/tests/MProfile_Connection_Timeout/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !LabVIEW_RT !WinCE !FUZZ @@ -314,7 +314,7 @@ TAO/tests/Oneway_Buffering/run_buffer_size.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_ TAO/tests/Oneway_Buffering/run_timeout.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ TAO/tests/Oneway_Buffering/run_timeout_reactive.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ TAO/tests/Oneway_Timeouts/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !NO_MESSAGING !ACE_FOR_TAO !LabVIEW_RT !WinCE !FUZZ -TAO/tests/AMI_Buffering/run_message_count.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT !WinCE !FUZZ +TAO/tests/AMI_Buffering/run_message_count.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST TAO/tests/AMI_Buffering/run_buffer_size.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT !WinCE !FUZZ TAO/tests/AMI_Buffering/run_timeout.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT !WinCE !FUZZ TAO/tests/AMI_Buffering/run_timeout_reactive.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !LabVIEW_RT !WinCE !FUZZ @@ -424,7 +424,7 @@ TAO/DevGuideExamples/PortableInterceptors/IOR/run_test.pl: !MINIMUM !DISABLE_INT TAO/DevGuideExamples/PortableInterceptors/PICurrent/run_test.pl: !MINIMUM !DISABLE_INTERCEPTORS TAO/DevGuideExamples/PortableInterceptors/SimpleCodec/run_test.pl: !MINIMUM !DISABLE_INTERCEPTORS TAO/DevGuideExamples/RTCORBA/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !STATIC -TAO/DevGuideExamples/SmartProxies/run_test.pl: !NO_SMARTPROXIES !NO_MESSAGING !LabVIEW_RT !WinCE !FUZZ !CORBA_E_MICRO !VxWorks !VxWorks_RTP +TAO/DevGuideExamples/SmartProxies/run_test.pl: !NO_SMARTPROXIES !NO_MESSAGING !CORBA_E_MICRO TAO/DevGuideExamples/Multithreading/Reactive/run_test.pl: !STATIC !MINIMUM !LynxOS TAO/DevGuideExamples/Multithreading/ThreadPerConnection/run_test.pl: !ST !LabVIEW_RT !WinCE !FUZZ !VxWorks !VxWorks_RTP TAO/DevGuideExamples/Multithreading/ThreadPool/run_test.pl: !ST !MINIMUM !LabVIEW_RT !WinCE !FUZZ !VxWorks !VxWorks_RTP diff --git a/TAO/bin/tao_other_tests.lst b/TAO/bin/tao_other_tests.lst index e7fc1ec31d4..4a08c5a5c26 100644 --- a/TAO/bin/tao_other_tests.lst +++ b/TAO/bin/tao_other_tests.lst @@ -14,10 +14,10 @@ TAO/performance-tests/Cubit/TAO/MT_Cubit/run_test.pl: !ST !OpenBSD !Win32 !ACE_F TAO/performance-tests/Latency/Single_Threaded/run_test.pl -n 1000: !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/performance-tests/Latency/Thread_Pool/run_test.pl -n 1000: !ST !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/performance-tests/Latency/Thread_Per_Connection/run_test.pl -n 1000: !ST !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/performance-tests/Latency/AMI/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/performance-tests/Latency/DSI/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/performance-tests/Latency/DII/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/performance-tests/Latency/Deferred/run_test.pl: !QNX !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/performance-tests/Latency/AMI/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ST !Win32 !ACE_FOR_TAO !OpenVMS +TAO/performance-tests/Latency/DSI/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS +TAO/performance-tests/Latency/DII/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS +TAO/performance-tests/Latency/Deferred/run_test.pl: !QNX !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS TAO/performance-tests/Sequence_Latency/Single_Threaded/run_test.pl: !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/performance-tests/Sequence_Latency/Thread_Pool/run_test.pl: !ST !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/performance-tests/Sequence_Latency/Thread_Per_Connection/run_test.pl: !ST !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ @@ -25,14 +25,14 @@ TAO/performance-tests/Sequence_Latency/AMI/run_test.pl: !MINIMUM !CORBA_E_COMPAC TAO/performance-tests/Sequence_Latency/DSI/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/performance-tests/Sequence_Latency/DII/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/performance-tests/Sequence_Latency/Deferred/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/performance-tests/Throughput/run_test.pl: !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/performance-tests/Throughput/run_test.pl: !Win32 !ACE_FOR_TAO !OpenVMS TAO/performance-tests/POA/Object_Creation_And_Registration/run_test.pl: !Win32 !ACE_FOR_TAO !OpenVMS !CORBA_E_MICRO TAO/performance-tests/RTCorba/Oneways/Reliable/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ !LynxOS TAO/performance-tests/Protocols/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC !Win32 !ACE_FOR_TAO !OpenVMS !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ !LynxOS TAO/examples/Simple/bank/run_test.pl: !NO_MESSAGING !CORBA_E_MICRO TAO/examples/Simple/grid/run_test.pl: !NO_MESSAGING !CORBA_E_MICRO TAO/examples/Simple/time/run_test.pl: !NO_MESSAGING !Win32 !CORBA_E_MICRO -TAO/examples/Simple/time-date/run_test.pl: !ST !STATIC !NO_MESSAGING !Win32 !LabVIEW_RT !WinCE !FUZZ +TAO/examples/Simple/time-date/run_test.pl: !ST !STATIC !NO_MESSAGING !Win32 TAO/examples/Quoter/run_test.pl: !DISABLE_ToFix_LynxOS_PPC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/examples/Load_Balancing/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !SUNCC5_1 !ACE_FOR_TAO !LabVIEW_RT !WinCE !FUZZ TAO/examples/AMH/Sink_Server/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !Win32 !LynxOS !ACE_FOR_TAO !LabVIEW_RT !WinCE !FUZZ @@ -62,20 +62,20 @@ TAO/orbsvcs/tests/Bug_2247_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CO TAO/orbsvcs/tests/Bug_2248_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/Bug_2285_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/Bug_2285_Regression/run_test2.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Bug_2287_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Bug_2316_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC !SUNCC5_1 !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/orbsvcs/tests/Bug_2287_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO +TAO/orbsvcs/tests/Bug_2316_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC !SUNCC5_1 TAO/orbsvcs/tests/Bug_2377_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC -TAO/orbsvcs/tests/Bug_2615_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/orbsvcs/tests/Bug_2615_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO TAO/orbsvcs/tests/Bug_2777_Regression/run_test.pl: !MINIMUM !CORBA_E_MICRO !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Bug_3215_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Bug_3216_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/orbsvcs/tests/Bug_3215_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO +TAO/orbsvcs/tests/Bug_3216_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO TAO/orbsvcs/tests/Bug_3418_Regression/run_test.pl: !ST SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/Bug_3486_Regression/run_test.pl: !NO_MESSAGING !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !LynxOS TAO/orbsvcs/tests/Bug_3598b_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl: !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ 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 !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ !LynxOS +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 !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 @@ -163,15 +163,15 @@ TAO/orbsvcs/tests/Notify/Bug_3688b_Regression/run_test.pl: !ST !NO_MESSAGING !MI TAO/orbsvcs/tests/EC_Mcast/run_test.pl: !NO_MCAST !NO_MESSAGING !DISABLE_ToFix_LynxOS_PPC !ACE_FOR_TAO !CORBA_E_MICRO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ # FAILS 'TAO/orbsvcs/tests/EC_Multiple/run_test.pl !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ # NO REDIRECTION TAO/examples/Simple/echo/run_test.pl < Echo.idl !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Property/run_test.pl: !NO_MESSAGING !ACE_FOR_TAO !CORBA_E_MICRO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/orbsvcs/tests/Property/run_test.pl: !NO_MESSAGING !ACE_FOR_TAO !CORBA_E_MICRO TAO/orbsvcs/tests/Bug_3387_Regression/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !LabVIEW_RT !WinCE !FUZZ !LynxOS #HANGS TAO/orbsvcs/tests/ImplRepo/run_test.pl airplane !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ #HANGS'TAO/orbsvcs/tests/ImplRepo/run_test.pl airplane_ir !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Security/Secure_Invocation/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/orbsvcs/tests/Security/Secure_Invocation/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO TAO/orbsvcs/tests/Security/Bug_1107_Regression/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO !FIXED_BUGS_ONLY -TAO/orbsvcs/tests/Security/Big_Request/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Security/BiDirectional/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/orbsvcs/tests/Security/Big_Request/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO +TAO/orbsvcs/tests/Security/BiDirectional/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO TAO/orbsvcs/tests/Security/Callback/run_test.pl: SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO TAO/orbsvcs/tests/Security/MT_SSLIOP/run_test.pl: !ST SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/Security/MT_IIOP_SSL/run_test.pl: !ST SSL !STATIC !DISABLE_INTERCEPTORS !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ @@ -192,14 +192,14 @@ TAO/examples/ior_corbaloc/run_test.pl: !NO_MESSAGING !ACE_FOR_TAO !CORBA_E_MICRO TAO/utils/nslist/run_test.pl: !ST !SUNCC5_1 !NO_MESSAGING !ACE_FOR_TAO !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/BiDir_CORBALOC/run_test.pl: !NO_MESSAGING !ACE_FOR_TAO !CORBA_E_MICRO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/IOR_MCast/run_test_ipv6.pl: IPV6 !NO_MCAST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO -TAO/orbsvcs/tests/Bug_2709_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !ST !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/orbsvcs/tests/Bug_2709_Regression/run_test.pl: !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !ST TAO/orbsvcs/tests/Bug_2800_Regression/run_test.pl: !ST !CORBA_E_MICRO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/Bug_2800_Regression/run_test_federated.pl: !ST !CORBA_E_MICRO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/Bug_3673_Regression/run_test.pl: !ST !CORBA_E_MICRO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/examples/Notify/Filter/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/examples/Notify/Subscribe/run_test.pl: !ST !NO_MESSAGING !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !ACE_FOR_TAO !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Bug_2925_Regression/run_test.pl: !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ -TAO/orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl: IPV6 !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC !VxWorks !VxWorks_RTP !LabVIEW_RT !WinCE !FUZZ +TAO/orbsvcs/tests/Bug_2925_Regression/run_test.pl: !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC +TAO/orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl: IPV6 !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC TAO/orbsvcs/tests/Bug_2377_Regression/run_test_ipv6.pl: IPV6 !ST !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC TAO/orbsvcs/tests/Bug_3444_Regression/run_test.pl: !NO_DIOP !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC !VxWorks !VxWorks_RTP !LynxOS !LabVIEW_RT !WinCE !FUZZ TAO/orbsvcs/tests/Bug_3444_Regression/run_test.pl --sciop: SCTP !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC !VxWorks !VxWorks_RTP !LynxOS !LabVIEW_RT !WinCE !FUZZ @@ -207,8 +207,8 @@ TAO/orbsvcs/tests/Bug_3444_Regression/run_test_ipv6.pl: IPV6 !NO_DIOP !MINIMUM ! TAO/orbsvcs/tests/Bug_3444_Regression/run_test_ipv6.pl --sciop: IPV6 SCTP !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !STATIC !VxWorks !VxWorks_RTP !LynxOS !LabVIEW_RT !WinCE !FUZZ TAO/examples/PluggableUDP/tests/SimplePerformance/run_test_ipv6.pl: IPV6 !QNX !NO_DIOP !ACE_FOR_TAO TAO/examples/PluggableUDP/tests/SimplePerformance/run_test.pl: !QNX !NO_DIOP !ACE_FOR_TAO -TAO/examples/PluggableUDP/tests/Performance/run_test.pl: !QNX !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_COMPACT !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ -TAO/examples/PluggableUDP/tests/Performance/run_test_ipv6.pl: IPV6 !QNX !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_COMPACT !CORBA_E_MICRO !LabVIEW_RT !WinCE !FUZZ +TAO/examples/PluggableUDP/tests/Performance/run_test.pl: !QNX !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_COMPACT !CORBA_E_MICRO +TAO/examples/PluggableUDP/tests/Performance/run_test_ipv6.pl: IPV6 !QNX !ST !NO_DIOP !ACE_FOR_TAO !CORBA_E_COMPACT !CORBA_E_MICRO TAO/orbsvcs/tests/unit/Notify/MC/Control/run_test.pl: TAO/orbsvcs/tests/unit/Notify/MC/MonitorControlExt/run_test.pl: !STATIC !MINIMUM !CORBA_E_COMPACT !CORBA_E_MICRO !LynxOS TAO/orbsvcs/tests/unit/Notify/MC/MonitorManager/run_test.pl: !ST !STATIC diff --git a/TAO/examples/Logging/run_test.pl b/TAO/examples/Logging/run_test.pl index 3d2195c015d..1bde659124e 100755 --- a/TAO/examples/Logging/run_test.pl +++ b/TAO/examples/Logging/run_test.pl @@ -1,52 +1,53 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- -# This is a Perl script that runs the Logger client and server - use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -# amount of delay between running the servers -$sleeptime = 15; - -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("Logging_Service"); -} -else { - $SV = new PerlACE::Process ("Logging_Service"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -$CL = new PerlACE::Process ("Logging_Test"); -# Start the service -$server = $SV->Spawn (); +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"; + +my $sleeptime = 15; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("Logging_Service"); +$CL = $client->CreateProcess ("Logging_Test"); +$server_status = $SV->Spawn (); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -# Give the service time to settle -sleep $sleeptime; +sleep $server->ProcessStartWaitInterval(); -# Start the client -$client = $CL->SpawnWaitKill (60); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); -if ($client != 0) { - print STDERR "ERROR: test returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -# Kill the service -$server = $SV->TerminateWaitKill (5); +$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: service returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } diff --git a/TAO/examples/PluggableUDP/tests/Performance/run_test.pl b/TAO/examples/PluggableUDP/tests/Performance/run_test.pl index 344296fdfa5..cfc8408e88a 100755 --- a/TAO/examples/PluggableUDP/tests/Performance/run_test.pl +++ b/TAO/examples/PluggableUDP/tests/Performance/run_test.pl @@ -1,54 +1,82 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorbase = "test.ior"; -$iorfile = PerlACE::LocalFile ("$iorbase"); +$debug_level = '0'; +$port_server = '12345'; +$port_client = '12346'; -unlink $iorfile; - -if (PerlACE::is_vxworks_test()) { - $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGTHOST'}; - $SV = new PerlACE::ProcessVX ("server", "-ORBEndpoint diop://$TARGETHOSTNAME:12345 -o $iorbase"); -} -else { - $SV = new PerlACE::Process ("server", "-ORBEndpoint diop://:12345 -o $iorfile"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -$CL = new PerlACE::Process ("client", "-k file://$iorfile -ORBEndpoint diop://:12346"); -$server = $SV->Spawn (); +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"; + +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBEndpoint diop://:$port_server " . + "-o $server_iorfile"); + +$CL = $client->CreateProcess ("client", + "-ORBEndpoint diop://:$port_client " . + "-k file://$client_iorfile"); + +$server_status = $SV->Spawn (); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: could not find file <$iorfile>\n"; - $SV->Kill (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (90); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 75); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/examples/PluggableUDP/tests/Performance/run_test_ipv6.pl b/TAO/examples/PluggableUDP/tests/Performance/run_test_ipv6.pl index e1066e6e2a6..1c4ce05783c 100755 --- a/TAO/examples/PluggableUDP/tests/Performance/run_test_ipv6.pl +++ b/TAO/examples/PluggableUDP/tests/Performance/run_test_ipv6.pl @@ -1,54 +1,83 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorbase = "test.ior"; -$iorfile = PerlACE::LocalFile ("$iorbase"); +$debug_level = '0'; +$port_server = '12345'; +$port_client = '12346'; +$hostname = '[::1]'; -unlink $iorfile; - -if (PerlACE::is_vxworks_test()) { - $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGTHOST'}; - $SV = new PerlACE::ProcessVX ("server", "-ORBEndpoint diop://$TARGETHOSTNAME:12345 -o $iorbase"); -} -else { - $SV = new PerlACE::Process ("server", "-ORBEndpoint diop://[::1]:12345 -o $iorfile"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -$CL = new PerlACE::Process ("client", "-k file://$iorfile -ORBEndpoint diop://[::1]:12346"); -$server = $SV->Spawn (); +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"; + +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBEndpoint diop://$hostname:$port_server " . + "-o $server_iorfile"); + +$CL = $client->CreateProcess ("client", + "-ORBEndpoint diop://$hostname:$port_client " . + "-k file://$client_iorfile"); + +$server_status = $SV->Spawn (); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: could not find file <$iorfile>\n"; - $SV->Kill (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (90); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 75); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/examples/Simple/time-date/run_test.pl b/TAO/examples/Simple/time-date/run_test.pl index 092430e81ce..006fb4b759d 100755 --- a/TAO/examples/Simple/time-date/run_test.pl +++ b/TAO/examples/Simple/time-date/run_test.pl @@ -1,52 +1,75 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorfile = "ior"; -$conf = PerlACE::LocalFile ("client" . "$PerlACE::svcconf_ext"); +$debug_level = '0'; -# Remove the file before starting the test. -unlink $iorfile; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; -PerlACE::add_lib_path ('.'); +my $iorbase = "ior"; # please note that conf file is defined in *.conf file +my $client_conffile = $client->LocalFile ($PerlACE::svcconf_ext); +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server"); +$SV = $server->CreateProcess ("server", ""); +$CL = $client->CreateProcess ("client", "-f $client_iorfile -x -ORBSvcConf $client_conffile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -else { - $SV = new PerlACE::Process ("server"); + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } -$CL = new PerlACE::Process ("client", "-f $iorfile -x -ORBSvcConf $conf"); -$SV->Spawn (); +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: waiting for file <$iorfile>\n"; - $SV->Kill (); +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (60); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill ($PerlACE::wait_interval_for_process_shutdown); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/Bug_2287_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_2287_Regression/run_test.pl index fee5bc7bc29..b1492af15f9 100755 --- a/TAO/orbsvcs/tests/Bug_2287_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_2287_Regression/run_test.pl @@ -6,44 +6,72 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; + +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); +$CL = $client->CreateProcess ("client", + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } -$CL = new PerlACE::Process ("client", " -k file://$iorfile"); - -$SV->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; -} +} -$client = $CL->SpawnWaitKill (300); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 285); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/Bug_2316_Regression/client.cpp b/TAO/orbsvcs/tests/Bug_2316_Regression/client.cpp index 568d5623fd5..a4eb0d418c6 100644 --- a/TAO/orbsvcs/tests/Bug_2316_Regression/client.cpp +++ b/TAO/orbsvcs/tests/Bug_2316_Regression/client.cpp @@ -2,9 +2,36 @@ #include "Test_impl.h" #include "ace/OS_NS_stdio.h" +#include "ace/Get_Opt.h" -const ACE_TCHAR *ior_callback = ACE_TEXT("callback.ior"); -const ACE_TCHAR *ior_server = ACE_TEXT("file://server.ior"); +const ACE_TCHAR *ior = ACE_TEXT("file://server.ior"); +const ACE_TCHAR *uipmc_ior = ACE_TEXT("corbaloc:miop:1.0@1.0-domain-1/127.0.0.1:23232"); + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-k <ior> " + "\n", + argv [0]), + -1); + } + // Indicates successful parsing of the command line + return 0; +} int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) @@ -14,6 +41,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + if (parse_args (argc, argv) != 0) + return 1; + CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); @@ -24,10 +54,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) root_poa->the_POAManager (); poa_manager->activate (); - const char* uipmc_ior = "corbaloc:miop:1.0@1.0-domain-1/127.0.0.1:23232"; CORBA::Object_var obj =orb->string_to_object (uipmc_ior); - CORBA::Object_var tmp = orb->string_to_object (ior_server); + CORBA::Object_var tmp = orb->string_to_object (ior); server_var server = server::_narrow (tmp.in ()); try diff --git a/TAO/orbsvcs/tests/Bug_2316_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_2316_Regression/run_test.pl index 285409d210a..6194ef0b2e0 100755 --- a/TAO/orbsvcs/tests/Bug_2316_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_2316_Regression/run_test.pl @@ -6,37 +6,69 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; $status = 0; +$debug_level = '0'; -$SV = new PerlACE::Process ("server"); -$CL = new PerlACE::Process ("client"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); +$CL = $client->CreateProcess ("client", "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); -$SV->Spawn (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: Test failed. Not regression. Cannot find file <$iorfile>\n"; +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; -} +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -$client = $CL->SpawnWaitKill (300); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 285); -if ($client != 0) { - print STDERR "ERROR: Test failed - client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: During clean up - killing server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/Bug_2316_Regression/server.cpp b/TAO/orbsvcs/tests/Bug_2316_Regression/server.cpp index e747f12cb3f..8901b60621d 100644 --- a/TAO/orbsvcs/tests/Bug_2316_Regression/server.cpp +++ b/TAO/orbsvcs/tests/Bug_2316_Regression/server.cpp @@ -2,6 +2,35 @@ #include "Test_impl.h" #include "ace/OS_NS_stdio.h" +#include "ace/Get_Opt.h" + +const ACE_TCHAR *ior_output_file = ACE_TEXT ("server.ior"); + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("o:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'o': + ior_output_file = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-o <iorfile>" + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) @@ -10,6 +39,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv); + if (parse_args (argc, argv) != 0) + return 1; + CORBA::Object_var poa_object = orb->resolve_initial_references("RootPOA"); PortableServer::POA_var root_poa = @@ -23,7 +55,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) server_var server = server_obj->_this(); CORBA::String_var ior = orb->object_to_string (server.in ()); - FILE *output_file = ACE_OS::fopen ("server.ior", "w"); + FILE *output_file = ACE_OS::fopen (ACE_TEXT_ALWAYS_CHAR(ior_output_file), "w"); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Bug_2615_Regression/client.cpp b/TAO/orbsvcs/tests/Bug_2615_Regression/client.cpp index a66ff5e4aca..8de294f3253 100644 --- a/TAO/orbsvcs/tests/Bug_2615_Regression/client.cpp +++ b/TAO/orbsvcs/tests/Bug_2615_Regression/client.cpp @@ -32,6 +32,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " "-k <ior> " + "-l <iogr> " "\n", argv [0]), -1); diff --git a/TAO/orbsvcs/tests/Bug_2615_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_2615_Regression/run_test.pl index 948f976ce02..ee23d89724a 100755 --- a/TAO/orbsvcs/tests/Bug_2615_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_2615_Regression/run_test.pl @@ -6,50 +6,102 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -$iorfile = PerlACE::LocalFile ("ior.ior"); -$iogrfile = PerlACE::LocalFile ("iogr.ior"); -unlink $iorfile; -unlink $iogrfile; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; + +my $iorbase = "ior.ior"; +my $iogrbase = "iogr.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +my $server_iogrfile = $server->LocalFile ($iogrbase); +my $client_iogrfile = $client->LocalFile ($iogrbase); + +$server->DeleteFile($iogrbase); +$client->DeleteFile($iogrbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile " . + "-p $server_iogrfile"); -if (PerlACE::is_vxworks_test()) { - $CL = new PerlACE::ProcessVX ("client"); +$CL = $client->CreateProcess ("client", + "-k file://$client_iorfile " . + "-l file://$client_iogrfile "); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -else { - $CL = new PerlACE::Process ("client"); + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } -$SV = new PerlACE::Process ("server"); +if ($server->WaitForFileTimed ($iogrbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iogrfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -$SV->Spawn (); +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($server->GetFile ($iogrbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iogrfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1 - || PerlACE::waitforfile_timed ($iogrfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($client->PutFile ($iogrbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iogrfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (300); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 285); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; -unlink $iogrfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); +$server->DeleteFile($iogrbase); +$client->DeleteFile($iogrbase); exit $status; diff --git a/TAO/orbsvcs/tests/Bug_2615_Regression/server.cpp b/TAO/orbsvcs/tests/Bug_2615_Regression/server.cpp index f5d223f58d2..a1206b32b29 100644 --- a/TAO/orbsvcs/tests/Bug_2615_Regression/server.cpp +++ b/TAO/orbsvcs/tests/Bug_2615_Regression/server.cpp @@ -39,6 +39,7 @@ parse_args (int argc, ACE_TCHAR *argv[]) ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " "-o <iorfile>" + "-p <iorfile>" "\n", argv [0]), -1); diff --git a/TAO/orbsvcs/tests/Bug_2709_Regression/client.cpp b/TAO/orbsvcs/tests/Bug_2709_Regression/client.cpp index 194242928c1..a0d24d81fc1 100644 --- a/TAO/orbsvcs/tests/Bug_2709_Regression/client.cpp +++ b/TAO/orbsvcs/tests/Bug_2709_Regression/client.cpp @@ -33,7 +33,6 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 'o': collocated_ior_file = get_opts.opt_arg (); break; - case '?': default: ACE_ERROR_RETURN ((LM_ERROR, @@ -61,9 +60,6 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) try { - if (parse_args (argc, argv) != 0) - return 1; - ACE_Argv_Type_Converter satc (argc, argv); CORBA::ORB_var sorb = CORBA::ORB_init (satc.get_argc (), @@ -76,6 +72,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) catc.get_TCHAR_argv (), client_orb.c_str ()); + if (parse_args (argc, argv) != 0) + return 1; + { ACE_Manual_Event me; diff --git a/TAO/orbsvcs/tests/Bug_2709_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_2709_Regression/run_test.pl index d5f741aaea2..7200081f22a 100755 --- a/TAO/orbsvcs/tests/Bug_2709_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_2709_Regression/run_test.pl @@ -6,47 +6,80 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -$iorfile = PerlACE::LocalFile ("server.ior"); -$colloc_iorfile = PerlACE::LocalFile ("collocated_server.ior"); -unlink $iorfile; -unlink $colloc_iorfile; - -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); + +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"; + +my $iorbase = "ior.ior"; +my $colloc_iorfile = "collocated_server.ior"; + +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); + +my $client_colloc_iorfile = $client->LocalFile ($colloc_iorfile); + +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); +$client->DeleteFile($colloc_iorfile); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); + +$CL = $client->CreateProcess ("client", + "-s $client_iorfile " . + "-o $colloc_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -$CL = new PerlACE::Process ("client", " -s $iorfile -o $colloc_iorfile"); -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (30); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 20); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; -unlink $colloc_iorfile; - +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); +$client->DeleteFile($colloc_iorfile); exit $status; diff --git a/TAO/orbsvcs/tests/Bug_2709_Regression/server.cpp b/TAO/orbsvcs/tests/Bug_2709_Regression/server.cpp index 05624ead0ce..7d862a52fd9 100644 --- a/TAO/orbsvcs/tests/Bug_2709_Regression/server.cpp +++ b/TAO/orbsvcs/tests/Bug_2709_Regression/server.cpp @@ -46,14 +46,13 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { try { - if (parse_args (argc, argv) != 0) - return 1; - ACE_Argv_Type_Converter satc (argc, argv); CORBA::ORB_var sorb = CORBA::ORB_init (satc.get_argc (), satc.get_TCHAR_argv ()); + if (parse_args (argc, argv) != 0) + return 1; { ACE_Manual_Event me; diff --git a/TAO/orbsvcs/tests/Bug_2925_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_2925_Regression/run_test.pl index 08b19d54dd1..595d9064fd1 100755 --- a/TAO/orbsvcs/tests/Bug_2925_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_2925_Regression/run_test.pl @@ -1,54 +1,81 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; +$miop_address = '230.255.255.33'; +$port = '7394'; -$iorfile = PerlACE::LocalFile ("servant.ior"); -unlink $iorfile; - -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-u corbaloc:miop:1.0\@1.0-cdmwftdomain-1/230.255.255.33:7394 -o servant.ior"); -} -else { - $SV = new PerlACE::Process ("server", "-u corbaloc:miop:1.0\@1.0-cdmwftdomain-1/230.255.255.33:7394 -o $iorfile"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -$CL = new PerlACE::Process ("client", "-k file://$iorfile"); -$server = $SV->Spawn (); +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"; + +my $iorbase = "servant.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-u corbaloc:miop:1.0\@1.0-cdmwftdomain-1/$miop_address:$port " . + "-o $server_iorfile"); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$CL = $client->CreateProcess ("client", + "-k file://$client_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (40); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 25); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (30); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 20); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl b/TAO/orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl index 29e0679d306..faceeae6586 100755 --- a/TAO/orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl +++ b/TAO/orbsvcs/tests/Bug_2925_Regression/run_test_ipv6.pl @@ -1,54 +1,81 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; +$miop_address = '[FF01:0:0:0:0:0:BEBE:75]'; +$port = '5555'; -$iorfile = PerlACE::LocalFile ("servant.ior"); -unlink $iorfile; - -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-u corbaloc:miop:1.0\@1.0-cdmwftdomain-1/[FF01:0:0:0:0:0:BEBE:75]:5555 -o servant.ior"); -} -else { - $SV = new PerlACE::Process ("server", "-u corbaloc:miop:1.0\@1.0-cdmwftdomain-1/[FF01:0:0:0:0:0:BEBE:75]:5555 -o $iorfile"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -$CL = new PerlACE::Process ("client", "-k file://$iorfile"); -$server = $SV->Spawn (); +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"; + +my $iorbase = "servant.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-u corbaloc:miop:1.0\@1.0-cdmwftdomain-1/$miop_address:$port " . + "-o $server_iorfile"); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$CL = $client->CreateProcess ("client", + "-k file://$client_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (40); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 25); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (20); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 10); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/Bug_3215_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_3215_Regression/run_test.pl index fee5bc7bc29..33d5a50cb28 100755 --- a/TAO/orbsvcs/tests/Bug_3215_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_3215_Regression/run_test.pl @@ -6,44 +6,72 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); +$CL = $client->CreateProcess ("client", + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } -$CL = new PerlACE::Process ("client", " -k file://$iorfile"); - -$SV->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; -} +} -$client = $CL->SpawnWaitKill (300); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 285); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/Bug_3216_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_3216_Regression/run_test.pl index 2c5d8ff9ced..b1492af15f9 100755 --- a/TAO/orbsvcs/tests/Bug_3216_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_3216_Regression/run_test.pl @@ -6,44 +6,72 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; - -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); + +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"; + +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); + +$CL = $client->CreateProcess ("client", + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -$CL = new PerlACE::Process ("client", " -k file://$iorfile"); -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (300); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 285); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl b/TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl index c3affd14385..b423cdeb10e 100755 --- a/TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl +++ b/TAO/orbsvcs/tests/HTIOP/BiDirectional/run_test.pl @@ -1,45 +1,87 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; -use Sys::Hostname; +use PerlACE::TestTarget; $status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); -$host = hostname(); +$debug_level = '0'; +$iterations = '100'; -unlink $iorfile; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; + +my $iorbase = "test.ior"; +my $outside = "outside.conf"; +my $inside = "inside.conf"; + +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$SV = new PerlACE::Process ("server", "-orbendpoint htiop://$host: -orbsvcconf outside.conf -o $iorfile -i 100"); -$CL = new PerlACE::Process ("client", "-orbsvcconf inside.conf -k file://$iorfile"); +$hostname = $server->HostName(); -$SV->Spawn (); +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBEndPoint htiop://$hostname: " . + "-ORBSvcConf $outside " . + "-i $iterations " . + "-o $server_iorfile"); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +$CL = $client->CreateProcess ("client", + "-ORBSvcConf $inside " . + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (20); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 10); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (20); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 10); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/IOR_MCast/run_test_ipv6.pl b/TAO/orbsvcs/tests/IOR_MCast/run_test_ipv6.pl index 9b764654b0d..d82301a1cf3 100755 --- a/TAO/orbsvcs/tests/IOR_MCast/run_test_ipv6.pl +++ b/TAO/orbsvcs/tests/IOR_MCast/run_test_ipv6.pl @@ -1,34 +1,51 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-a [ff01::1]:12345 -ORBEndpoint iiop://[::1]:23456"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("server", "-a [ff01::1]:12345 -ORBEndpoint iiop://[::1]:23456"); -} -$CL = new PerlACE::Process ("client", "-ORBInitRef MCASTServer=mcast://[ff01::1]:12345::2/MCASTServer"); -$SV->Spawn (); +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"; + +my $server_port = 23456; +my $mcast_port = 12345; + +$SV = $server->CreateProcess ("server", "-a [ff01::1]:12345 -ORBEndpoint iiop://[::1]:23456"); +$CL = $client->CreateProcess ("client", "-ORBInitRef MCASTServer=mcast://[ff01::1]:12345::2/MCASTServer"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} sleep 3; -$client = $CL->SpawnWaitKill (20); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval()); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->TerminateWaitKill (10); +$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $status = 1; +} exit $status; diff --git a/TAO/orbsvcs/tests/Property/run_test.pl b/TAO/orbsvcs/tests/Property/run_test.pl index c0135af9b1d..b25091d754b 100755 --- a/TAO/orbsvcs/tests/Property/run_test.pl +++ b/TAO/orbsvcs/tests/Property/run_test.pl @@ -1,70 +1,106 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -# amount of delay between running the servers - -$sleeptime = 6; $status = 0; +$debug_level = '0'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} -# variables for parameters +my $n_service = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +my $server = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; +my $client = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n"; -$nsiorbase = "ns.ior"; -$nsior = PerlACE::LocalFile ("$nsiorbase"); +my $iorbase = "ns.ior"; +my $sleeptime = 6; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +my $n_service_iorfile = $n_service->LocalFile($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); +$n_service->DeleteFile($iorbase); -unlink $nsior; +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level ". + "-ORBInitRef NameService=file://$server_iorfile"); +$CL = $client->CreateProcess ("client", "-ORBInitRef NameService=file://$client_iorfile"); +$NS = $n_service->CreateProcess ("../../Naming_Service/Naming_Service", "-o $n_service_iorfile"); + +print STDERR "Starting Naming_Service\n"; -$NS = new PerlACE::Process ("../../Naming_Service/Naming_Service", "-o $nsior"); -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-ORBInitRef NameService=file://$nsiorbase"); +$n_service_status = $NS->Spawn (); + +if ($n_service->WaitForFileTimed ($iorbase, + $n_service->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$n_service_iorfile>\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; } -else { - $SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior"); + +if ($n_service->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$n_service_iorfile>\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; } -$CL = new PerlACE::Process ("client", "-ORBInitRef NameService=file://$nsior"); -print STDERR "Starting Naming_Service\n"; -$NS->Spawn (); +if ($server->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$server_iorfile>\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 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 (); +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $NS->Kill (); $NS->TimedWait (1); exit 1; } print STDERR "Starting Server\n"; -$SV->Spawn (); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $NS->Kill (); $NS->TimedWait (1); + exit 1; +} sleep $sleeptime; print STDERR "Starting Client\n"; +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); -$client = $CL->SpawnWaitKill (60); - -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->TerminateWaitKill (15); +$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -$nserver = $NS->TerminateWaitKill (15); +$n_service_status = $NS->TerminateWaitKill ($n_service->ProcessStopWaitInterval()); -if ($nserver != 0) { - print STDERR "ERROR: name server returned $nserver\n"; +if ($n_service_status != 0) { + print STDERR "ERROR: n_server returned $n_service_status\n"; $status = 1; } +$n_service->DeleteFile($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; diff --git a/TAO/orbsvcs/tests/Security/BiDirectional/run_test.pl b/TAO/orbsvcs/tests/Security/BiDirectional/run_test.pl index c4e3517b24b..d3e18164e16 100755 --- a/TAO/orbsvcs/tests/Security/BiDirectional/run_test.pl +++ b/TAO/orbsvcs/tests/Security/BiDirectional/run_test.pl @@ -1,33 +1,34 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- -use lib "$ENV{'ACE_ROOT'}/bin"; -use PerlACE::Run_Test; +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; use Getopt::Long; $status = 0; + +$status = 0; $opt = ""; $conf_client = ""; $conf_server = ""; -$iorfile = PerlACE::LocalFile ("test.ior"); -$iter = 10; +$iter = 10; sub options () { - my $help = 0; # handled locally - my $man = 0; # handled locally - my $ssl = 1; # handled locally - my $dotdec = 0; # handled locally - my $debug; # handled locally - my $shost; # handled locally - my $chost; # handled locally - - # Process options. - if ( @ARGV > 0 ) { - GetOptions ('help|?' => \$help, + my $help = 0; # handled locally + my $man = 0; # handled locally + my $ssl = 1; # handled locally + my $dotdec = 0; # handled locally + my $debug; # handled locally + my $shost; # handled locally + my $chost; # handled locally + + # Process options. + if ( @ARGV > 0 ) { + GetOptions ('help|?' => \$help, 'manual' => \$man, 'iter=i' => \$iter, 'ssl' => \$ssl, @@ -35,44 +36,43 @@ sub options () { 'shost=s' => \$shost, 'chost=s' => \$chost, 'debug=i' => \$debug) or pod2usage(2); - } - - if ($ssl) { - $conf_client = " -ORBSvcConf client.conf"; - $conf_server = " -ORBSvcConf server.conf"; - } - - if ($debug) { - $opt = "$opt -ORBDebugLevel $debug"; - } - - if ($dotdec) { - if ($dotdec =~ /client/) { - $conf_client = "$conf_client -ORBDottedDecimalAddresses 1"; } - if ($dotdec =~ /server/) { - $conf_server = "$conf_server -ORBDottedDecimalAddresses 1"; + + if ($ssl) { + $conf_client = " -ORBSvcConf client.conf"; + $conf_server = " -ORBSvcConf server.conf"; + } + + if ($debug) { + $opt = "$opt -ORBDebugLevel $debug"; + } + + if ($dotdec) { + if ($dotdec =~ /client/) { + $conf_client = "$conf_client -ORBDottedDecimalAddresses 1"; + } + if ($dotdec =~ /server/) { + $conf_server = "$conf_server -ORBDottedDecimalAddresses 1"; + } } - } - - if ($shost) { - $conf_server = "$conf_server -ORBListenEndpoints iiop:///hostname_in_ior=$shost"; - } - - if ($chost) { - $conf_client = "$conf_client -ORBListenEndpoints iiop:///hostname_in_ior=$chost"; - } - - if ( $man or $help ) { - # Load Pod::Usage only if needed. - require "Pod/Usage.pm"; - import Pod::Usage; - pod2usage(1) if $help; - pod2usage(VERBOSE => 2) if $man; - return 0; - } - - return 1; + + if ($shost) { + $conf_server = "$conf_server -ORBListenEndpoints iiop:///hostname_in_ior=$shost"; + } + + if ($chost) { + $conf_client = "$conf_client -ORBListenEndpoints iiop:///hostname_in_ior=$chost"; + } + + if ( $man or $help ) { + # Load Pod::Usage only if needed. + require "Pod/Usage.pm"; + import Pod::Usage; + pod2usage(1) if $help; + pod2usage(VERBOSE => 2) if $man; + return 0; + } + return 1; } @@ -81,51 +81,71 @@ $ENV{'SSL_CERT_DIR'} = './ssl'; options () or die "Error: Nothing executed"; -unlink $iorfile; +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"; + +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -print STDERR "Executing: server $conf_server $opt -o $iorfile -i $iter\n"; -$SV = new PerlACE::Process ("server", - "$conf_server $opt -o $iorfile -i $iter"); +print STDERR "Executing: server $conf_server $opt -o $iorbase -i $iter\n"; -print STDERR "Executing: client $conf_client $opt -k file://$iorfile\n"; -$CL = new PerlACE::Process ("client", - "$conf_client $opt -k file://$iorfile"); +$SV = $server->CreateProcess ("server", + "$conf_server " . + "$opt " . + "-o $server_iorfile " . + "-i $iter"); -$server = $SV->Spawn (); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$CL = $client->CreateProcess ("client", + "$conf_client " . + "$opt " . + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (20); +print STDERR "Executing: server find file\n"; -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } -$server = $SV->WaitKill (10); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -unlink $iorfile; +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($status != 0) { - print STDERR "Test failed\n"; -} -else { - print STDERR "Test succeded\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; __END__ @@ -146,12 +166,12 @@ B<run_test.pl> [B<-help|?>] [B<-iter iterations>] [B<-chost host>] This is a test that exercises the birectional GIOP connection implementation in TAO over SSLIOP connection. Start the server like this - $ server -ORBSvcConf server.conf -o <file.ior> -i <no_iterations> - $ client -ORBSvcConf client.conf -k file://<file.ior> -x + $ server -ORBSvcConf server.conf -o <file.ior> -i <no_iterations> + $ client -ORBSvcConf client.conf -k file://<file.ior> -x Or, simply - $ ./run_test.pl + $ ./run_test.pl The server starts up writing the IOR to the file. The client then starts up, creates its own object and passes the reference to the server. Then @@ -166,29 +186,29 @@ added support for SSLIOP. =head1 OPTIONS [B<-help|?>] - Print a short help message + Print a short help message [B<-iter iterations>] - The number of iterations to make. Default is 10. - + The number of iterations to make. Default is 10. + [B<-chost hostname>] - The hostname_in_ior for the client. Used only if specified. - + The hostname_in_ior for the client. Used only if specified. + [B<-shost hostname>] - The hostname_in_ior for the server. Used only if specified. - + The hostname_in_ior for the server. Used only if specified. + [B<-man>] - Prints this nice manual page + Prints this nice manual page [B<-dd who>] - Request the usage of -ORBDottedDecimalAddresses 1" for the client, the - server or both. Values of who can be "client", "server" or - "client,server". + Request the usage of -ORBDottedDecimalAddresses 1" for the client, the + server or both. Values of who can be "client", "server" or + "client,server". [B<-ssl>] - Enables the use of SSLIOP instead of IIOP. Default. - + Enables the use of SSLIOP instead of IIOP. Default. + [B<-debug level>] - Enables debugging. Values for level are 1-10. Default is 0. + Enables debugging. Values for level are 1-10. Default is 0. =cut diff --git a/TAO/orbsvcs/tests/Security/Big_Request/run_test.pl b/TAO/orbsvcs/tests/Security/Big_Request/run_test.pl index 69f3343f458..8cf390c5e46 100755 --- a/TAO/orbsvcs/tests/Security/Big_Request/run_test.pl +++ b/TAO/orbsvcs/tests/Security/Big_Request/run_test.pl @@ -1,55 +1,90 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; -# -*- perl -*- # $Id$ +# -*- perl -*- -use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; $status = 0; -$filebase = "test.ior"; -$file = PerlACE::LocalFile ("$filebase"); - -unlink $file; +$debug_level = '0'; +$svc_conf = $PerlACE::svcconf_ext; -$status = 0; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} # Set the SSL environment # This doesn't work on Windows. For some reason, # environment variables aren't propagated to child processes. #$ENV{'SSL_CERT_FILE'} = 'cacert.pem'; -$SV = new PerlACE::Process ("server", - "-o $file -ORBSvcConf server$PerlACE::svcconf_ext"); -$CL = new PerlACE::Process ("client", - "-ORBSvcConf client$PerlACE::svcconf_ext -k file://$file -x"); +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"; + +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBSvcConf server$svc_conf " . + "-o $server_iorfile "); + +$CL = $client->CreateProcess ("client", + "-ORBSvcConf client$svc_conf " . + "-k file://$client_iorfile " . + "-x"); print STDERR "\n\n==== Running SSLIOP Big_Request test\n"; -$SV->Spawn (); +$server_status = $SV->Spawn (); -if (PerlACE::waitforfile_timed ($file, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$file>\n"; - $SV->Kill (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (180); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 165); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (15); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $file; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/orbsvcs/tests/Security/Bug_2908_Regression/MessengerClient.cpp b/TAO/orbsvcs/tests/Security/Bug_2908_Regression/MessengerClient.cpp index 96c87df072b..90042f726e8 100644 --- a/TAO/orbsvcs/tests/Security/Bug_2908_Regression/MessengerClient.cpp +++ b/TAO/orbsvcs/tests/Security/Bug_2908_Regression/MessengerClient.cpp @@ -1,6 +1,35 @@ // $Id$ #include "MessengerC.h" +#include "ace/Get_Opt.h" + +const ACE_TCHAR *ior = ACE_TEXT("file://server.ior"); + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("k:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'k': + ior = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-k <ior> " + "\n", + argv [0]), + -1); + } + // Indicates successful parsing of the command line + return 0; +} int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) @@ -10,7 +39,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Initialize orb CORBA::ORB_var orb = CORBA::ORB_init(argc, argv ); - const ACE_TCHAR *ior = ACE_TEXT("file://server.ior"); + if (parse_args (argc, argv) != 0) + return 1; + CORBA::Object_var obj = orb->string_to_object (ior); diff --git a/TAO/orbsvcs/tests/Security/Bug_2908_Regression/MessengerServer.cpp b/TAO/orbsvcs/tests/Security/Bug_2908_Regression/MessengerServer.cpp index 4d4c8315ff7..1b82a2e98a5 100644 --- a/TAO/orbsvcs/tests/Security/Bug_2908_Regression/MessengerServer.cpp +++ b/TAO/orbsvcs/tests/Security/Bug_2908_Regression/MessengerServer.cpp @@ -1,8 +1,35 @@ // $Id$ #include "Messenger_i.h" +#include "ace/Get_Opt.h" -const ACE_TCHAR *ior_output_file = ACE_TEXT("server.ior"); +const ACE_TCHAR *ior_output_file = ACE_TEXT ("server.ior"); + +int +parse_args (int argc, ACE_TCHAR *argv[]) +{ + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("o:")); + int c; + + while ((c = get_opts ()) != -1) + switch (c) + { + case 'o': + ior_output_file = get_opts.opt_arg (); + break; + + case '?': + default: + ACE_ERROR_RETURN ((LM_ERROR, + "usage: %s " + "-o <iorfile>" + "\n", + argv [0]), + -1); + } + // Indicates sucessful parsing of the command line + return 0; +} int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) @@ -12,6 +39,9 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Initialize orb CORBA::ORB_var orb = CORBA::ORB_init(argc, argv); + if (parse_args (argc, argv) != 0) + return 1; + //Get reference to Root POA CORBA::Object_var POA_obj = orb->resolve_initial_references( "RootPOA" ); PortableServer::POA_var poa = PortableServer::POA::_narrow( POA_obj.in() ); @@ -30,11 +60,11 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // If the ior_output_file exists, output the ior to it if (ior_output_file != 0) { - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); + FILE *output_file= ACE_OS::fopen (ACE_TEXT_ALWAYS_CHAR(ior_output_file), "w"); if (output_file == 0) ACE_ERROR_RETURN ((LM_ERROR, "Cannot open output file for writing IOR: %s", - ior_output_file), + ACE_TEXT_ALWAYS_CHAR(ior_output_file)), 1); ACE_OS::fprintf (output_file, "%s", ior.in ()); ACE_OS::fclose (output_file); diff --git a/TAO/orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl b/TAO/orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl index bb2ed92801a..a13304fd2c4 100755 --- a/TAO/orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Security/Bug_2908_Regression/run_test.pl @@ -1,36 +1,82 @@ -# $Id$ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -use Env (ACE_ROOT); -use lib "$ACE_ROOT/bin"; -use PerlACE::Run_Test; - -$ENV{'SSL_CERT_FILE'} = 'cacert.pem'; -$iorfile = "server.ior"; -unlink $iorfile; - -# start MessengerServer -$SV = new PerlACE::Process("server", "-ORBSvcConf server.conf"); -$SV->Spawn(); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +$status = 0; +$debug_level = '0'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; + +my $iorbase = "server.ior"; +my $certificate = "cacert.pem"; +my $server_conf = "server.conf"; +my $client_conf = "client.conf"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$ENV{'SSL_CERT_FILE'} = $certificate; + +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level ". + "-o $server_iorfile ". + "-ORBSvcConf $server_conf"); +$CL = $client->CreateProcess ("client", "-k file://$client_iorfile ". + "-ORBSvcConf $client_conf"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -# start MessengerClient -$CL = new PerlACE::Process("client", "-ORBSvcConf client.conf"); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval()); -if ($CL->SpawnWaitKill(10) == -1) { - exit (1); +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $status = 1; } -$SV->WaitKill(15); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -unlink $iorfile; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $status = 1; +} -exit 0; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); +exit $status; diff --git a/TAO/orbsvcs/tests/Security/Secure_Invocation/run_test.pl b/TAO/orbsvcs/tests/Security/Secure_Invocation/run_test.pl index 40a74e180fe..ebe91e9334c 100755 --- a/TAO/orbsvcs/tests/Security/Secure_Invocation/run_test.pl +++ b/TAO/orbsvcs/tests/Security/Secure_Invocation/run_test.pl @@ -1,55 +1,89 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; -# -*- perl -*- # $Id$ +# -*- perl -*- - -use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; $status = 0; -$file = PerlACE::LocalFile ("test.ior"); +$debug_level = '0'; +$svc_conf = $PerlACE::svcconf_ext; -unlink $file; - -$status = 0; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} # Set the SSL environment # This doesn't work on Windows. For some reason, # environment variables aren't propagated to child processes. #$ENV{'SSL_CERT_FILE'} = 'cacert.pem'; -$SV = new PerlACE::Process ("server", - "-o $file -ORBSvcConf server$PerlACE::svcconf_ext"); -$CL = new PerlACE::Process ("client", - "-ORBSvcConf client$PerlACE::svcconf_ext -k file://$file"); +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"; + +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBSvcConf server$svc_conf " . + "-o $server_iorfile "); + +$CL = $client->CreateProcess ("client", + "-ORBSvcConf client$svc_conf " . + "-k file://$client_iorfile"); print STDERR "\n\n==== Running Secure_Invocation test\n"; -$SV->Spawn (); +$server_status = $SV->Spawn (); -if (PerlACE::waitforfile_timed ($file, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$file>\n"; - $SV->Kill (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} + +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (60); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (5); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $file; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/performance-tests/Latency/AMI/run_test.pl b/TAO/performance-tests/Latency/AMI/run_test.pl index cb2bc71a5d3..535ae12c791 100755 --- a/TAO/performance-tests/Latency/AMI/run_test.pl +++ b/TAO/performance-tests/Latency/AMI/run_test.pl @@ -1,48 +1,82 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); +$debug_level = '0'; +$iterations = '150000'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} print STDERR "================ AMI Latency test\n"; -unlink $iorfile; +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"; -$SV = new PerlACE::Process ("server", - "-o $iorfile"); +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$CL = new PerlACE::Process ("client", - "-k file://$iorfile -i 150000"); +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); -$SV->Spawn (); +$CL = $client->CreateProcess ("client", + "-i $iterations " . + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -## Very slow machines need > 3 minutes to finish -$client = $CL->SpawnWaitKill (210); -$server = $SV->WaitKill (10); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -unlink $iorfile; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +# Very slow machines need > 3 minutes to finish +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 200); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; diff --git a/TAO/performance-tests/Latency/DII/run_test.pl b/TAO/performance-tests/Latency/DII/run_test.pl index 6e70075152c..af7dc20c0f4 100755 --- a/TAO/performance-tests/Latency/DII/run_test.pl +++ b/TAO/performance-tests/Latency/DII/run_test.pl @@ -1,48 +1,81 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); +$debug_level = '0'; +$iterations = '150000'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} print STDERR "================ DII Latency Test\n"; -unlink $iorfile; +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"; -$SV = new PerlACE::Process ("server", - "-o $iorfile"); +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$CL = new PerlACE::Process ("client", - "-k file://$iorfile " - . " -i 150000"); +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); -$SV->Spawn (); +$CL = $client->CreateProcess ("client", + "-i $iterations " . + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -$client = $CL->SpawnWaitKill (240); -$server = $SV->WaitKill (10); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -unlink $iorfile; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 225); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; diff --git a/TAO/performance-tests/Latency/DSI/run_test.pl b/TAO/performance-tests/Latency/DSI/run_test.pl index ef92b155794..7667dd9339c 100755 --- a/TAO/performance-tests/Latency/DSI/run_test.pl +++ b/TAO/performance-tests/Latency/DSI/run_test.pl @@ -1,48 +1,81 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); +$debug_level = '0'; +$iterations = '250000'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} print STDERR "================ DSI Latency test\n"; -unlink $iorfile; +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"; -$SV = new PerlACE::Process ("server", - "-o $iorfile"); +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$CL = new PerlACE::Process ("client", - "-k file://$iorfile " - . " -i 250000"); +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); -$SV->Spawn (); +$CL = $client->CreateProcess ("client", + "-i $iterations " . + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -$client = $CL->SpawnWaitKill (300); -$server = $SV->WaitKill (10); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -unlink $iorfile; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 285); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; diff --git a/TAO/performance-tests/Latency/Deferred/run_test.pl b/TAO/performance-tests/Latency/Deferred/run_test.pl index 7aa8ade209e..834bc362f68 100755 --- a/TAO/performance-tests/Latency/Deferred/run_test.pl +++ b/TAO/performance-tests/Latency/Deferred/run_test.pl @@ -1,48 +1,82 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); +$debug_level = '0'; +$iterations = '150000'; +$burst = '1'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} print STDERR "================ Deferred Synchronous Latency Test\n"; -unlink $iorfile; +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"; -$SV = new PerlACE::Process ("server", - "-o $iorfile"); +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$CL = new PerlACE::Process ("client", - "-k file://$iorfile " - . " -i 150000 -b 1"); +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); -$SV->Spawn (); +$CL = $client->CreateProcess ("client", + "-i $iterations -b $burst" . + "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -$client = $CL->SpawnWaitKill (240); -$server = $SV->WaitKill (10); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -unlink $iorfile; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 225); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; diff --git a/TAO/performance-tests/Throughput/run_test.pl b/TAO/performance-tests/Throughput/run_test.pl index 96a2c365e39..349b801dd82 100755 --- a/TAO/performance-tests/Throughput/run_test.pl +++ b/TAO/performance-tests/Throughput/run_test.pl @@ -1,54 +1,87 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorfile = PerlACE::LocalFile ("test.ior"); -$svc_conf = PerlACE::LocalFile ("svc$PerlACE::svcconf_ext"); +$debug_level = '0'; +$no_delay = '1'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} print STDERR "================ Throughput test\n"; -unlink $iorfile; +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"; + +my $iorbase = "test.ior"; +my $svc_conf = "svc$PerlACE::svcconf_ext"; -$SV = new PerlACE::Process ("server", - " -ORBSvcConf $svc_conf"); +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -$CL = new PerlACE::Process ("client", - " -ORBSvcConf $svc_conf -ORBNoDelay 1" - . " -x"); +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBSvcConf $svc_conf " . + "-o $server_iorfile"); -$server = $SV->Spawn (); +$CL = $client->CreateProcess ("client", + "-ORBSvcConf $svc_conf " . + "-x " . + "-ORBNoDelay $no_delay " . + "-k file://$client_iorfile"); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (6000); -$server = $SV->WaitKill (10); +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -unlink $iorfile; +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 6000); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + exit $status; diff --git a/TAO/tests/AMI_Buffering/run_message_count.pl b/TAO/tests/AMI_Buffering/run_message_count.pl index c1401700576..81beceb59e9 100755 --- a/TAO/tests/AMI_Buffering/run_message_count.pl +++ b/TAO/tests/AMI_Buffering/run_message_count.pl @@ -6,66 +6,132 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$admin_iorfile = PerlACE::LocalFile ("admin.ior"); -$server_iorfile = PerlACE::LocalFile ("server.ior"); +$status = 0; +$debug_level = '0'; -unlink $admin_iorfile; -unlink $server_iorfile; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; +my $admin = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n"; + +my $iorfile_admin = "admin.ior"; +my $iorfile = "server.ior"; + +#Files which used by server +my $server_iorfile = $server->LocalFile ($iorfile); +$server->DeleteFile($iorfile); + +#Files which used by client +my $client_iorfile = $client->LocalFile ($iorfile); +my $client_iorfile_admin = $client->LocalFile ($iorfile_admin); +$client->DeleteFile($iorfile); +$client->DeleteFile($iorfile_admin); + +#Files which used by admin +my $admin_iorfile_admin = $admin->LocalFile ($iorfile_admin); +$admin->DeleteFile($iorfile_admin); + +$AD = $admin->CreateProcess ("admin", + "-ORBdebuglevel $debug_level " . + "-o $admin_iorfile_admin"); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile"); + +$CL = $client->CreateProcess ("client", + "-k file://$client_iorfile " . + "-a file:://$client_iorfile_admin " . + "-c "); + +$admin_status = $AD->Spawn (); + +if ($admin_status != 0) { + print STDERR "ERROR: admin returned $admin_status\n"; + exit 1; +} -my $AD = 0; -if (PerlACE::is_vxworks_test()) { - $AD = new PerlACE::ProcessVX ("admin", "-o admin.ior"); +if ($admin->WaitForFileTimed ($iorfile_admin, + $admin->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$iorfile_admin>\n"; + $AD->Kill (); $AD->TimedWait (1); + exit 1; } -else { - $AD = new PerlACE::Process ("admin", "-o $admin_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -my $SV = new PerlACE::Process ("server", "-o $server_iorfile"); -my $CL = new PerlACE::Process ("client", - " -k file://$server_iorfile " - ."-a file://$admin_iorfile " - ."-c "); - -$AD->Spawn (); - -if (PerlACE::waitforfile_timed ($admin_iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$admin_iorfile>\n"; - $AD->Kill (); $AD->TimedWait (1); - exit 1; + +sub KillServers{ + $SV->Kill (); $SV->TimedWait (1); + $AD->Kill (); $AD->TimedWait (1); } -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorfile, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + KillServers(); + exit 1; +} -if (PerlACE::waitforfile_timed ($server_iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$server_iorfile>\n"; - $AD->Kill (); $AD->TimedWait (1); - $SV->Kill (); $SV->TimedWait (1); - exit 1; +if ($server->GetFile ($iorfile) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + KillServers(); + exit 1; +} +if ($client->PutFile ($iorfile) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + KillServers(); + exit 1; } -$client = $CL->SpawnWaitKill (30); +if ($admin->GetFile ($iorfile_admin) == -1) { + print STDERR "ERROR: cannot retrieve file <$admin_iorfile_admin>\n"; + KillServers(); + exit 1; +} +if ($client->PutFile ($iorfile_admin) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile_admin>\n"; + KillServers(); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 15); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $status = 1; } -$admin = $AD->WaitKill (10); +$admin_status = $AD->WaitKill ($admin->ProcessStopWaitInterval()); -if ($admin != 0) { - print STDERR "ERROR: admin returned $admin\n"; - $status = 1; +if ($admin_status != 0) { + print STDERR "ERROR: admin returned $admin_status\n"; + $status = 1; } -unlink $server_iorfile; -unlink $admin_iorfile; +$server->DeleteFile($iorfile); + +$client->DeleteFile($iorfile); +$client->DeleteFile($iorfile_admin); + +$admin->DeleteFile($iorfile_admin); exit $status; diff --git a/TAO/tests/BiDirectional/run_test_bug3282.pl b/TAO/tests/BiDirectional/run_test_bug3282.pl index 149d8ad0b4d..48099b32afc 100755 --- a/TAO/tests/BiDirectional/run_test_bug3282.pl +++ b/TAO/tests/BiDirectional/run_test_bug3282.pl @@ -1,50 +1,74 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; -$iorbase = "test.ior"; -$iorfile = PerlACE::LocalFile ("$iorbase"); +$debug_level = '0'; +$iterations = '100'; -unlink $iorfile; +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + +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"; + +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); -if (PerlACE::is_vxworks_test()) { - print STDERR "ERROR: this test cannot be run on VxWorks\n"; +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile -i $iterations"); +$CL = $client->CreateProcess ("client", "-k file://$client_iorfile"); +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -else { - $SV = new PerlACE::Process ("server", "-ORBEndpoint iiop://localhost -o $iorfile -i 100"); -} -$CL = new PerlACE::Process ("client", "-k file://$iorfile"); -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (20); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval()); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (20); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/tests/Bug_1020_Basic_Regression/run_test.pl b/TAO/tests/Bug_1020_Basic_Regression/run_test.pl index 059abd15ca2..d5aa1704cab 100755 --- a/TAO/tests/Bug_1020_Basic_Regression/run_test.pl +++ b/TAO/tests/Bug_1020_Basic_Regression/run_test.pl @@ -6,57 +6,83 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; +$status = 0; +$debug_level = '0'; -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); -} -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); +local $start_time = time(); +local $max_running_time = 300; # 5 minutes +local $elapsed = time() - $start_time; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } + if ($i eq '-quick') { + $elapsed = 0; + $max_running_time = 1; + } } -$CL = new PerlACE::Process ("client", "-k file://$iorfile"); -$SV->Spawn (); +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"; -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); $SV->TimedWait (1); +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); +$CL = $client->CreateProcess ("client", "-k file://$client_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -local $start_time = time(); -local $max_running_time = 300; # 5 minutes -local $elapsed = time() - $start_time; +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if ($ARGV[0] eq '-quick') { - $elapsed = 0; - $max_running_time = 1; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } print STDERR "elaped is $elapsed\n"; while($elapsed < $max_running_time) { print STDERR "**************************** \n"; - # Start all clients in parallel - $client = $CL->Spawn (); + # Start all clients in parallel + $client = $CL->Spawn (); - # ... wait for the clients to die unless they did not startup, - # ignore errors because they intentionally crash themselves! - $CL->WaitKill(30) unless $client < 0; + # ... wait for the clients to die unless they did not startup, + # ignore errors because they intentionally crash themselves! + $CL->WaitKill($server->ProcessStartWaitInterval() + 20) unless $client < 0; - $elapsed = time() - $start_time; + $elapsed = time() - $start_time; } -$server = $SV->TerminateWaitKill (10); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); exit $status; diff --git a/TAO/tests/Bug_1495_Regression/run_test.pl b/TAO/tests/Bug_1495_Regression/run_test.pl index a86ae9a27c8..2ad3bc713a0 100755 --- a/TAO/tests/Bug_1495_Regression/run_test.pl +++ b/TAO/tests/Bug_1495_Regression/run_test.pl @@ -6,45 +6,87 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$inputfile = PerlACE::LocalFile ("test.ior"); -$thrserverfile = PerlACE::LocalFile ("thr_server.ior"); - -unlink $inputfile; -unlink $thrserverfile; $status = 0; +$debug_level = '0'; -if (PerlACE::is_vxworks_test()) { - $CL = new PerlACE::ProcessVX ("client", "-o thr_server.ior -i test.ior"); -} -else { - $CL = new PerlACE::Process ("client", "-o $thrserverfile -i $inputfile"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -$SV = new PerlACE::Process ("server", "-o $inputfile -i file://$thrserverfile"); -$client = $CL->Spawn (); +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"; + + +my $iorbase = "test.ior"; +my $thrserverfile = "thr_server.ior"; + +my $server_iorbase = $server->LocalFile ($iorbase); +my $client_iorbase = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +my $server_thrserverfile = $server->LocalFile ($thrserverfile); +my $client_thrserverfile = $client->LocalFile ($thrserverfile); +$server->DeleteFile($thrserverfile); +$client->DeleteFile($thrserverfile); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorbase " . + "-i file://server_thrserverfile"); + +$CL = $client->CreateProcess ("client", + "-ORBdebuglevel $debug_level " . + "-o $client_thrserverfile" . + "-i $client_iorbase"); + +$client_status = $CL->Spawn (); -if (PerlACE::waitforfile_timed ($thrserverfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$thrserverfile>\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; exit 1; } -$server = $SV->SpawnWaitKill (30); +if ($client->WaitForFileTimed ($thrserverfile, + $client->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_thrserverfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -$client = $CL->WaitKill (5); +if ($client->GetFile ($thrserverfile) == -1) { + print STDERR "ERROR: cannot retrieve file <$client_thrserverfile>\n"; + $CL->Kill (); $CL->TimedWait (1); + exit 1; +} +if ($server->PutFile ($thrserverfile) == -1) { + print STDERR "ERROR: cannot set file <$server_thrserverfile>\n"; + $CL->Kill (); $CL->TimedWait (1); + exit 1; +} + +$server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 20); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($server_status != 0) { + print STDERR "ERROR: client returned $server_status\n"; $status = 1; } -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$client_status = $CL->WaitKill ($client->ProcessStopWaitInterval()); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -unlink $inputfile; -unlink $thrserverfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$server->DeleteFile($thrserverfile); +$client->DeleteFile($thrserverfile); exit $status; diff --git a/TAO/tests/Bug_1495_Regression/run_test_complex.pl b/TAO/tests/Bug_1495_Regression/run_test_complex.pl index c3e580f4f41..a9a64cfd335 100755 --- a/TAO/tests/Bug_1495_Regression/run_test_complex.pl +++ b/TAO/tests/Bug_1495_Regression/run_test_complex.pl @@ -6,58 +6,139 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$inputfile = PerlACE::LocalFile ("test.ior"); -$thrserverfile = PerlACE::LocalFile ("thr_server.ior"); -$middleserverfile = PerlACE::LocalFile ("middle.ior"); - -unlink $inputfile; -unlink $thrserverfile; -unlink $middleserverfile; $status = 0; +$debug_level = '0'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} -$CL = new PerlACE::Process ("client", "-i file://$inputfile -o $thrserverfile"); -$SV = new PerlACE::Process ("server", "-i file://$middleserverfile -o $inputfile"); -$ML = new PerlACE::Process ("server", "-i file://$thrserverfile -o $middleserverfile"); +#Schema of the interaction: +# 'Client' <---> 'Middle Server' <---> 'Server' + +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"; +my $middle = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n"; + +my $inputfile = "test.ior"; +my $thrserverfile = "thr_server.ior"; +my $middleserverfile = "middle.ior"; + +#Files which used by client +my $client_inputfile = $client->LocalFile ($inputfile); +my $client_thrserverfile = $client->LocalFile ($thrserverfile); +$client->DeleteFile($inputfile); +$client->DeleteFile($thrserverfile); + +#Files which used by server +my $server_inputfile = $server->LocalFile ($inputfile); +my $server_middleserverfile = $server->LocalFile ($middleserverfile); +$server->DeleteFile($inputfile); +$server->DeleteFile($middleserverfile); + +#Files which used by middle server +my $middle_thrserverfile = $middle->LocalFile ($thrserverfile); +my $middle_middleserverfile = $middle->LocalFile ($middleserverfile); +$middle->DeleteFile($middleserverfile); +$middle->DeleteFile($thrserverfile); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_inputfile " . + "-i file://$server_middleserverfile"); + +$CL = $client->CreateProcess ("client", + "-ORBdebuglevel $debug_level " . + "-i file://$client_inputfile" . + "-o $client_thrserverfile"); + +$ML = $middle->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-i file://$middle_thrserverfile " . + "-o $middle_middleserverfile"); + +$client_status = $CL->Spawn (); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + exit 1; +} -$CL->Spawn (); +if ($client->WaitForFileTimed ($thrserverfile, + $client->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$client_thrserverfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($thrserverfile, 2) == -1) { - print STDERR "ERROR: cannot find file <$thrserverfile>\n"; +if ($client->GetFile ($thrserverfile) == -1) { + print STDERR "ERROR: cannot retrieve file <$client_thrserverfile>\n"; + $CL->Kill (); $CL->TimedWait (1); + exit 1; +} +if ($middle->PutFile ($thrserverfile) == -1) { + print STDERR "ERROR: cannot set file <$middle_thrserverfile>\n"; + $CL->Kill (); $CL->TimedWait (1); exit 1; } -$ML->Spawn(); +$middle_status = $ML->Spawn (); -if (PerlACE::waitforfile_timed ($middleserverfile, 2) == -1) { - print STDERR "ERROR: cannot find file <$middleserverfile>\n"; +if ($middle_status != 0) { + print STDERR "ERROR: client returned <$middle_status>\n"; exit 1; } -$server = $SV->SpawnWaitKill (50); +if ($middle->WaitForFileTimed ($middleserverfile, + $client->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$middle_middleserverfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -$client = $CL->WaitKill (5); +if ($middle->GetFile ($middleserverfile) == -1) { + print STDERR "ERROR: cannot retrieve file <$middle_middleserverfile>\n"; + $CL->Kill (); $CL->TimedWait (1); + exit 1; +} +if ($server->PutFile ($middleserverfile) == -1) { + print STDERR "ERROR: cannot set file <$server_middleserverfile>\n"; + $CL->Kill (); $CL->TimedWait (1); + exit 1; +} -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +$server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 35); + +if ($server_status != 0) { + print STDERR "ERROR: client returned $server_status\n"; $status = 1; } -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +$client_status = $CL->WaitKill ($client->ProcessStopWaitInterval()); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$middle = $ML->WaitKill (5); +$middle_status = $ML->WaitKill ($middle->ProcessStopWaitInterval()); -if ($middle != 0) { - print STDERR "ERROR: middle server returned $server\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $middle_status\n"; $status = 1; } -unlink $inputfile; -unlink $thrserverfile; -unlink $middleserverfile; +$client->DeleteFile($inputfile); +$client->DeleteFile($thrserverfile); + +$server->DeleteFile($inputfile); +$server->DeleteFile($middleserverfile); + +$middle->DeleteFile($middleserverfile); +$middle->DeleteFile($thrserverfile); exit $status; diff --git a/TAO/tests/Bug_2289_Regression/run_test.pl b/TAO/tests/Bug_2289_Regression/run_test.pl index bdb1bfef6e6..dabd34e402f 100755 --- a/TAO/tests/Bug_2289_Regression/run_test.pl +++ b/TAO/tests/Bug_2289_Regression/run_test.pl @@ -3,60 +3,74 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' if 0; # $Id$ - # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; - -# The server IOR file -$server_ior_file = PerlACE::LocalFile ("server.ior"); -$client_ior_file = PerlACE::LocalFile ("client.ior"); -unlink $server_ior_file; -unlink $client_ior_file; - -# The client and server processes -if (PerlACE::is_vxworks_test()) { - $SERVER = new PerlACE::ProcessVX("server"); - $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGTHOST'}; -} -else { - $SERVER = new PerlACE::Process("server"); - $TARGETHOSTNAME = "127.0.0.1"; +use PerlACE::TestTarget; + +$status = 0; +$debug_level = '0'; +$dotted_decimal_addresses = '1'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -$CLIENT = new PerlACE::Process("client"); # We want the server to run on a fixed port $port = PerlACE::uniqueid () + 10001; # This can't be 10000 for Chorus 4.0 -$SERVER->Arguments("-ORBEndpoint iiop://:$port -ORBDottedDecimalAddresses 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"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +$server->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBEndpoint iiop://:$port " . + "-o $server_iorfile " . + "-ORBDottedDecimalAddresses $dotted_decimal_addresses "); + +$hostname = $client->HostName(); -# Fire up the server -$sv = $SERVER->Spawn(); +$CL = $client->CreateProcess ("client", + "-k corbaloc::$hostname:$port/collocated_ior_bound_in_remote_iortable " . + "-ORBCollocationStrategy thru_poa " . + "-ORBDottedDecimalAddresses $dotted_decimal_addresses "); -if ($sv != 0) { - print STDERR "ERROR: server returned $sv\n"; - exit 1; +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -# We can wait on the IOR file -if (PerlACE::waitforfile_timed ($server_ior_file, $PerlACE::wait_interval_for_process_creation) == -1) -{ - print STDERR "ERROR: cannot find $server_ior_file\n"; - $SERVER->Kill(); - exit 1; +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } -$CLIENT->Arguments("-k corbaloc::$TARGETHOSTNAME:$port/collocated_ior_bound_in_remote_iortable -ORBDottedDecimalAddresses 1 -ORBCollocationStrategy thru_poa"); -if ($CLIENT->SpawnWaitKill (60) != 0) -{ - print STDERR "ERROR: Bug 2289 Regression failed. Non zero result from client.\n"; - $SERVER->Kill(); - exit 1; +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); + +if ($client_status != 0) { + print STDERR "ERROR: Bug 2289 Regression failed. Client returned $client_status\n"; + $status = 1; } -# Clean up and return -$SERVER->TerminateWaitKill (15); -unlink $server_ior_file; -unlink $client_ior_file; -exit 0; +$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval()); + + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $status = 1; +} + +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +exit $status; diff --git a/TAO/tests/CallbackTest/run_test_ipv6.pl b/TAO/tests/CallbackTest/run_test_ipv6.pl index aa79fc0f693..66379cbf6a0 100755 --- a/TAO/tests/CallbackTest/run_test_ipv6.pl +++ b/TAO/tests/CallbackTest/run_test_ipv6.pl @@ -6,45 +6,78 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; $status = 0; +$debug_level = '0'; +$ipv6_only = '1'; -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBConnectIPV6Only 1"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile -ORBConnectIPV6Only 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"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile " . + "-ORBConnectIPV6Only $ipv6_only "); + +$CL = $client->CreateProcess ("client", + " -k file://$client_iorfile " . + "-ORBConnectIPV6Only $ipv6_only "); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBConnectIPV6Only 1"); -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (60); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); # The client crashes, therefore it normally exists with status != 0, # but a status of -1 would be a serious error. -if ($client == -1) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status == -1) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (60); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 45); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/tests/CallbackTest/run_test_mixed_ip.pl b/TAO/tests/CallbackTest/run_test_mixed_ip.pl index 98ce37093f5..6a0788e026d 100755 --- a/TAO/tests/CallbackTest/run_test_mixed_ip.pl +++ b/TAO/tests/CallbackTest/run_test_mixed_ip.pl @@ -6,45 +6,81 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; $status = 0; +$debug_level = '0'; -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior -ORBListenEndpoints iiop://[::1]"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile -ORBListenEndpoints iiop://[::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"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$hostname_server = $server->HostName(); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile " . + "-ORBListenEndpoints iiop://$hostname_server "); + +$hostname_client = $server->HostName(); + +$CL = $client->CreateProcess ("client", + " -k file://$client_iorfile " . + "-ORBListenEndpoints iiop://$hostname_client "); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -$CL = new PerlACE::Process ("client", " -k file://$iorfile -ORBListenEndpoints iiop://127.0.0.1"); -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (60); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); # The client crashes, therefore it normally exists with status != 0, # but a status of -1 would be a serious error. -if ($client == -1) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status == -1) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (60); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 45); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/tests/Crashed_Callback/run_test.pl b/TAO/tests/Crashed_Callback/run_test.pl index 0f97c117d96..93c809db6d8 100755 --- a/TAO/tests/Crashed_Callback/run_test.pl +++ b/TAO/tests/Crashed_Callback/run_test.pl @@ -6,45 +6,71 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; $status = 0; +$debug_level = '0'; -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); + +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"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); +$CL = $client->CreateProcess ("client", "-k file://$client_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -$CL = new PerlACE::Process ("client", " -k file://$iorfile"); -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; -} +} -$client = $CL->SpawnWaitKill (60); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); # The client crashes, therefore it normally exists with status != 0, # but a status of -1 would be a serious error. -if ($client == -1) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status == -1) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (210); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 200); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/tests/DIOP/run_test.pl b/TAO/tests/DIOP/run_test.pl index 2efa6f781e5..d17fb577bd5 100755 --- a/TAO/tests/DIOP/run_test.pl +++ b/TAO/tests/DIOP/run_test.pl @@ -1,61 +1,86 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; -# $Id$ +# $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$ORBdebuglevel = 0; +$status = 0; +$debug_level = '0'; + +$iterations = '10'; +$port = '8888'; +$timeout = '10'; foreach $i (@ARGV) { if ($i eq '-debug') { - $ORBdebuglevel = '10'; - } + $debug_level = '10'; + } } -$status = 0; -$iorbase = "test.ior"; -$iorfile = PerlACE::LocalFile ($iorbase); +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"; -if (PerlACE::is_vxworks_test()) { - $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGTHOST'}; - $SV = new PerlACE::ProcessVX ("server", "-ORBEndpoint diop://$TARGETHOSTNAME:8888 -o $iorbase -ORBdebuglevel $ORBdebuglevel"); -} -else { - $SV = new PerlACE::Process ("server", "-ORBEndpoint diop://:8888 -o $iorfile -ORBdebuglevel $ORBdebuglevel"); -} +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBEndpoint diop://:$port " . + "-o $server_iorfile"); -$CL = new PerlACE::Process ("client", "-k file://$iorfile -t 10 -i 10 -ORBdebuglevel $ORBdebuglevel"); +$CL = $client->CreateProcess ("client", + "-ORBdebuglevel $debug_level " . + "-k file://$client_iorfile " . + "-t $timeout -i $iterations"); -$server = $SV->Spawn (); +$server_status = $SV->Spawn (); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: could not find file <$iorfile>\n"; - $SV->Kill (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (90); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 75); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/tests/DIOP/run_test_ipv6.pl b/TAO/tests/DIOP/run_test_ipv6.pl index e28cb715d07..1f0d21877bc 100755 --- a/TAO/tests/DIOP/run_test_ipv6.pl +++ b/TAO/tests/DIOP/run_test_ipv6.pl @@ -1,56 +1,86 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; -# $Id$ +# $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$ORBdebuglevel = 0; +$status = 0; +$debug_level = '0'; + +$iterations = '10'; +$port = '8888'; +$timeout = '10'; +$hostname = '[::1]'; foreach $i (@ARGV) { if ($i eq '-debug') { - $ORBdebuglevel = '10'; - } + $debug_level = '10'; + } } -$status = 0; -$iorbase = "test.ior"; -$iorfile = PerlACE::LocalFile ($iorbase); +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"; -if (PerlACE::is_vxworks_test()) { - $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGTHOST'}; - $SV = new PerlACE::ProcessVX ("server", "-ORBEndpoint diop://$TARGETHOSTNAME:8888 -o $iorbase -ORBdebuglevel $ORBdebuglevel"); -} -else { - $SV = new PerlACE::Process ("server", "-ORBEndpoint diop://[::1]:8888 -o $iorfile -ORBdebuglevel $ORBdebuglevel"); -} +my $iorbase = "test.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-ORBEndpoint diop://$hostname:$port " . + "-o $server_iorfile"); -$CL = new PerlACE::Process ("client", "-k file://$iorfile -t 10 -i 10 -ORBdebuglevel $ORBdebuglevel"); +$CL = $client->CreateProcess ("client", + "-ORBdebuglevel $debug_level " . + "-k file://$client_iorfile " . + "-t $timeout -i $iterations"); -$SV->Spawn (); +$server_status = $SV->Spawn (); -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: could not find file <$iorfile>\n"; - $SV->Kill (); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; exit 1; } -$client = $CL->SpawnWaitKill (90); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 75); + +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (10); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval()); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/tests/MT_Timeout/run_test.pl b/TAO/tests/MT_Timeout/run_test.pl index cdadb01e543..6276710ff2f 100755 --- a/TAO/tests/MT_Timeout/run_test.pl +++ b/TAO/tests/MT_Timeout/run_test.pl @@ -6,43 +6,69 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$iorfilebase = "server.ior"; -$iorfile = PerlACE::LocalFile ("$iorfilebase"); -unlink $iorfile; $status = 0; +$debug_level = '0'; -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o $iorfilebase"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); + +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"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile"); +$CL = $client->CreateProcess ("client", "-k file://$client_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; } -$CL = new PerlACE::Process ("client", " -k file://$iorfile"); -$SV->Spawn (); +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($iorfile, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } -$client = $CL->SpawnWaitKill (300); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 285); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -$server = $SV->WaitKill (30); +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 20); -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); exit $status; diff --git a/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl b/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl index 5869485c4fa..d84559551a2 100755 --- a/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl +++ b/TAO/tests/NestedUpcall/Triangle_Test/run_test.pl @@ -1,30 +1,55 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; $status = 0; +$debug_level = '0'; -$ior1file = PerlACE::LocalFile ("servera.ior"); -$ior2file = PerlACE::LocalFile ("serverb.ior"); +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} -# Make sure these aren't hanging around -unlink $ior1file; -unlink $ior2file; +my $server_a = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +my $server_b = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; +my $client = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n"; -if (PerlACE::is_vxworks_test()) { - $SV1 = new PerlACE::ProcessVX ("server_A", "-o servera.ior"); -} -else { - $SV1 = new PerlACE::Process ("server_A", "-o $ior1file"); -} -$SV2 = new PerlACE::Process ("server_B", "-o $ior2file"); -$CL = new PerlACE::Process ("initiator", "-f $ior1file -g $ior2file"); +my $ior1file = "servera.ior"; +my $ior2file = "serverb.ior"; + +#Files which used by server_a +my $server_a_ior1file = $server_a->LocalFile ($ior1file); +$server_a->DeleteFile ($ior1file); + +#Files which used by server_b +my $server_b_ior2file = $server_b->LocalFile ($ior2file); +$server_b->DeleteFile ($ior2file); + +#Files which used by client +my $client_ior1file = $client->LocalFile ($ior1file); +my $client_ior2file = $client->LocalFile ($ior2file); +$client->DeleteFile($ior1file); +$client->DeleteFile($ior2file); + +$SV1 = $server_a->CreateProcess ("server_A", + "-ORBdebuglevel $debug_level " . + "-o $server_a_ior1file "); + +$SV2 = $server_b->CreateProcess ("server_B", + "-ORBdebuglevel $debug_level " . + "-o $server_b_ior2file "); + +$CL = $client->CreateProcess ("initiator", + "-ORBdebuglevel $debug_level " . + "-f $client_ior1file " . + "-g $client_ior2file "); $server_status = $SV1->Spawn (); @@ -40,43 +65,72 @@ if ($server_status != 0) { exit 1; } -if (PerlACE::waitforfile_timed ($ior1file, $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$ior1file>\n"; - $SV1->Kill (); - $SV2->Kill (); +sub KillServers{ + $SV1->Kill (); $SV1->TimedWait (1); + $SV2->Kill (); $SV2->TimedWait (1); +} + +if ($server_a->WaitForFileTimed ($ior1file, + $server_a->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_a_ior1file>\n"; + KillServers(); exit 1; } -if (PerlACE::waitforfile_timed ($ior2file, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$ior2file>\n"; - $SV2->Kill (); - $SV1->Kill (); +if ($server_b->WaitForFileTimed ($ior2file, + $server_b->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_b_ior2file>\n"; + KillServers(); exit 1; } -$client = $CL->SpawnWaitKill (60); -$server1 = $SV1->TerminateWaitKill (5); -$server2 = $SV2->TerminateWaitKill (5); +if ($server_a->GetFile ($ior1file) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_a_ior1file>\n"; + KillServers(); + exit 1; +} +if ($client->PutFile ($ior1file) == -1) { + print STDERR "ERROR: cannot set file <$client_ior1file>\n"; + KillServers(); + exit 1; +} -# Clean up -unlink $ior1file; -unlink $ior2file; +if ($server_b->GetFile ($ior2file) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_b_ior2file>\n"; + KillServers(); + exit 1; +} +if ($client->PutFile ($ior2file) == -1) { + print STDERR "ERROR: cannot set file <$client_ior2file>\n"; + KillServers(); + exit 1; +} + +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; +if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; $status = 1; } -if ($server1 != 0) { - print STDERR "ERROR: server 1 returned $server1\n"; +$server_status = $SV1->TerminateWaitKill ($server_a->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } -if ($server2 != 0) { - print STDERR "ERROR: server 2 returned $server2\n"; +$server_status = $SV2->TerminateWaitKill ($server_b->ProcessStopWaitInterval()); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; $status = 1; } +$server_a->DeleteFile ($ior1file); +$server_b->DeleteFile ($ior2file); +$client->DeleteFile($ior1file); +$client->DeleteFile($ior2file); + exit $status; diff --git a/TAO/tests/Single_Read/run_test.pl b/TAO/tests/Single_Read/run_test.pl index 176c7d6ee9c..302ad1a179f 100755 --- a/TAO/tests/Single_Read/run_test.pl +++ b/TAO/tests/Single_Read/run_test.pl @@ -1,27 +1,47 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; -$iorfile = PerlACE::LocalFile ("server.ior"); -$client_done_file = PerlACE::LocalFile ("client_done"); - -unlink $iorfile; -unlink $client_done_file; $status = 0; - -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); -} -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); +$debug_level = '0'; +$data_bytes = '10'; +$iterations = '10'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } } -$CL = new PerlACE::Process ("client", "-k file://$iorfile -d 10 -i 10 -x"); + +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"; + +my $iorbase = "server.ior"; +my $done_file = "client_done.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client_iorfile = $client->LocalFile ($iorbase); + +my $client_done_file = $client->LocalFile ($done_file); + +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); + +$client->DeleteFile($done_file); + +$SV = $server->CreateProcess ("server", + "-ORBdebuglevel $debug_level " . + "-o $server_iorfile " . + "-s $client_done_file"); + +$CL = $client->CreateProcess ("client", + "-k file://$client_iorfile " . + "-d $data_bytes -i $iterations -x"); $server_status = $SV->Spawn (); @@ -30,19 +50,29 @@ if ($server_status != 0) { exit 1; } -if (PerlACE::waitforfile_timed ($iorfile, - $PerlACE::wait_interval_for_process_creation) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; +if ($server->WaitForFileTimed ($iorbase, + $server->ProcessStartWaitInterval()) == -1) { + print STDERR "ERROR: cannot find file <$server_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } +if ($server->GetFile ($iorbase) == -1) { + print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} -$client = $CL->SpawnWaitKill (200); +$client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 185); -if ($client != 0) { +if ($client_status != 0) { $time = localtime; - print STDERR "ERROR: client returned $client at $time\n"; + print STDERR "ERROR: client returned $client_status at $time\n"; $status = 1; } @@ -50,15 +80,17 @@ open (FILE , ">$client_done_file"); print FILE "Client Done !\n"; close (FILE); -$server = $SV->WaitKill (400); -if ($server != 0) { +$server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 390); + +if ($server_status != 0) { $time = localtime; - print STDERR "ERROR: server returned $server at $time\n"; + print STDERR "ERROR: server returned $server_status at $time\n"; $status = 1; } -unlink $iorfile; -unlink $client_done_file; +$server->DeleteFile($iorbase); +$client->DeleteFile($iorbase); +$client->DeleteFile($done_file); exit $status; diff --git a/TAO/tests/Single_Read/server.cpp b/TAO/tests/Single_Read/server.cpp index e0b151a206a..bc3c4eb6698 100644 --- a/TAO/tests/Single_Read/server.cpp +++ b/TAO/tests/Single_Read/server.cpp @@ -7,11 +7,12 @@ ACE_RCSID(Timed_Buffered_Oneways, server, "$Id$") const ACE_TCHAR *ior_output_file = ACE_TEXT("ior"); +const ACE_TCHAR *client_done_file = ACE_TEXT("client_done.ior"); int parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("o:")); + ACE_Get_Opt get_opts (argc, argv, ACE_TEXT("o:s:")); int c; while ((c = get_opts ()) != -1) @@ -20,11 +21,15 @@ parse_args (int argc, ACE_TCHAR *argv[]) case 'o': ior_output_file = get_opts.opt_arg (); break; + case 's': + client_done_file = get_opts.opt_arg (); + break; case '?': default: ACE_ERROR_RETURN ((LM_ERROR, "usage: %s " "-o <iorfile>" + "-s <file_in_servant>" "\n", argv [0]), -1); @@ -55,7 +60,7 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) if (parse_args (argc, argv) != 0) return -1; - test_i servant (orb.in ()); + test_i servant (orb.in (), client_done_file); PortableServer::ObjectId_var id = root_poa->activate_object (&servant); diff --git a/TAO/tests/Single_Read/test_i.cpp b/TAO/tests/Single_Read/test_i.cpp index 2e055159cf6..0c8b541d1da 100644 --- a/TAO/tests/Single_Read/test_i.cpp +++ b/TAO/tests/Single_Read/test_i.cpp @@ -5,9 +5,10 @@ ACE_RCSID(Single_Read, test_i, "$Id$") -test_i::test_i (CORBA::ORB_ptr orb) +test_i::test_i (CORBA::ORB_ptr orb, const ACE_TCHAR *file_name) : orb_ (CORBA::ORB::_duplicate (orb)), - client_done_ (false) + client_done_ (false), + client_done_file_(file_name) { } @@ -21,7 +22,7 @@ test_i::method (CORBA::ULong request_number, if (!client_done_) { - FILE *input_file = ACE_OS::fopen ("client_done", "r"); + FILE *input_file = ACE_OS::fopen (client_done_file_, "r"); if (input_file == 0) { // Time required to process this request. diff --git a/TAO/tests/Single_Read/test_i.h b/TAO/tests/Single_Read/test_i.h index f923a31f3b6..c1218fe34a2 100644 --- a/TAO/tests/Single_Read/test_i.h +++ b/TAO/tests/Single_Read/test_i.h @@ -24,7 +24,7 @@ class test_i : public POA_test // Simple implementation. // public: - test_i (CORBA::ORB_ptr orb); + test_i (CORBA::ORB_ptr orb, const ACE_TCHAR *file_name); // ctor. // = The test interface methods. @@ -39,6 +39,7 @@ private: CORBA::Boolean client_done_; + const ACE_TCHAR *client_done_file_; }; #endif /* TAO_SINGLE_READ_TEST_I_H*/ |