public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Nico Boehr <nrb@linux.ibm.com>, kvm@vger.kernel.org
Cc: imbrenda@linux.ibm.com, thuth@redhat.com, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH v1 1/3] s390x: add library for skey-related functions
Date: Fri, 2 Dec 2022 12:20:34 +0100	[thread overview]
Message-ID: <d4af0699-e3e3-3a32-b963-b10beb390f7d@linux.ibm.com> (raw)
In-Reply-To: <166997759426.186408.182395619403215562@t14-nrb.local>

On 12/2/22 11:39, Nico Boehr wrote:
> Quoting Janosch Frank (2022-12-02 10:03:22)
>> On 12/1/22 09:46, Nico Boehr wrote:
>>> Upcoming changes will add a test which is very similar to the existing
>>> skey migration test. To reduce code duplication, move the common
>>> functions to a library which can be re-used by both tests.
>>>
>>
>> NACK
>>
>> We're not putting test specific code into the library.
> 
> What do you mean by "test specific"? After all, it is used by two tests now, possibly more in the future.
> 
> Any alternative suggestions?

For me this is like putting kselftest macros/functions into the kernel.

The KUT library is more or less the kernel on which the tests in s390x/ 
are based on. It provides primitives which (hopefully and mostly) aren't 
specific to tests.

Yes:
Providing skey set and get functions for one or multiple pages to tests.
I.e. sske and iske wrappers.

No:
Providing multi-page skey set and verify functions that set and verify 
skeys based on a pattern which is __hardcoded__ into the function using 
the skey wrappers. I.e. you're trying to create a new layer (test 
functionality) and stuffing it into the unit test kernel library.

What you want is a separate testlib which would reside in s390x/testlib/ 
where we can store often repeated functions and macros.

  reply	other threads:[~2022-12-02 11:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01  8:46 [kvm-unit-tests PATCH v1 0/3] s390x: test storage keys during migration Nico Boehr
2022-12-01  8:46 ` [kvm-unit-tests PATCH v1 1/3] s390x: add library for skey-related functions Nico Boehr
2022-12-01 13:16   ` Claudio Imbrenda
2022-12-01 15:55     ` Nico Boehr
2022-12-01 16:46       ` Claudio Imbrenda
2022-12-02  9:03   ` Janosch Frank
2022-12-02  9:09     ` Thomas Huth
2022-12-02 10:44       ` Nico Boehr
2022-12-02 11:32         ` Thomas Huth
2022-12-02 11:56           ` Janosch Frank
2022-12-02 12:48             ` Thomas Huth
2022-12-02 12:56               ` Claudio Imbrenda
2022-12-09  9:02                 ` Nico Boehr
2022-12-02 10:39     ` Nico Boehr
2022-12-02 11:20       ` Janosch Frank [this message]
2022-12-02 11:29         ` Claudio Imbrenda
2022-12-01  8:46 ` [kvm-unit-tests PATCH v1 2/3] lib: s390x: skey: add seed value for storage keys Nico Boehr
2022-12-01 13:27   ` Claudio Imbrenda
2022-12-01 15:16     ` Nico Boehr
2022-12-01  8:46 ` [kvm-unit-tests PATCH v1 3/3] s390x: add storage key test during migration Nico Boehr

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=d4af0699-e3e3-3a32-b963-b10beb390f7d@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --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