]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: log the RLIMIT_NOFILE that we set when running this test 40038/head
authorJeff Layton <jlayton@redhat.com>
Thu, 11 Mar 2021 18:35:45 +0000 (13:35 -0500)
committerJeff Layton <jlayton@redhat.com>
Thu, 11 Mar 2021 18:47:23 +0000 (13:47 -0500)
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 <jlayton@redhat.com>
src/test/libcephfs/test.cc

index e74e99740979423051760268f1641f8a6cfc1e61..b6bcf75d5317d2f23ab0d96e747d85fcd1e814e6 100644 (file)
@@ -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)