Commit 10f2e0fe authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'fd-dup-test-robusty' into 'master'

Fix fd dup tests to be more robust

See merge request redox-os/relibc!251
parents c6e3cb8e a1c35107
fd 4 duped into fd 5
duped fd is 1 greater than the original fd
fd 4 duped into fd 5
duped fd is 1 greater than the original fd
......@@ -19,7 +19,7 @@ int main(void) {
int newfd2 = fcntl(newfd, F_DUPFD, 0);
// TODO: The standard doesn't define errors for F_DUPFD
printf("fd %d duped into fd %d\n", newfd, newfd2);
printf("duped fd is %d greater than the original fd\n", newfd2 - newfd);
int c1 = close(newfd);
ERROR_IF(close, c1, == -1);
......
......@@ -17,7 +17,7 @@ int main(void) {
ERROR_IF(dup, fd2, == -1);
UNEXP_IF(dup, fd2, < 0);
printf("fd %d duped into fd %d\n", fd1, fd2);
printf("duped fd is %d greater than the original fd\n", fd2 - fd1);
int c1 = close(fd1);
ERROR_IF(close, c1, == -1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment