Merge branch 'fd-dup-test-robusty' into 'master'
Fix fd dup tests to be more robust See merge request redox-os/relibc!251
This commit is contained in:
@@ -1 +1 @@
|
||||
fd 4 duped into fd 5
|
||||
duped fd is 1 greater than the original fd
|
||||
|
||||
@@ -1 +1 @@
|
||||
fd 4 duped into fd 5
|
||||
duped fd is 1 greater than the original fd
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+1
-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);
|
||||
|
||||
Reference in New Issue
Block a user