From: Robert W. <ro...@us...> - 2003-01-20 19:21:38
|
Thanks for the patch Sundar, I patched the CVS version and it will be included in the Feb release. - Robbie Robert V. Williamson <ro...@us...> Linux Test Project IBM Linux Technology Center Phone: (512) 838-9295 T/L: 678-9295 Fax: (512) 838-4603 http://ltp.sourceforge.net ==================== "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." -Albert Einstein "V.R.Sundar" <vr_sundar@attbi. To: Robert Williamson/Austin/IBM@IBMUS com> cc: ltp...@li... Subject: [PATCH] Re: sendfile02 (was:Re: [LTP] Modularized gzip'd tarballs 01/19/2003 10:18 created....) PM Robbie, The patch for sendfile02 is attached. (1) Call create_server from within do_sendfile so that a child is forked for each test iteration. (2) Don't wait for child in case of a sendfile error. kill child in case of error. (3) Fixed small errors in waitpid and recvfrom let me know if you have any problems. sundar On Wed, 2003-01-15 at 10:36, Robert Williamson wrote: > Sundar, > > I think the second way is better overall. Although delivery of the > packet has nothing to do with the correctness of sendfile, some users of > this test also use it to test their networking. > > - Robbie > > Robert V. Williamson <ro...@us...> > Linux Test Project > IBM Linux Technology Center > Phone: (512) 838-9295 T/L: 678-9295 > Fax: (512) 838-4603 > http://ltp.sourceforge.net > ==================== > "Only two things are infinite, the universe and human stupidity, and I'm > not sure about the former." -Albert Einstein > > > > "V.R.Sundar" > <vr_...@at...> To: ltp...@li..., Dan Kegel <da...@ke...> > Sent by: cc: > ltp...@li...ur Subject: sendfile02 (was:Re: [LTP] Modularized gzip'd tarballs created....) > ceforge.net > > > 01/15/2003 01:44 AM > > > > > > On Mon, 2003-01-13 at 23:15, Dan Kegel wrote: > > Incidentally, the [or a] LTP sendfile > > test creates a child process for no reason... > > and continues to work on the 2nd, 3rd, and 4th > > calls to its test function even though > > the test function kills the child after > > the 1st one. No need to have a recipient for > > UDP packets, is there? (This is all hearsay... > > Vasan Sundar noticed this, and can say more.) > > The parent creates only one child process (which waits for a udp packet > and exits when it has received it) but loops 4 times, each time sending > a packet and waiting for the child to exit . After the first time, the > one child has already exited and further waitpids return with -1 and > ECHILD (there is a small bug that makes it return with EFAULT right > now). This is not the right thing to do but doesn't affect the test > result. The test returns success if sendfile succeeds - the child's > return value is not checked. > > The main problem though is the error handling if sendfile fails the > first time. The parent goes on to wait for the child. But the child is > waiting for data which doesn't come as sendfile failed. So both go on > waiting forever. This is what happens on the ppc405 - sendfile fails > with EINVAL for some reason. > > I would like to fix this by changing the testcase to not fork at all and > then remove the waitpids. The socket used in sendfile is UDP so we don't > need a recipient. ( thats what happens now 75% of the time anyway). The > child does not check the data received and the parent doesn't test the > child's return code. What we lose is the indication that a packet was > delivered which anyway is not guaranteed and has nothing to do with > whether sendfile fails/succeeds > > The other alternative would be to fork the correct number of children, > modify the error checking to kill the child on error and exit directly. > Additionally maybe add some checking on the child and/or parent side for > the data or return code. > > sundar > -- > V.R.Sundar <vr_...@at...> > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Take your first step towards giving > your online business a competitive advantage. Test-drive a Thawte SSL > certificate - our easy online guide will show you how. Click here to get > started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en > _______________________________________________ > Ltp-list mailing list > Ltp...@li... > https://lists.sourceforge.net/lists/listinfo/ltp-list > > > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: A Thawte Code Signing Certificate > is essential in establishing user confidence by providing assurance of > authenticity and code integrity. Download our Free Code Signing guide: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en > _______________________________________________ > Ltp-list mailing list > Ltp...@li... > https://lists.sourceforge.net/lists/listinfo/ltp-list -- V.R.Sundar <vr_...@at...> #### sendfile.patch has been removed from this note on January 20, 2003 by Robert Williamson |