summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-05-11 15:45:44 +0000
committerjilles <jilles@FreeBSD.org>2013-05-11 15:45:44 +0000
commitbe2bfc68fd41b5efd65c981699e2c55b0a7a63fb (patch)
treee5b8c750bfe6ae604b281b047a80b7045030d6fc /tools
parent9966fe08a798262c6161751502ef532c09c4f81d (diff)
downloadFreeBSD-src-be2bfc68fd41b5efd65c981699e2c55b0a7a63fb.zip
FreeBSD-src-be2bfc68fd41b5efd65c981699e2c55b0a7a63fb.tar.gz
Add missing argument to fcntl(F_DUPFD) in regression test.
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/file/dup/dup.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/regression/file/dup/dup.c b/tools/regression/file/dup/dup.c
index b0d9af2..73302d6 100644
--- a/tools/regression/file/dup/dup.c
+++ b/tools/regression/file/dup/dup.c
@@ -144,9 +144,13 @@ main(int __unused argc, char __unused *argv[])
printf("ok %d - dup2(2) didn't clear close-on-exec\n", test);
/* Does fcntl(F_DUPFD) work? */
- if ((fd2 = fcntl(fd1, F_DUPFD)) < 0)
+ if ((fd2 = fcntl(fd1, F_DUPFD, 10)) < 0)
err(1, "fcntl(F_DUPFD)");
- printf("ok %d - fcntl(F_DUPFD) works\n", ++test);
+ if (fd2 < 10)
+ printf("not ok %d - fcntl(F_DUPFD) returned wrong fd %d\n",
+ ++test, fd2);
+ else
+ printf("ok %d - fcntl(F_DUPFD) works\n", ++test);
/* Was close-on-exec cleared? */
++test;
OpenPOWER on IntegriCloud