On 02/03/2014 10:42 PM, [email protected] wrote: > Hi! >>> + /* restore the original pipe size*/ >>> + TEST(fcntl(test_fd, F_SETPIPE_SZ, orig_pipe_size)); >>> + if (TEST_RETURN < 0) { >>> + tst_brkm(TFAIL | TTERRNO, cleanup, "fcntl " >>> + "restore orignal pipe size failed"); >> There is a small logic error here. You say that the test >> has exactly one testcase but if we get here the test >> will print passed then failed which would indicate that >> there are two testcases. >> >> What I would do instead is to set the size to new pipe >> size on even iteration s and original pipe size on odd >> iterations. >> > But then we would have to abort on first failure, because in case the > fcntl() failed to change the size but exited with succes the output from > the test would be failed, passed, failed, passed... > > Other options are changing the tst_brkm to TBROK in this case, or > opening new pipe for each iteration.
Sorry for late reply. It seems that opening new pipe for each iteration is reasonable. Thanks, Xiaoguang Wang > ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
