tests/kvargs: fix to consider empty elements as valid
authorOlivier Matz <olivier.matz@6wind.com>
Wed, 25 Mar 2020 15:05:03 +0000 (16:05 +0100)
committerOlivier Matz <olivier.matz@6wind.com>
Wed, 25 Mar 2020 16:32:20 +0000 (17:32 +0100)
commit65d69b07e3d38884cab4fcad86430fe50a6a96be
tree4b07dc18531b652080638169f984d47fe6f9ab4d
parentbcf789da7335b80e792ba926b5a95a12fa2e1e9a
tests/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 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>
app/test/test_kvargs.c