From: Brad Hubbard Date: Wed, 27 Jan 2016 01:34:47 +0000 (+1000) Subject: qa: Add test for #13829 X-Git-Tag: v0.94.8~4^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3a30ffc21a5edd52726867302da6b358f93aa8dc;p=ceph.git qa: Add test for #13829 qa/workunits/cephtool/test.sh: add test for setting negative int options src/test/daemon_config.cc: remove tests for failed negative values Fixes: #13829 Signed-off-by: Brad Hubbard (cherry picked from commit 994ac2942d04584d1617e6d4bbd5b880b1ea0448) --- diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 08d4b04d73b66..d13c222820a15 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -1471,6 +1471,12 @@ function test_osd_bench() ceph tell osd.0 bench 104857600 2097152 } +function test_osd_negative_filestore_merge_threshold() +{ + $SUDO ceph daemon osd.0 config set filestore_merge_threshold -1 + expect_config_value "osd.0" "filestore_merge_threshold" -1 +} + function test_mon_tell() { ceph tell mon.a version @@ -1556,6 +1562,7 @@ MON_TESTS+=" mon_tell" MON_TESTS+=" mon_crushmap_validation" OSD_TESTS+=" osd_bench" +OSD_TESTS+=" osd_negative_filestore_merge_threshold" OSD_TESTS+=" tiering_agent" MDS_TESTS+=" mds_tell" diff --git a/src/test/daemon_config.cc b/src/test/daemon_config.cc index 6d32e150ccc49..6187ee56b6241 100644 --- a/src/test/daemon_config.cc +++ b/src/test/daemon_config.cc @@ -338,14 +338,6 @@ TEST(DaemonConfig, ThreadSafety1) { } TEST(DaemonConfig, InvalidIntegers) { - { - int ret = g_ceph_context->_conf->set_val("num_client", "-1"); - ASSERT_EQ(ret, -EINVAL); - } - { - int ret = g_ceph_context->_conf->set_val("num_client", "-1K"); - ASSERT_EQ(ret, -EINVAL); - } { long long bad_value = (long long)std::numeric_limits::max() + 1; string str = boost::lexical_cast(bad_value);