Instead of expecting that the number of open files is well above
kNumProcs, simply "skip" the test in that case, still printing the
message about the test limit (adding the current system limit too).
// Make sure [ulimit -n] isn't going to stop us from working.
rlimit rlim;
ASSERT_EQ(0, getrlimit(RLIMIT_NOFILE, &rlim));
- if (!EXPECT_GT(rlim.rlim_cur, kNumProcs)) {
- printf("Raise [ulimit -n] well above %u to make this test go\n", kNumProcs);
+ if (rlim.rlim_cur < kNumProcs) {
+ printf("Raise [ulimit -n] well above %u (currently %lu) to make this test go\n", kNumProcs, rlim.rlim_cur);
return;
}