From: Florian Forster Date: Tue, 9 Aug 2016 08:14:03 +0000 (+0200) Subject: ceph plugin: Really fix "parse_keys" test. X-Git-Tag: collectd-5.6.0~74 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7a65aadcc432d3341f5cca816c6a157b1b9d6116;p=collectd.git ceph plugin: Really fix "parse_keys" test. This reverts commit 9521a596cb88b044a2f08db53520edd6e15c8d39. --- diff --git a/src/ceph_test.c b/src/ceph_test.c index 59d1b4e0..91f084f7 100644 --- a/src/ceph_test.c +++ b/src/ceph_test.c @@ -154,12 +154,12 @@ DEF_TEST(parse_keys) const char *str; const char *want; } cases[] = { - {"WBThrottle.bytes_dirtied.description.bytes_wb.description.ios_dirtied.description.ios_wb.type", "WBThrottle.bytesDirtied.description.bytesWb.description.iosDirtied.description.iosWb"}, - {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "AaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}, + {"WBThrottle.bytes_dirtied.description.bytes_wb.description.ios_dirtied.description.ios_wb.type", "WBThrottle.bytesDirtied.description.bytesWb.description.iosDirt"}, + {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, {"foo:bar", "FooBar"}, {"foo:bar+", "FooBarPlus"}, {"foo:bar-", "FooBarMinus"}, - {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+", "AaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaPlus"}, + {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+", "AaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaPlus"}, {"aa.bb.cc.dd.ee.ff", "Aa.bb.cc.dd.ee.ff"}, {"aa.bb.cc.dd.ee.ff.type", "Aa.bb.cc.dd.ee.ff"}, {"aa.type", "Aa.type"}, @@ -169,7 +169,7 @@ DEF_TEST(parse_keys) for (i = 0; i < STATIC_ARRAY_SIZE (cases); i++) { - char got[DATA_MAX_NAME_LEN]; + char got[64]; CHECK_ZERO (parse_keys (got, sizeof (got), cases[i].str)); EXPECT_EQ_STR (cases[i].want, got);