From: Marc Hartmayer <mhartmay@linux.ibm.com>
To: Andrew Jones <drjones@redhat.com>,
Marc Hartmayer <mhartmay@linux.ibm.com>
Cc: kvm@vger.kernel.org, Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>,
Janosch Frank <frankja@linux.ibm.com>,
Cornelia Huck <cohuck@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests RFC v2 3/4] run_tests/mkstandalone: add arch dependent function to `for_each_unittest`
Date: Tue, 18 Aug 2020 11:03:27 +0200 [thread overview]
Message-ID: <87ft8k497k.fsf@linux.ibm.com> (raw)
In-Reply-To: <20200814132957.szwmbw6w26fhkroo@kamzik.brq.redhat.com>
On Fri, Aug 14, 2020 at 03:29 PM +0200, Andrew Jones <drjones@redhat.com> wrote:
> On Fri, Aug 14, 2020 at 03:06:36PM +0200, Marc Hartmayer wrote:
>> On Thu, Aug 13, 2020 at 10:30 AM +0200, Andrew Jones <drjones@redhat.com> wrote:
>> > On Wed, Aug 12, 2020 at 11:27:04AM +0200, Marc Hartmayer wrote:
>> >> This allows us, for example, to auto generate a new test case based on
>> >> an existing test case.
>> >>
>> >> Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
>> >> ---
>> >> run_tests.sh | 2 +-
>> >> scripts/common.bash | 13 +++++++++++++
>> >> scripts/mkstandalone.sh | 2 +-
>> >> 3 files changed, 15 insertions(+), 2 deletions(-)
>> >>
>> >> diff --git a/run_tests.sh b/run_tests.sh
>> >> index 24aba9cc3a98..23658392c488 100755
>> >> --- a/run_tests.sh
>> >> +++ b/run_tests.sh
>> >> @@ -160,7 +160,7 @@ trap "wait; exit 130" SIGINT
>> >> # preserve stdout so that process_test_output output can write TAP to it
>> >> exec 3>&1
>> >> test "$tap_output" == "yes" && exec > /dev/null
>> >> - for_each_unittest $config run_task
>> >> + for_each_unittest $config run_task arch_cmd
>> >
>> > Let's just require that arch cmd hook be specified by the "$arch_cmd"
>> > variable. Then we don't need to pass it to for_each_unittest.
>>
>> Where is it then specified?
>
> Just using it that way in the source is enough. We should probably call
> it $ARCH_CMD to indicate that it's a special variable. Also, we could
> return it from a $(arch_cmd) function, which is how $(migration_cmd) and
> $(timeout_cmd) work.
My first approach was different…
First we source the (common) functions that could be overridden by
architecture dependent code, and then source the architecture dependent
code. But I’m not sure which approach is cleaner - if you prefer your
proposed solution with the global variables I can change it.
Thanks for the feedback!
[…snip]
--
Kind regards / Beste Grüße
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
next prev parent reply other threads:[~2020-08-18 9:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 9:27 [kvm-unit-tests RFC v2 0/4] s390x: Add Protected VM support Marc Hartmayer
2020-08-12 9:27 ` Marc Hartmayer
2020-08-12 9:27 ` [kvm-unit-tests RFC v2 1/4] common.bash: run `cmd` only if a test case was found Marc Hartmayer
2020-08-12 9:27 ` Marc Hartmayer
2020-08-13 7:40 ` Andrew Jones
2020-08-13 11:37 ` Marc Hartmayer
2020-08-12 9:27 ` [kvm-unit-tests RFC v2 2/4] scripts: add support for architecture dependent functions Marc Hartmayer
2020-08-12 9:27 ` Marc Hartmayer
2020-08-13 7:49 ` Andrew Jones
2020-08-13 11:45 ` Marc Hartmayer
2020-08-13 12:07 ` Andrew Jones
2020-08-13 12:07 ` Andrew Jones
2020-08-13 12:36 ` Marc Hartmayer
2020-08-12 9:27 ` [kvm-unit-tests RFC v2 3/4] run_tests/mkstandalone: add arch dependent function to `for_each_unittest` Marc Hartmayer
2020-08-12 9:27 ` Marc Hartmayer
2020-08-13 8:30 ` Andrew Jones
2020-08-14 13:06 ` Marc Hartmayer
2020-08-14 13:29 ` Andrew Jones
2020-08-18 9:03 ` Marc Hartmayer [this message]
2020-08-18 9:13 ` Andrew Jones
2020-08-12 9:27 ` [kvm-unit-tests RFC v2 4/4] s390x: add Protected VM support Marc Hartmayer
2020-08-12 9:27 ` Marc Hartmayer
2020-08-13 11:56 ` Cornelia Huck
2020-08-13 11:56 ` Cornelia Huck
2020-08-13 13:08 ` Marc Hartmayer
2020-08-13 14:22 ` Cornelia Huck
2020-08-13 15:13 ` Marc Hartmayer
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=87ft8k497k.fsf@linux.ibm.com \
--to=mhartmay@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=drjones@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.