public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v2 2/3] fcntl/fcntl30.c: add F_SETPIPE_SZ, F_GETPIPE_SZ test for fcntl(2)
Date: Mon, 3 Feb 2014 15:42:44 +0100	[thread overview]
Message-ID: <20140203144244.GC3996@rei> (raw)
In-Reply-To: <20140203143643.GB3996@rei>

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.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2014-02-03 14:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 10:02 [LTP] [PATCH v2 1/3] fcntl/fcntl29.c: add F_DUPFD_CLOEXEC test for fcntl(2) Xiaoguang Wang
2014-01-21 10:02 ` [LTP] [PATCH v2 2/3] fcntl/fcntl30.c: add F_SETPIPE_SZ, F_GETPIPE_SZ " Xiaoguang Wang
2014-02-03 14:36   ` chrubis
2014-02-03 14:42     ` chrubis [this message]
2014-01-21 10:02 ` [LTP] [PATCH v2 3/3] fcntl/fcntl31.c: add I/O availability signals " Xiaoguang Wang
2014-01-21 10:57   ` Xiaoguang Wang
2014-02-03 17:08   ` chrubis
     [not found]     ` <532BC78F.9050208@cn.fujitsu.com>
2014-03-24 13:41       ` chrubis
2014-02-03 14:29 ` [LTP] [PATCH v2 1/3] fcntl/fcntl29.c: add F_DUPFD_CLOEXEC " chrubis
2014-02-12  9:39   ` [LTP] [PATCH v3] " Xiaoguang Wang
2014-02-18  9:05     ` Wanlong Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140203144244.GC3996@rei \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=wangxg.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox