From: Jeff Layton Date: Thu, 11 Mar 2021 18:35:45 +0000 (-0500) Subject: test: log the RLIMIT_NOFILE that we set when running this test X-Git-Tag: v17.1.0~2592^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f25c940be148b2289029d6c95587a3c45f2094b4;p=ceph.git test: log the RLIMIT_NOFILE that we set when running this test We've been seeing some test failures because we hit RLIMIT_NOFILE in some tests. Start having it log the rlimit we're setting before spawning threads. Note that this doesn't really fix anything, but we're hoping it will help us rule some out some possible causes. Fixes: https://tracker.ceph.com/issues/49559 Signed-off-by: Jeff Layton --- diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc index e74e99740979..b6bcf75d5317 100644 --- a/src/test/libcephfs/test.cc +++ b/src/test/libcephfs/test.cc @@ -2036,6 +2036,10 @@ TEST(LibCephFS, ShutdownRace) ASSERT_EQ(getrlimit(RLIMIT_NOFILE, &rold), 0); rnew = rold; rnew.rlim_cur = rnew.rlim_max; + + cout << "Setting RLIMIT_NOFILE from " << rold.rlim_cur << + " to " << rnew.rlim_cur << std::endl; + ASSERT_EQ(setrlimit(RLIMIT_NOFILE, &rnew), 0); for (int i = 0; i < nthreads; ++i)