public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Steffen Eiden <seiden@linux.ibm.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	David Hildenbrand <david@redhat.com>,
	kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v2 3/4] s390x: uv-guest: remove duplicated checks
Date: Tue, 8 Feb 2022 15:57:13 +0100	[thread overview]
Message-ID: <0b28bd4b-cc4e-38a0-5cfe-c50c2bd70067@linux.ibm.com> (raw)
In-Reply-To: <20220203173143.57c488e5@p-imbrenda>



On 2/3/22 17:31, Claudio Imbrenda wrote:
> On Thu,  3 Feb 2022 09:19:34 +0000
> Steffen Eiden <seiden@linux.ibm.com> wrote:
> 
>> Removing some tests which are done at other points in the code
>> implicitly.

[...]
>>
>> diff --git a/s390x/uv-guest.c b/s390x/uv-guest.c
>> index 44ad2154..97ae4687 100644
>> --- a/s390x/uv-guest.c
>> +++ b/s390x/uv-guest.c
>> @@ -69,23 +69,15 @@ static void test_query(void)
>>   	cc = uv_call(0, (u64)&uvcb);
>>   	report(cc == 1 && uvcb.header.rc == UVC_RC_INV_LEN, "length");
>>   
>> -	uvcb.header.len = sizeof(uvcb);
>> -	cc = uv_call(0, (u64)&uvcb);
>> -	report((!cc && uvcb.header.rc == UVC_RC_EXECUTED) ||
>> -	       (cc == 1 && uvcb.header.rc == 0x100),
>> -		"successful query");
>> -
> 
> ok fair enough, an unsuccessful query would have caused an assert in
> the setup code, but I don't think it hurts, and I think it would be
> nice to have for completeness.
>
Janosch explicitly asked me to remove this while I am editing uv_guest.

[...]

> 
> also, what happens if only one of the two bits is set? (which is very
> wrong). In that scenario, I would like this test to fail, not skip.
> this means that we can't rely on uv_os_is_guest to decide whether to
> skip this test.
>
That is true and a test if both bits are present xor none would be a 
great addition. However, if just one bit is set, uv_os_is_guest would
return false and this part will never be reached anyway.

I can add a test before the uv_os_is_guest fence to verify that both
xor none SHARED flags are set.

>>   	 */
>> -	report(test_bit_inv(BIT_UVC_CMD_QUI, &uvcb.inst_calls_list[0]),
>> -	       "query indicated");
>> -	report(test_bit_inv(BIT_UVC_CMD_SET_SHARED_ACCESS, &uvcb.inst_calls_list[0]),
>> -	       "share indicated");
>> -	report(test_bit_inv(BIT_UVC_CMD_REMOVE_SHARED_ACCESS, &uvcb.inst_calls_list[0]),
>> -	       "unshare indicated");
>> +	report(uv_query_test_call(BIT_UVC_CMD_QUI), "query indicated");
>>   	report_prefix_pop();
>>   }
>>   
> 

Steffen

  reply	other threads:[~2022-02-08 14:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  9:19 [kvm-unit-tests PATCH v2 0/4] s390x: Attestation tests Steffen Eiden
2022-02-03  9:19 ` [kvm-unit-tests PATCH v2 1/4] s390x: uv-host: Add attestation test Steffen Eiden
2022-02-03 16:37   ` Claudio Imbrenda
2022-02-03  9:19 ` [kvm-unit-tests PATCH v2 2/4] s390x: lib: Add QUI getter Steffen Eiden
2022-02-03 16:12   ` Claudio Imbrenda
2022-02-04  8:18     ` Janosch Frank
2022-02-03  9:19 ` [kvm-unit-tests PATCH v2 3/4] s390x: uv-guest: remove duplicated checks Steffen Eiden
2022-02-03 16:31   ` Claudio Imbrenda
2022-02-08 14:57     ` Steffen Eiden [this message]
2022-02-03  9:19 ` [kvm-unit-tests PATCH v2 4/4] s390x: uv-guest: Add attestation tests Steffen Eiden
2022-02-03 17:37   ` Claudio Imbrenda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b28bd4b-cc4e-38a0-5cfe-c50c2bd70067@linux.ibm.com \
    --to=seiden@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox