public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>
Cc: Janosch Frank <frankja@linux.ibm.com>,
	Nico Boehr <nrb@linux.ibm.com>,
	kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH v1 1/3] s390x: add library for skey-related functions
Date: Fri, 2 Dec 2022 13:56:47 +0100	[thread overview]
Message-ID: <20221202135647.46df1322@p-imbrenda> (raw)
In-Reply-To: <77870647-0fb6-a9f8-4408-dd76b5156462@redhat.com>

On Fri, 2 Dec 2022 13:48:17 +0100
Thomas Huth <thuth@redhat.com> wrote:

> On 02/12/2022 12.56, Janosch Frank wrote:
> > On 12/2/22 12:32, Thomas Huth wrote:  
> >> On 02/12/2022 11.44, Nico Boehr wrote:  
> >>> Quoting Thomas Huth (2022-12-02 10:09:03)  
> >>>> On 02/12/2022 10.03, Janosch Frank wrote:  
> >>>>> 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.  
> >>>>
> >>>> Do we need a new file (in the third patch) for the new test at all, or 
> >>>> could
> >>>> the new test simply be added to s390x/migration-skey.c instead?  
> >>>
> >>> Mh, not quite. One test wants to change storage keys *before* migrating, 
> >>> the other *while* migrating. Since we can only migrate once, it is not 
> >>> obvious to me how we could do that in one run.
> >>>
> >>> Speaking of one run, what we could do is add a command line argument 
> >>> which decides which test to run and then call the same test with 
> >>> different arguments in unittests.cfg.  
> >>
> >> Yes, that's what I had in mind - use a command line argument to select the
> >> test ... should be OK as long as both variants are listed in unittests.cfg,
> >> shouldn't it?
> >>
> >>    Thomas  
> > 
> > @Thomas @Claudio:
> > I see two possible solutions if we want a "testlib" at some point (which for 
> > the record I don't have anything against):
> > 
> > Putting the files into lib/s390x/testlib/* which will then be part of our 
> > normal lib.
> > That's a minimal effort solution. It still puts those files into lib/* but 
> > they are at least contained in a directory.
> > 
> > Putting the files into s390x/testlib/* and creating a proper new lib.
> > Which means we'd need a few more lines of makefile changes.  
> 
> Though this is an excellent topic for a Friday afternoon bikeshedding ... I 
> don't mind much either way. I maybe just got a small preference to not touch 
> the main lib/ folder here. I guess you could even call it 
> s390x/migration-skey-common.c and leave the lib logic out of the game ... 
> but I don't really mind. Up to you to decide ;-)
> 

I really like the idea of having only one test and use a commandline
parameter to decide which variant to run

this way no need to put things in external files

>   Thomas
> 


  reply	other threads:[~2022-12-02 12:57 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 [this message]
2022-12-09  9:02                 ` Nico Boehr
2022-12-02 10:39     ` Nico Boehr
2022-12-02 11:20       ` Janosch Frank
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=20221202135647.46df1322@p-imbrenda \
    --to=imbrenda@linux.ibm.com \
    --cc=frankja@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