|
From: | Eric Blake |
Subject: | Re: [Qemu-block] [PATCH v2 10/36] test-qemu-opts: Test qemu_opts_to_qdict_filtered() |
Date: | Thu, 22 Feb 2018 08:24:16 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/22/2018 03:50 AM, Kevin Wolf wrote:
+ opts = qemu_opts_parse(&opts_list_01, "str1=foo,str2=,str3=bar,number1=42", + false, &error_abort);Worth any additional craziness in regards to our QemuOpts parsing, like str1=foo,,bar,str2... for an option containing commas, or str2=,str1=foo, for supplying options in a different order than the list? But what you have is a good addition even if you don't tweak it.This is not a test for parsing options string, but for converting an already existing QemuOpts to a QDict. Parsing is already extensively tested in /qemu-opts/opts_parse/*. I'm only using qemu_opts_parse() here because it's the most convenient way to create a QemuOpts with multiple options. So the only things we need to consider in this test case are different QemuOpts that result from the parsing. Escaped commas don't exist in this representation any more and the associated QemuOptsList isn't involved in the conversion to QDicts, so these wouldn't actually be new cases for the thing we're testing here.
Alright, you've convinced me that this isn't the test to be hammering on QemuOpts.
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |