diff options
| author | Jilles Tjoelker <jilles@FreeBSD.org> | 2013-05-11 15:45:44 +0000 |
|---|---|---|
| committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2013-05-11 15:45:44 +0000 |
| commit | 316ed7ca36b3c762662d446c1395611437dd9c73 (patch) | |
| tree | e5b8c750bfe6ae604b281b047a80b7045030d6fc /tools/regression/file | |
| parent | 290b7b224af3574644610aaa0668f82110ae8834 (diff) | |
Notes
Diffstat (limited to 'tools/regression/file')
| -rw-r--r-- | tools/regression/file/dup/dup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/regression/file/dup/dup.c b/tools/regression/file/dup/dup.c index b0d9af2fa9ff..73302d62384f 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; |
