mbox series

[v3,0/2] fix uncallable unit tests (Bugzilla 1002)

Message ID 20220610142406.580943-1-bruce.richardson@intel.com (mailing list archive)
Headers
Series fix uncallable unit tests (Bugzilla 1002) |

Message

Bruce Richardson June 10, 2022, 2:24 p.m. UTC
  The dump* unit tests are uncallable from our test framework because the command
validation in the unit test binary is incorrect. Rather than trying to fix this
directly in the binary, a better approach is to add command validation to the
cmdline library - which already has 99% of what we need already - and use that
from the test app.

Patch fix not CC'ed to stable, as fix requires new function in cmdline library.


V3:
 * Fix feedback from Olivier's review
 * Fix typo in spelling of "binary" (binrary) in patch 2 commit log

V2:
* Fix checkpatch issues

Bruce Richardson (2):
  cmdline: add function to verify valid commands
  test: use cmdline library to validate args

 app/test/commands.c         | 11 -----------
 app/test/test.c             | 24 +++++++-----------------
 lib/cmdline/cmdline_parse.c | 28 ++++++++++++++++++++--------
 lib/cmdline/cmdline_parse.h | 17 +++++++++++++++--
 lib/cmdline/version.map     |  3 +++
 5 files changed, 45 insertions(+), 38 deletions(-)

--
2.34.1
  

Comments

David Marchand June 13, 2022, 9:22 a.m. UTC | #1
On Fri, Jun 10, 2022 at 4:24 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> The dump* unit tests are uncallable from our test framework because the command
> validation in the unit test binary is incorrect. Rather than trying to fix this
> directly in the binary, a better approach is to add command validation to the
> cmdline library - which already has 99% of what we need already - and use that
> from the test app.
>
> Patch fix not CC'ed to stable, as fix requires new function in cmdline library.

Series applied, thanks Bruce.