From be2bfc68fd41b5efd65c981699e2c55b0a7a63fb Mon Sep 17 00:00:00 2001 From: jilles Date: Sat, 11 May 2013 15:45:44 +0000 Subject: Add missing argument to fcntl(F_DUPFD) in regression test. --- tools/regression/file/dup/dup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools/regression/file') 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; -- cgit v1.1