Skip to content

Commit

Permalink
qa: Add test for #13829
Browse files Browse the repository at this point in the history
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 <bhubbard@redhat.com>
  • Loading branch information
badone committed Jan 29, 2016
1 parent 8b777a0 commit 994ac29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 7 additions & 0 deletions qa/workunits/cephtool/test.sh
Expand Up @@ -1647,6 +1647,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
Expand Down Expand Up @@ -1818,6 +1824,7 @@ MON_TESTS+=" mon_ping"
MON_TESTS+=" mon_deprecated_commands"
MON_TESTS+=" mon_caps"
OSD_TESTS+=" osd_bench"
OSD_TESTS+=" osd_negative_filestore_merge_threshold"
OSD_TESTS+=" tiering_agent"

MDS_TESTS+=" mds_tell"
Expand Down
8 changes: 0 additions & 8 deletions src/test/daemon_config.cc
Expand Up @@ -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<int>::max() + 1;
string str = boost::lexical_cast<string>(bad_value);
Expand Down

0 comments on commit 994ac29

Please sign in to comment.