All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 1/3] fcntl/fcntl29.c: add F_DUPFD_CLOEXEC test for fcntl(2)
Date: Thu, 5 Dec 2013 00:24:49 -0500	[thread overview]
Message-ID: <201312050024.50466.vapier@gentoo.org> (raw)
In-Reply-To: <529FF665.9000004@cn.fujitsu.com>


[-- Attachment #1.1: Type: Text/Plain, Size: 702 bytes --]

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 ?
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 279 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2013-12-05  5:24 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 [this message]
2013-12-05  5:29   ` Wanlong Gao
  -- 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=201312050024.50466.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=ltp-list@lists.sourceforge.net \
    /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.