test/kvargs: fix to consider empty elements as valid
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 27 Mar 2020 08:09:53 +0000 (09:09 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 27 Mar 2020 16:03:31 +0000 (17:03 +0100)
commit55fa01f7edfc9d2fa5af57ffb8991750fbdb1528
tree5bdb9645bee89cdc333729b74c1d28c82183b2f2
parent241e67bfecf11fc964711a642bb8447d5f501b12
test/kvargs: fix to consider empty elements as valid

Empty elements passed to the kvargs parser are silently
ignored. Examples of valid strings:
  ""
  ","
  ",,,,,,key=val,,,,"

Fix the unit tests to conform to this behavior.

Note: the test_invalid_kvargs() function is currently broken, which
explain why the tests were not failing. It is fixed in the next commit.

Fixes: e495f5435524 ("kvargs: add test case in app/test")
Cc: stable@dpdk.org
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
app/test/test_kvargs.c