Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148427944
D48275.1786801285.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48275.1786801285.diff
View Options
diff --git a/lib/libc/tests/nss/getgr_test.c b/lib/libc/tests/nss/getgr_test.c
--- a/lib/libc/tests/nss/getgr_test.c
+++ b/lib/libc/tests/nss/getgr_test.c
@@ -293,6 +293,8 @@
int (*cb)(struct group *, void *))
{
struct group *grp;
+ const int limit = 1024;
+ int count = 0;
setgroupent(1);
while ((grp = getgrent()) != NULL) {
@@ -303,6 +305,8 @@
} else {
return (-1);
}
+ if (++count >= limit)
+ break;
}
endgrent();
diff --git a/lib/libc/tests/nss/getpw_test.c b/lib/libc/tests/nss/getpw_test.c
--- a/lib/libc/tests/nss/getpw_test.c
+++ b/lib/libc/tests/nss/getpw_test.c
@@ -240,6 +240,8 @@
int (*cb)(struct passwd *, void *))
{
struct passwd *pwd;
+ const int limit = 1024;
+ int count = 0;
setpassent(1);
while ((pwd = getpwent()) != NULL) {
@@ -250,6 +252,8 @@
} else {
return (-1);
}
+ if (++count >= limit)
+ break;
}
endpwent();
diff --git a/lib/libc/tests/nss/getserv_test.c b/lib/libc/tests/nss/getserv_test.c
--- a/lib/libc/tests/nss/getserv_test.c
+++ b/lib/libc/tests/nss/getserv_test.c
@@ -283,6 +283,8 @@
servent_fill_test_data(struct servent_test_data *td)
{
struct servent *serv;
+ const int limit = 1024;
+ int count = 0;
setservent(1);
while ((serv = getservent()) != NULL) {
@@ -290,6 +292,8 @@
TEST_DATA_APPEND(servent, td, serv);
else
return (-1);
+ if (++count >= limit)
+ break;
}
endservent();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 15, 1:41 PM (3 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29410616
Default Alt Text
D48275.1786801285.diff (1 KB)
Attached To
Mode
D48275: Fix lib/libc/nss/getgr_test with large numbers of groups
Attached
Detach File
Event Timeline
Log In to Comment