diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-30 10:03:58 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-11-30 10:03:58 +0000 |
commit | e6cc67104d57669f906094582911e63de87028e5 (patch) | |
tree | 1e31bb7fc2ab61eeaf2b980abaefab91a7952292 /TAO/tests/Nested_Upcall_Crash | |
parent | 93f5c2373f105917e4a4c560a1e1dfd7bbbabc0e (diff) | |
download | ATCD-e6cc67104d57669f906094582911e63de87028e5.tar.gz |
Mon Nov 30 10:01:49 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/default_configuration.pl:
* orbsvcs/performance-tests/LoadBalancing/LBPerf/RPS/run_test.pl:
* orbsvcs/performance-tests/LoadBalancing/LBPerf/CPU/default_configuration.pl:
* orbsvcs/tests/Simple_Naming/run_test.pl:
* orbsvcs/tests/Security/InsecureReferences/run_test.pl:
* orbsvcs/tests/Security/MT_IIOP_SSL/run_test.pl:
* orbsvcs/tests/Security/Bug_1107_Regression/run_test.pl:
* orbsvcs/tests/Security/Crash_Test/run_test.pl:
* orbsvcs/tests/Security/MT_SSLIOP/run_test_harsh.pl:
* orbsvcs/tests/Security/MT_SSLIOP/run_test_heavy.pl:
* orbsvcs/tests/Security/MT_SSLIOP/run_test.pl:
* orbsvcs/tests/AVStreams/Component_Switching/run_test.pl:
* orbsvcs/tests/AVStreams/Full_Profile/run_test.pl:
* orbsvcs/tests/AVStreams/Bidirectional_Flows/run_test.pl:
* orbsvcs/tests/AVStreams/Simple_Two_Stage_With_QoS/run_test.pl:
* orbsvcs/tests/AVStreams/Latency/run_test.pl:
* orbsvcs/tests/AVStreams/Asynch_Three_Stage/run_test.pl:
* orbsvcs/tests/AVStreams/Pluggable/run_test.pl:
* orbsvcs/tests/AVStreams/Simple_Three_Stage/run_test.pl:
* orbsvcs/tests/AVStreams/Simple_Two_Stage/run_test.pl:
* orbsvcs/tests/AVStreams/Multiple_Flows/run_test.pl:
* orbsvcs/tests/AVStreams/Multicast/run_test.pl:
* orbsvcs/tests/AVStreams/Multicast_Full_Profile/run_test.pl:
* orbsvcs/tests/AVStreams/Modify_QoS/run_test.pl:
* orbsvcs/tests/AVStreams/Pluggable_Flow_Protocol/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_all.pl:
* orbsvcs/tests/Notify/performance-tests/RedGreen/run_test.pl:
* orbsvcs/tests/Notify/XML_Persistence/run_test.pl:
* orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl:
* orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl:
* orbsvcs/tests/InterfaceRepo/Duplicate_Typedef_Test/run_test.pl:
* orbsvcs/tests/InterfaceRepo/Latency_Test/run_test.pl:
* orbsvcs/tests/InterfaceRepo/IFR_Self_Recursive_IDL_Test/run_test.pl:
* performance-tests/POA/Implicit_Activation/run_test.pl:
* performance-tests/RTCorba/Multiple_Endpoints/Single_Endpoint/run-test.pl:
* performance-tests/RTCorba/Multiple_Endpoints/Orb_Per_Priority/run-test.pl:
* performance-tests/Callback/run_test.pl:
* performance-tests/Latency/AMH_Single_Threaded/run_test.pl:
* performance-tests/Cubit/TAO/MT_Cubit/run_test.pl:
* performance-tests/Cubit/TAO/DII_Cubit/run_test.pl:
* performance-tests/Cubit/TAO/IDL_Cubit/run_test.pl:
* tests/Big_Twoways/run_test.pl:
* tests/Bug_2918_Regression/run_test.pl:
* tests/Strategies/run_test.pl:
* tests/Bug_1482_Regression/run_test.pl:
* tests/Portable_Interceptors/Benchmark/run_test.pl:
* tests/Xt_Stopwatch/run_test.pl:
* tests/Multiple/run_test.pl:
* tests/CSD_Strategy_Tests/Broken/run_test.pl:
* tests/CSD_Strategy_Tests/TP_Test_4/run_test.pl:
* tests/Oneway_Timeouts/client.cpp:
* tests/Oneway_Timeouts/server.cpp:
* tests/Oneway_Timeouts/run_test.pl:
* tests/Smart_Proxies/Policy/server.cpp:
* tests/Smart_Proxies/Policy/run_test.pl:
* tests/Bug_1270_Regression/run_test.pl:
* tests/Parallel_Connect_Strategy/run_test.pl:
* tests/Muxed_GIOP_Versions/run_test.pl:
* tests/Connect_Strategy_Test/run_test.pl:
* tests/Big_Oneways/run_test.pl:
* tests/Bug_1627_Regression/server.cpp:
* tests/Bug_1627_Regression/run_test.pl:
* tests/InterOp-Naming/run_test.pl:
* tests/Nested_Upcall_Crash/run_test.pl:
* tests/Bug_1269_Regression/client.cpp:
* tests/Bug_1269_Regression/run_test.pl:
Test are converted to use new test framework
and added to fuzz build.
Diffstat (limited to 'TAO/tests/Nested_Upcall_Crash')
-rwxr-xr-x | TAO/tests/Nested_Upcall_Crash/run_test.pl | 160 |
1 files changed, 120 insertions, 40 deletions
diff --git a/TAO/tests/Nested_Upcall_Crash/run_test.pl b/TAO/tests/Nested_Upcall_Crash/run_test.pl index 9016c5b9288..0fa85f16cf2 100755 --- a/TAO/tests/Nested_Upcall_Crash/run_test.pl +++ b/TAO/tests/Nested_Upcall_Crash/run_test.pl @@ -6,66 +6,146 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; - -$iorfile = PerlACE::LocalFile ("server.ior"); -unlink $iorfile; - -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); -} -else { - $SV = new PerlACE::Process ("server", "-o $iorfile"); +use PerlACE::TestTarget; + +$status = 0; +$debug_level = '0'; +$quick = 0; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } elsif ($i eq '-quick') { + $quick = 1; + } } -$CL1 = new PerlACE::Process ("client", "-k file://$iorfile"); -$CL2 = new PerlACE::Process ("client", "-k file://$iorfile"); -$CL3 = new PerlACE::Process ("client", "-k file://$iorfile"); -$server_spawn = $SV->Spawn (); +my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +my $client1 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; +my $client2 = PerlACE::TestTarget::create_target (3) || die "Create target 3 failed\n"; +my $client3 = PerlACE::TestTarget::create_target (4) || die "Create target 4 failed\n"; + +my $iorbase = "server.ior"; +my $server_iorfile = $server->LocalFile ($iorbase); +my $client1_iorfile = $client1->LocalFile ($iorbase); +my $client2_iorfile = $client2->LocalFile ($iorbase); +my $client3_iorfile = $client3->LocalFile ($iorbase); +$server->DeleteFile($iorbase); +$client1->DeleteFile($iorbase); +$client2->DeleteFile($iorbase); +$client3->DeleteFile($iorbase); + +$SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level ". + "-o $server_iorfile"); +$CL1 = $client1->CreateProcess ("client", "-k file://$client1_iorfile"); +$CL2 = $client2->CreateProcess ("client", "-k file://$client2_iorfile"); +$CL3 = $client3->CreateProcess ("client", "-k file://$client3_iorfile"); + +$server_status = $SV->Spawn (); + +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + exit 1; +} -if ($server_spawn != 0) { - print STDERR "ERROR: server returned $server\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 (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 ($client1->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client1_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client2->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client2_iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} +if ($client3->PutFile ($iorbase) == -1) { + print STDERR "ERROR: cannot set file <$client3_iorfile>\n"; $SV->Kill (); $SV->TimedWait (1); exit 1; } local $start_time = time(); -local $max_running_time = 600; # 10 minutes +local $max_running_time = 600; # 5 minutes local $elapsed = time() - $start_time; -if ($ARGV[0] eq '-quick') { +if ($quick) { $elapsed = 0; $max_running_time = 1; } while($elapsed < $max_running_time) { - # Start all clients in parallel - $client1 = $CL1->Spawn (); - $client2 = $CL2->Spawn (); - $client3 = $CL3->Spawn (); - - # ... wait for the clients to die unless they did not startup, - # ignore errors because they intentionally crash themselves! - $CL3->WaitKill(30) unless $client3 < 0; - $CL2->WaitKill(30) unless $client2 < 0; - $CL1->WaitKill(30) unless $client1 < 0; - - $elapsed = time() - $start_time; + $client_status = $CL1->Spawn ($client1->ProcessStartWaitInterval() + 45); + if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; + } + + $client_status = $CL2->Spawn ($client2->ProcessStartWaitInterval() + 45); + if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $SV->Kill (); $SV->TimedWait (1); + $CL1->Kill (); $CL1->TimedWait (1); + exit 1; + } + + $client_status = $CL3->Spawn ($client3->ProcessStartWaitInterval() + 45); + if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $SV->Kill (); $SV->TimedWait (1); + $CL1->Kill (); $CL1->TimedWait (1); + $CL2->Kill (); $CL2->TimedWait (1); + exit 1; + } + + $client_status = $CL1->WaitKill ($client1->ProcessStopWaitInterval() + 15); + if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $CL2->Kill (); $CL2->TimedWait (1); + $CL3->Kill (); $CL3->TimedWait (1); + exit 1; + } + + $client_status = $CL2->WaitKill ($client2->ProcessStopWaitInterval() + 15); + if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + $CL3->Kill (); $CL3->TimedWait (1); + exit 1; + } + + $client_status = $CL3->WaitKill ($client3->ProcessStopWaitInterval() + 15); + if ($client_status != 0) { + print STDERR "ERROR: client returned $client_status\n"; + exit 1; + } + + $elapsed = time() - $start_time; } -$server = $SV->TerminateWaitKill (10); - -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; +$server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval()); +if ($server_status != 0) { + print STDERR "ERROR: server returned $server_status\n"; + $CL1->Kill (); $CL1->TimedWait (1); + $CL2->Kill (); $CL2->TimedWait (1); + $CL3->Kill (); $CL3->TimedWait (1); + exit 1; } -unlink $iorfile; +$server->DeleteFile($iorbase); +$client1->DeleteFile($iorbase); +$client2->DeleteFile($iorbase); +$client3->DeleteFile($iorbase); exit $status; |