cmd_status_t expected_status;
cmd_type_t expected_type;
} parse_data[] = {
/* Valid FLUSH commands. */
{
"FLUSH",
cmd_status_t expected_status;
cmd_type_t expected_type;
} parse_data[] = {
/* Valid FLUSH commands. */
{
"FLUSH",
/* Missing 'identifier' key. */
"FLUSH myhost/magic/MAGIC",
/* Missing 'identifier' key. */
"FLUSH myhost/magic/MAGIC",
CMD_PARSE_ERROR,
CMD_UNKNOWN,
},
{
/* Invalid identifier. */
"FLUSH identifier=invalid",
CMD_PARSE_ERROR,
CMD_UNKNOWN,
},
{
/* Invalid identifier. */
"FLUSH identifier=invalid",
/* Valid GETVAL commands. */
{
"GETVAL myhost/magic/MAGIC",
/* Valid GETVAL commands. */
{
"GETVAL myhost/magic/MAGIC",
* As of collectd 5.x, PUTVAL accepts invalid options.
{
"PUTVAL myhost/magic/MAGIC invalid=2 1234:42",
* As of collectd 5.x, PUTVAL accepts invalid options.
{
"PUTVAL myhost/magic/MAGIC invalid=2 1234:42",
- status = cmd_parse (input, &cmd, &err);
+ status = cmd_parse (input, &cmd, parse_data[i].opts, &err);
- "cmd_parse (\"%s\") = %d (type=%d [%s]); want %d (type=%d [%s])",
- parse_data[i].input, status,
+ "cmd_parse (\"%s\", opts=%p) = %d (type=%d [%s]); want %d (type=%d [%s])",
+ parse_data[i].input, parse_data[i].opts, status,
cmd.type, CMD_TO_STRING (cmd.type),
parse_data[i].expected_status,
parse_data[i].expected_type,
cmd.type, CMD_TO_STRING (cmd.type),
parse_data[i].expected_status,
parse_data[i].expected_type,