summaryrefslogtreecommitdiff
path: root/unit/atf-src/atf-run/user_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unit/atf-src/atf-run/user_test.cpp')
-rw-r--r--unit/atf-src/atf-run/user_test.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/unit/atf-src/atf-run/user_test.cpp b/unit/atf-src/atf-run/user_test.cpp
index c48377b8..7218ba65 100644
--- a/unit/atf-src/atf-run/user_test.cpp
+++ b/unit/atf-src/atf-run/user_test.cpp
@@ -1,7 +1,7 @@
//
// Automated Testing Framework (atf)
//
-// Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
+// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -82,6 +82,14 @@ ATF_TEST_CASE_BODY(is_member_of_group)
std::cout << "Last GID is " << maxgid << "\n";
}
+ const gid_t maxgid_limit = 1 << 16;
+ if (maxgid > maxgid_limit) {
+ std::cout << "Test truncated from " << maxgid << " groups to "
+ << maxgid_limit << " to keep the run time reasonable "
+ "enough\n";
+ maxgid = maxgid_limit;
+ }
+
for (gid_t g = 0; g <= maxgid; g++) {
if (groups.find(g) == groups.end()) {
std::cout << "Checking if user does not belong to group "