]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests/crimson: don't be so verbose when run by the 'make check' bot. 43209/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 17 Sep 2021 14:09:28 +0000 (14:09 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 17 Sep 2021 16:00:42 +0000 (16:00 +0000)
This commit is a try to balance crimson's debug facilities with overwhelming
some hosts the `make check` bot runs on with huge number of log entries;
see https://jenkins.ceph.com/job/ceph-pull-requests-arm64/17127/ for an
exemplification of the problem.

This is achieved by differentiating debug levels depending upon the
`FOR_MAKE_CHECK` env variable. It's a hack / a makeshift solution
only. IMHO ultimately we should introduce a dedicated target for
the bot while leaving `ninja test` for humans which would allow for more
debugs and maybe also for running `vstart.sh`-dependent tests.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
run-make-check.sh
src/test/crimson/gtest_seastar.cc

index 9f5b8dfd9faa5ace4ee1735742c8acc9d12aacff..85d58a3d310c490e5081da2a4178fe7ecc122323 100755 (executable)
@@ -102,7 +102,7 @@ function main() {
     configure "$cmake_opts" "$@"
     build tests
     echo "make check: successful build on $(git rev-parse HEAD)"
-    run
+    FOR_MAKE_CHECK=1 run
 }
 
 main "$@"
index 2fd5e39fab8f819dc4a7c3ee0e212f3a7e90b8d2..175a744c765dd5e8f47c758817dfe6206ff2c5cd 100644 (file)
@@ -1,6 +1,9 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
+#include <cstdlib>
+#include <iostream>
+
 #include "include/ceph_assert.h"
 #include "gtest_seastar.h"
 
@@ -16,9 +19,16 @@ int main(int argc, char **argv)
 
   seastar_test_suite_t::seastar_env.init(argc, argv);
 
-  seastar::global_logger_registry().set_all_loggers_level(
-    seastar::log_level::debug
-  );
+  // HACK: differntiate between the `make check` bot and human user
+  // for the sake of log flooding
+  if (std::getenv("FOR_MAKE_CHECK")) {
+    std::cout << "WARNING: bumping log level skipped due to FOR_MAKE_CHECK!"
+              << std::endl;
+  } else {
+    seastar::global_logger_registry().set_all_loggers_level(
+      seastar::log_level::debug
+    );
+  }
 
   seastar_test_suite_t::seastar_env.run([] {
     return crimson::common::sharded_conf().start(