Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 May 2013 15:45:45 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250512 - head/tools/regression/file/dup
Message-ID:  <201305111545.r4BFjjE8049253@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305111545.r4BFjjE8049253>