Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143810030
D52799.id163122.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
816 B
Referenced Files
None
Subscribers
None
D52799.id163122.diff
View Options
diff --git a/tests/sys/file/closefrom_test.c b/tests/sys/file/closefrom_test.c
--- a/tests/sys/file/closefrom_test.c
+++ b/tests/sys/file/closefrom_test.c
@@ -148,7 +148,7 @@
/* We'd better start up with fd's 0, 1, and 2 open. */
start = devnull();
- if (start == -1)
+ if (start < 3)
fail("open", "bad descriptor %d", start);
ok("open");
@@ -159,9 +159,9 @@
ok("highest_fd");
/* Try to use closefrom() for just closing fd 3. */
- closefrom(start + 1);
+ closefrom(start);
fd = highest_fd();
- if (fd != start)
+ if (fd != start - 1)
fail("closefrom", "highest fd %d", fd);
ok("closefrom");
@@ -169,7 +169,7 @@
for (i = 0; i < 16; i++)
(void)devnull();
fd = highest_fd();
- if (fd != start + 16)
+ if (fd != start + 15)
fail("open 16", "highest fd %d", fd);
ok("open 16");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 1, 2:48 PM (3 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28393680
Default Alt Text
D52799.id163122.diff (816 B)
Attached To
Mode
D52799: closefrom_test: Fix the first test
Attached
Detach File
Event Timeline
Log In to Comment