Re: [kvm-unit-tests PATCH 1/9] s390x: uv: Tolerate 0x100 query return code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/22/21 11:12 AM, Claudio Imbrenda wrote:
> On Wed, 22 Sep 2021 07:18:03 +0000
> Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:
> 
>> RC 0x100 is not an error but a notice that we could have gotten more
>> data from the Ultravisor if we had asked for it. So let's tolerate
>> them in our tests.
>>
>> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
>> ---
>>  s390x/uv-guest.c | 4 ++--
>>  s390x/uv-host.c  | 2 +-
>>  2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/s390x/uv-guest.c b/s390x/uv-guest.c
>> index f05ae4c3..e7446e03 100644
>> --- a/s390x/uv-guest.c
>> +++ b/s390x/uv-guest.c
>> @@ -70,8 +70,8 @@ static void test_query(void)
>>  	report(cc == 1 && uvcb.header.rc == UVC_RC_INV_LEN, "length");
>>  
>>  	uvcb.header.len = sizeof(uvcb);
>> -	cc = uv_call(0, (u64)&uvcb);
>> -	report(cc == 0 && uvcb.header.rc == UVC_RC_EXECUTED, "successful query");
>> +	uv_call(0, (u64)&uvcb);
>> +	report(uvcb.header.rc == UVC_RC_EXECUTED || uvcb.header.rc
>> == 0x100, "successful query");
> 
> if you want to be even more pedantic:
> 	report(cc == 0 && uvcb.header.rc == UVC_RC_EXECUTED ||
> 		cc == 1 && uvcb.header.rc == 0x100, ... 

Yeah I pondered about that but at the end I chose to drop the cc check

> 
>>  
>>  	/*
>>  	 * These bits have been introduced with the very first
>> diff --git a/s390x/uv-host.c b/s390x/uv-host.c
>> index 28035707..66a11160 100644
>> --- a/s390x/uv-host.c
>> +++ b/s390x/uv-host.c
>> @@ -401,7 +401,7 @@ static void test_query(void)
>>  
>>  	uvcb_qui.header.len = sizeof(uvcb_qui);
>>  	uv_call(0, (uint64_t)&uvcb_qui);
>> -	report(uvcb_qui.header.rc == UVC_RC_EXECUTED, "successful query");
>> +	report(uvcb_qui.header.rc == UVC_RC_EXECUTED || uvcb_qui.header.rc == 0x100, "successful query");
> 
> same here
> 
>>  
>>  	for (i = 0; cmds[i].name; i++)
>>  		report(uv_query_test_call(cmds[i].call_bit), "%s", cmds[i].name);
> 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux