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: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to