From: Loic Dachary Date: Tue, 7 Jan 2014 15:49:44 +0000 (+0100) Subject: common: fix large output in unittest_daemon_config X-Git-Tag: v0.77~40^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1052%2Fhead;p=ceph.git common: fix large output in unittest_daemon_config All tests in daemon_config use the global g_ceph_context object. Introducing an expansion loop in it will impact all tests and generate a very large output. Remove the SubstitutionLoop test case which is also covered in test/common/test_config.cc. Signed-off-by: Loic Dachary --- diff --git a/src/test/daemon_config.cc b/src/test/daemon_config.cc index 54b334edf500..3e6dc4927e8b 100644 --- a/src/test/daemon_config.cc +++ b/src/test/daemon_config.cc @@ -101,26 +101,6 @@ TEST(DaemonConfig, SubstitutionBracesTrailing) { ASSERT_EQ(string("barfoo"), string(buf)); } -TEST(DaemonConfig, SubstitutionLoop) { - int ret; - ret = g_ceph_context->_conf->set_val("internal_safe_to_start_threads", "false"); - ret = g_ceph_context->_conf->set_val("host", "foo$public_network", false); - ASSERT_EQ(ret, 0); - ret = g_ceph_context->_conf->set_val("public_network", "bar$host", false); - ASSERT_EQ(ret, 0); - g_ceph_context->_conf->apply_changes(NULL); - char buf[128], buf2[128]; - memset(buf, 0, sizeof(buf)); - memset(buf2, 0, sizeof(buf2)); - char *tmp = buf; - char *tmp2 = buf; - ret = g_ceph_context->_conf->get_val("host", &tmp, sizeof(buf)); - ASSERT_EQ(ret, 0); - ret = g_ceph_context->_conf->get_val("public_network", &tmp2, sizeof(buf)); - ASSERT_EQ(ret, 0); - ASSERT_TRUE(strchr(buf, '$') || strchr(buf2, '$')); -} - // config: variable substitution happen only once http://tracker.ceph.com/issues/7103 TEST(DaemonConfig, SubstitutionMultiple) { int ret;