[PATCH 0/8] tools: vsh: Fix validation of command parameter lists

Peter Krempa posted 8 patches 3 years, 5 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1605188395.git.pkrempa@redhat.com
tools/virsh.c |   1 +
tools/vsh.c   | 108 +++++++++++++++++++++-----------------------------
tools/vsh.h   |   1 -
3 files changed, 47 insertions(+), 63 deletions(-)
[PATCH 0/8] tools: vsh: Fix validation of command parameter lists
Posted by Peter Krempa 3 years, 5 months ago
Recent patch:

https://www.redhat.com/archives/libvir-list/2020-November/msg00555.html

passes build check but then virsh complains when started that the
command list is wrong.

Fix it by moving the check to the appropriate place.

You can use the above patch as reproducer.

Peter Krempa (8):
  tools: vsh: Unexport vshCmddefHelp
  tools: vshCmddefCheckInternals: Add parameter name to error message
  tools: vshCmddefCheckInternals: Port mandatory options check from
    vshCmddefOptParse
  tools: cmdSelfTest: Drop misleading comment
  tools: vshCmddefOptParse: Remove 'optional' command validation
  tools: vshCmddefHelp: Don't call vshCmddefOptParse
  tools: vshCmddefOptParse: Remove return value
  tools: virsh: Reset error when keepalive registration fails

 tools/virsh.c |   1 +
 tools/vsh.c   | 108 +++++++++++++++++++++-----------------------------
 tools/vsh.h   |   1 -
 3 files changed, 47 insertions(+), 63 deletions(-)

-- 
2.28.0

Re: [PATCH 0/8] tools: vsh: Fix validation of command parameter lists
Posted by Ján Tomko 3 years, 5 months ago
On a Thursday in 2020, Peter Krempa wrote:
>Recent patch:
>
>https://www.redhat.com/archives/libvir-list/2020-November/msg00555.html
>
>passes build check but then virsh complains when started that the
>command list is wrong.
>
>Fix it by moving the check to the appropriate place.
>
>You can use the above patch as reproducer.
>
>Peter Krempa (8):
>  tools: vsh: Unexport vshCmddefHelp
>  tools: vshCmddefCheckInternals: Add parameter name to error message
>  tools: vshCmddefCheckInternals: Port mandatory options check from
>    vshCmddefOptParse
>  tools: cmdSelfTest: Drop misleading comment
>  tools: vshCmddefOptParse: Remove 'optional' command validation
>  tools: vshCmddefHelp: Don't call vshCmddefOptParse
>  tools: vshCmddefOptParse: Remove return value
>  tools: virsh: Reset error when keepalive registration fails
>
> tools/virsh.c |   1 +
> tools/vsh.c   | 108 +++++++++++++++++++++-----------------------------
> tools/vsh.h   |   1 -
> 3 files changed, 47 insertions(+), 63 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano