public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre Morel <pmorel@linux.ibm.com>
To: Cornelia Huck <cohuck@redhat.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	frankja@linux.ibm.com, david@redhat.com, thuth@redhat.com,
	imbrenda@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH v1 2/5] s390x: css: simplifications of the tests
Date: Tue, 2 Feb 2021 15:39:05 +0100	[thread overview]
Message-ID: <98905e4a-5f9a-4614-4677-5acc511d3fdd@linux.ibm.com> (raw)
In-Reply-To: <20210202122311.3c1ead1c.cohuck@redhat.com>



On 2/2/21 12:23 PM, Cornelia Huck wrote:
> On Fri, 29 Jan 2021 15:34:26 +0100
> Pierre Morel <pmorel@linux.ibm.com> wrote:
> 
...snip...

>> +bool css_enabled(int schid)
>> +{
>> +	struct pmcw *pmcw = &schib.pmcw;
>> +	int cc;
>> +
>> +	cc = stsch(schid, &schib);
>> +	if (cc) {
>> +		report_info("stsch: updating sch %08x failed with cc=%d",
>> +			    schid, cc);
>> +		return false;
>> +	}
>> +
>> +	if (!(pmcw->flags & PMCW_ENABLE)) {
>> +		report_info("stsch: sch %08x not enabled", schid);
>> +		return 0;
>> +	}
>> +	return true;
>> +}
>>   /*
>>    * css_enable: enable the subchannel with the specified ISC
>>    * @schid: Subchannel Identifier
>> @@ -167,18 +192,8 @@ retry:
>>   	/*
>>   	 * Read the SCHIB again to verify the enablement
>>   	 */
>> -	cc = stsch(schid, &schib);
>> -	if (cc) {
>> -		report_info("stsch: updating sch %08x failed with cc=%d",
>> -			    schid, cc);
>> -		return cc;
>> -	}
>> -
>> -	if ((pmcw->flags & flags) == flags) {
>> -		report_info("stsch: sch %08x successfully modified after %d retries",
>> -			    schid, retry_count);
>> +	if (css_enabled(schid))
> 
> This is a slightly different test now. Previously, you also checked
> whether the ISC matched the requested one. Not sure how valuable that
> test was.

Yes, I do not think it can be anything else when the CSS accept to 
enable the subchannel.

...
>>   
>> -	ret = css_enable(test_device_sid, IO_SCH_ISC);
>> -	if (ret) {
>> -		report(0, "Could not enable the subchannel: %08x",
>> -		       test_device_sid);
>> -		return;
>> +	if (!css_enabled(test_device_sid)) {
>> +		report(0, "enabled subchannel: %08x", test_device_sid);
> 
> Isn't that a _not_ enabled subchannel?

:) yes, may be:

s/enabled/enabling/


...snip...

>>   
>>   static void css_init(void)
>> @@ -146,8 +142,17 @@ static void css_init(void)
>>   	int ret;
>>   
>>   	ret = get_chsc_scsc();
>> -	if (!ret)
>> -		report(1, " ");
>> +	if (ret)
>> +		return;
> 
> Shouldn't you report a failure here?

Clearly yes.


Thanks for the comments,
regards,
Pierre

-- 
Pierre Morel
IBM Lab Boeblingen

  reply	other threads:[~2021-02-02 14:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1611930869-25745-1-git-send-email-pmorel@linux.ibm.com>
     [not found] ` <1611930869-25745-2-git-send-email-pmorel@linux.ibm.com>
2021-02-01 10:01   ` [kvm-unit-tests PATCH v1 1/5] s390x: css: Store CSS Characteristics Janosch Frank
2021-02-01 12:09     ` Pierre Morel
2021-02-02 11:11   ` Cornelia Huck
2021-02-02 14:19     ` Pierre Morel
2021-02-02 17:25   ` Thomas Huth
2021-02-03 10:12     ` Pierre Morel
     [not found] ` <1611930869-25745-3-git-send-email-pmorel@linux.ibm.com>
2021-02-01 10:11   ` [kvm-unit-tests PATCH v1 2/5] s390x: css: simplifications of the tests Janosch Frank
2021-02-01 12:15     ` Pierre Morel
2021-02-01 12:22       ` Janosch Frank
2021-02-02 11:23   ` Cornelia Huck
2021-02-02 14:39     ` Pierre Morel [this message]
2021-02-02 17:29   ` Thomas Huth
2021-02-03 10:10     ` Pierre Morel
     [not found] ` <1611930869-25745-6-git-send-email-pmorel@linux.ibm.com>
2021-02-02 11:52   ` [kvm-unit-tests PATCH v1 5/5] s390x: css: testing measurement block format 1 Cornelia Huck
     [not found] ` <1611930869-25745-4-git-send-email-pmorel@linux.ibm.com>
2021-02-02 11:48   ` [kvm-unit-tests PATCH v1 3/5] s390x: css: implementing Set CHannel Monitor Cornelia Huck
2021-02-02 16:15     ` Pierre Morel
2021-02-02 17:32   ` Thomas Huth
2021-02-03 10:09     ` Pierre Morel
     [not found] ` <1611930869-25745-5-git-send-email-pmorel@linux.ibm.com>
2021-02-02 17:35   ` [kvm-unit-tests PATCH v1 4/5] s390x: css: SCHM tests format 0 Thomas Huth
2021-02-03 10:09     ` Pierre Morel

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=98905e4a-5f9a-4614-4677-5acc511d3fdd@linux.ibm.com \
    --to=pmorel@linux.ibm.com \
    --cc=cohuck@redhat.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