ACK: [PATCH] uefirtvariable: setvariable without deleting the original variable (LP: #1354301)

Keng-Yu Lin keng-yu.lin at canonical.com
Wed Aug 13 06:46:01 UTC 2014


On Mon, Aug 11, 2014 at 10:26 AM, Alex Hung <alex.hung at canonical.com> wrote:
> On 08/08/2014 05:59 PM, Ivan Hu wrote:
>> The setvariable_test2 tests the UEFI setvariable runtime service with the
>> same and different variable data. When doing the test, it should exist the
>> original variable on the system, the original variable should not be deleted.
>>
>> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
>> ---
>>  src/uefi/uefirtvariable/uefirtvariable.c |   14 ++------------
>>  1 file changed, 2 insertions(+), 12 deletions(-)
>>
>> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
>> index 21a8cbc..6a22c80 100644
>> --- a/src/uefi/uefirtvariable/uefirtvariable.c
>> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
>> @@ -1012,35 +1012,25 @@ static int setvariable_test2(fwts_framework *fw, uint16_t *varname)
>>       if (ret != FWTS_OK)
>>               goto err_restore_env1;
>>
>> -     ret = setvariable_insertvariable(fw, attributes, 0,
>> -             varname, &gtestguid1, datadiff1);
>> -     if (ret != FWTS_OK)
>> -             return ret;
>> -
>>       /* insert different data */
>>       datasize = 20;
>>
>>       ret = setvariable_insertvariable(fw, attributes, datasize,
>>               varname, &gtestguid1, datadiff2);
>>       if (ret != FWTS_OK)
>> -             return ret;
>> +             goto err_restore_env1;
>>
>>       ret = setvariable_checkvariable(fw, datasize, varname,
>>               &gtestguid1, datadiff2);
>>       if (ret != FWTS_OK)
>>               goto err_restore_env2;
>>
>> -     ret = setvariable_insertvariable(fw, attributes, 0,
>> -             varname, &gtestguid1, datadiff2);
>> -     if (ret != FWTS_OK)
>> -             return ret;
>> -
>>       datasize = 5;
>>
>>       ret = setvariable_insertvariable(fw, attributes, datasize,
>>               varname, &gtestguid1, datadiff3);
>>       if (ret != FWTS_OK)
>> -             return ret;
>> +             goto err_restore_env2;
>>
>>       ret = setvariable_checkvariable(fw, datasize, varname,
>>               &gtestguid1, datadiff3);
>>
>
>
> Acked-by: Alex Hung <alex.hung at canonical.com>
>

Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list