Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys make this work
details: https://anonhg.NetBSD.org/src/rev/fb480a3c9418
branches: trunk
changeset: 770755:fb480a3c9418
user: christos <christos%NetBSD.org@localhost>
date: Mon Oct 31 21:30:16 2011 +0000
description:
make this work
diffstat:
tests/lib/libc/sys/t_pipe2.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 648a30fb8665 -r fb480a3c9418 tests/lib/libc/sys/t_pipe2.c
--- a/tests/lib/libc/sys/t_pipe2.c Mon Oct 31 21:00:39 2011 +0000
+++ b/tests/lib/libc/sys/t_pipe2.c Mon Oct 31 21:30:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_pipe2.c,v 1.1 2011/10/31 15:41:31 christos Exp $ */
+/* $NetBSD: t_pipe2.c,v 1.2 2011/10/31 21:30:16 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_pipe2.c,v 1.1 2011/10/31 15:41:31 christos Exp $");
+__RCSID("$NetBSD: t_pipe2.c,v 1.2 2011/10/31 21:30:16 christos Exp $");
#include <atf-c.h>
#include <fcntl.h>
@@ -49,12 +49,12 @@
{
int fd[2], i;
- while ((i = open("/", O_RDONLY < 3)) < 3)
+ while ((i = open("/", O_RDONLY)) < 3)
ATF_REQUIRE(i != -1);
ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
- ATF_REQUIRE(pipe2(fd, 0) == 0);
+ ATF_REQUIRE(pipe2(fd, flags) == 0);
ATF_REQUIRE(fd[0] == 3);
ATF_REQUIRE(fd[1] == 4);
@@ -67,7 +67,7 @@
ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0);
}
- if (flags & O_CLOEXEC) {
+ if (flags & O_NONBLOCK) {
ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0);
ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) != 0);
} else {
Home |
Main Index |
Thread Index |
Old Index