qemu-option: Fix has_help_option()'s sloppy parsing

has_help_option() uses its own parser.  It's inconsistent with
qemu_opts_parse(), as demonstrated by test-qemu-opts case
/qemu-opts/has_help_option.  Fix by reusing the common parser.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200415074927.19897-5-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Markus Armbruster 2020-04-15 09:49:22 +02:00
parent 933d152778
commit 80a9485573
2 changed files with 21 additions and 22 deletions

View file

@ -749,8 +749,8 @@ static void test_has_help_option(void)
{ "a=0,?,b", true, true, true },
{ "help,b=1", true, true, false },
{ "?,b=1", true, true, false },
{ "a,b,,help", false /* BUG */, true, true },
{ "a,b,,?", false /* BUG */, true, true },
{ "a,b,,help", true, true, true },
{ "a,b,,?", true, true, true },
};
int i;
QemuOpts *opts;