Hello All,

I am trying to automate my testing using SIPp and Ethereal. My requirement
is that both Sipp and ethereal have to run in parallel.
I use PERL to do this. I have attached a piece of pseudo code herewith.

In my attachement $tc.xml is an XML file involving a sip scenario and
sipfield.txt contains the necessary ip address and user id.

Problem:  The $? exit code that obtain in the code is wrong.

Please let me know what the problem could be. Also how to obtain the correct
exit code of SIPp in this case.

Thanks in advance,
Venki
.........
$parent = $$;
  
#This child starts ethereal

    defined ($ethkid = fork) or die "can not fork: $!\n";
    if ($kid == 0){
       exec "/home/testdir/ethereal -a duration:25 -k -i eth0 -R sip -w 
scenario.cap -Q";
   }

#This child starts Sipp

  defined ($sippkid = fork) or die "can not fork: $!\n";
   if($kid == 0){
         exec "./sipp -sf $tc $ip_proxy -m 1 -t $proto -nr -inf sipfield.txt 
-trace_stat -trace_msg -bg 2>&1";           
   }

#This is parent process
   GetPsData($sippkid);
 .................................
sub GetPsData{
   waitpid($_[0], 0);
    my $check = $? >> 8;
    print " sipp exit code is $?;
........
}
   




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to