All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Wang xiaoguang <wangxg.fnst@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net, Mike Frysinger <vapier@gentoo.org>
Subject: Re: [LTP] [PATCH 1/3] fcntl/fcntl29.c: add F_DUPFD_CLOEXEC test for fcntl(2)
Date: Thu, 05 Dec 2013 13:29:32 +0800	[thread overview]
Message-ID: <52A00F3C.8040607@cn.fujitsu.com> (raw)
In-Reply-To: <201312050024.50466.vapier@gentoo.org>

On 12/05/2013 01:24 PM, Mike Frysinger wrote:
> On Wednesday 04 December 2013 22:43:33 Xiaoguang Wang wrote:
>> +#if defined(F_DUPFD_CLOEXEC)
>> ...
>> +#else
>> +
>> +int main(int ac, char **av)
>> +{
>> +	tst_brkm(TCONF, NULL, "This test can only run on kernels"
>> +		 "that are 2.6.24 and higher");
>> +}
>> +#endif
> 
> an ifdef test on a define provided by the C library is not a good marker to 
> control kernel version functionality
> 
>> +			TEST(fcntl(test_fd, F_DUPFD_CLOEXEC, dup_fd));
>> +			if (TEST_RETURN < 0) {
>> +				tst_brkm(TFAIL | TTERRNO, cleanup, "fcntl "
>> +					 "test F_DUPFD_CLOEXEC failed");
>> +			}
> 
> what happens when you run this on an older kernel ?  should you be doing a 
> runtime kernel version test here ?

Yeah, why not use "tst_kvercmp()" here?

Thanks,
Wanlong Gao

> -mike
> 
> 
> 
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK 
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> 
> 
> 
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 


------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2013-12-05  5:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-05  3:43 [LTP] [PATCH 1/3] fcntl/fcntl29.c: add F_DUPFD_CLOEXEC test for fcntl(2) Xiaoguang Wang
2013-12-05  5:24 ` Mike Frysinger
2013-12-05  5:29   ` Wanlong Gao [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-12-05 11:41 Xiaoguang Wang

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=52A00F3C.8040607@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vapier@gentoo.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.