On 11/03/2010 09:23 AM, Jinxin Zheng wrote:
> On 11/03/2010 03:07 PM, Jason Wang wrote:
>> Jinxin Zheng writes:
>> > Hi,
>> >
>> > Is there any way to delete an existing option in the kvm test config
>> file?
>> >
>> > I mean, something like this:
>> >
>> > --
>> > key1 = value1
>> > key2 = value2
>> > key3 = value3
>> >
>> > variants:
>> > - one:
>> > key1 = Hello World
>> > unset key2<--- delete the option only in this dict.
>> > - two:
>> >
>>
>> I'm not sure but does
>>
>> key2 =
>>
>> works?
>>
>
> Thank you. This sets the option empty but does not delete the option.
If that isn't good enough, you should probably modify the test you're
using to use the parameter only if it evaluates as true, e.g.
if params.get("key2"):
do_something(params.get("key2"))
This way empty values will be considered as though they are unset.
If this is impossible (perhaps "" is a valid value for the parameter),
then we can easily add an 'unset' command to the config parser.
Mind if I ask which test you're running?
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest