svn commit: r250512 - head/tools/regression/file/dup

Jilles Tjoelker jilles at FreeBSD.org
Sat May 11 15:45:45 UTC 2013


Author: jilles
Date: Sat May 11 15:45:44 2013
New Revision: 250512
URL: http://svnweb.freebsd.org/changeset/base/250512

Log:
  Add missing argument to fcntl(F_DUPFD) in regression test.

Modified:
  head/tools/regression/file/dup/dup.c

Modified: head/tools/regression/file/dup/dup.c
==============================================================================
--- head/tools/regression/file/dup/dup.c	Sat May 11 13:46:05 2013	(r250511)
+++ head/tools/regression/file/dup/dup.c	Sat May 11 15:45:44 2013	(r250512)
@@ -144,9 +144,13 @@ main(int __unused argc, char __unused *a
 		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;


More information about the svn-src-head mailing list