diff options
Diffstat (limited to 'performance-tests/UDP')
-rwxr-xr-x | performance-tests/UDP/run_test.pl | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/performance-tests/UDP/run_test.pl b/performance-tests/UDP/run_test.pl index 4515cd8c3d8..638b8c18c99 100755 --- a/performance-tests/UDP/run_test.pl +++ b/performance-tests/UDP/run_test.pl @@ -7,26 +7,28 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use lib '../../bin'; use PerlACE::Run_Test; -use Cwd; -my $SV = new PerlACE::Process ("udp_test", "-r"); +$SV = new PerlACE::Process ("udp_test", "-r"); +$CL = new PerlACE::Process ("udp_test", "-t -n 10000 localhost"); + +$status = 0; $SV->Spawn (); sleep 5; -$CL = new PerlACE::Process ("udp_test", " -t -n 10000 localhost"); - -$CL->Spawn (60); +$client = $CL->SpawnWaitKill (60); -$client = $CL->WaitKill (60); $server = $SV->WaitKill (5); -unlink $iorfile; +if ($server != 0) { + print "ERROR: server returned $server\n"; + $status = 1; +} -if ($server != 0 || $client != 0) { - print "ERROR: non-zero status returned by the server or client\n"; - exit 1; +if ($client != 0) { + print "ERROR: client returned $client\n"; + $status = 1; } -exit 0; +exit $status; |