summaryrefslogtreecommitdiffstats
path: root/src/subprocess_test.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-03-09 22:50:30 (GMT)
committerNico Weber <nicolasweber@gmx.de>2015-03-09 22:50:30 (GMT)
commitc48737974f4de3b1883e6a9335b47bdbfc10700f (patch)
tree05bb4897f09c0a72c785ee4fdd90b75b1b680f2d /src/subprocess_test.cc
parent7370c00c22777786f7f311a45630e3482c4a19e7 (diff)
parentde57020bd1f2bf4781c14375ed1717a44cac8016 (diff)
downloadNinja-c48737974f4de3b1883e6a9335b47bdbfc10700f.zip
Ninja-c48737974f4de3b1883e6a9335b47bdbfc10700f.tar.gz
Ninja-c48737974f4de3b1883e6a9335b47bdbfc10700f.tar.bz2
Merge pull request #917 from pinotree/rlimit
subprocess_test: gracefully handle rlim.rlim_cur < kNumProcs
Diffstat (limited to 'src/subprocess_test.cc')
-rw-r--r--src/subprocess_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/subprocess_test.cc b/src/subprocess_test.cc
index 76f5c6c..1838c43 100644
--- a/src/subprocess_test.cc
+++ b/src/subprocess_test.cc
@@ -202,8 +202,8 @@ TEST_F(SubprocessTest, SetWithLots) {
// 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;
}