[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3989523-bed1-d9d4-2007-19de8ba4d403@redhat.com>
Date: Wed, 20 Apr 2022 13:46:33 +0200
From: Thomas Huth <thuth@...hat.com>
To: Janis Schoetterl-Glausch <scgl@...ux.ibm.com>, kvm@...r.kernel.org,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
David Hildenbrand <david@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Shuah Khan <shuah@...nel.org>, linux-s390@...r.kernel.org
Subject: Re: [PATCH v2 3/4] KVM: s390: selftests: Use TAP interface in the
tprot test
On 20/04/2022 13.38, Janis Schoetterl-Glausch wrote:
> On 4/19/22 20:58, Thomas Huth wrote:
>> The tprot test currently does not have any output (unless one of
>> the TEST_ASSERT statement fails), so it's hard to say for a user
>> whether a certain new sub-test has been included in the binary or
>> not. Let's make this a little bit more user-friendly and include
>> some TAP output via the kselftests.h interface.
>>
>> Signed-off-by: Thomas Huth <thuth@...hat.com>
>> ---
>> tools/testing/selftests/kvm/s390x/tprot.c | 28 +++++++++++++++++++----
>> 1 file changed, 23 insertions(+), 5 deletions(-)
>>
>> diff --git a/tools/testing/selftests/kvm/s390x/tprot.c b/tools/testing/selftests/kvm/s390x/tprot.c
>> index c097b9db495e..baba883d7a6d 100644
>> --- a/tools/testing/selftests/kvm/s390x/tprot.c
>> +++ b/tools/testing/selftests/kvm/s390x/tprot.c
>
> We're not committing ourselves to any particular test output, are we?
> Your patch considers the stages used for test setup tests themselves,
> which I'm fine with, but would not want to commit to keeping that way forever.
No commitment - just somewhat more verbose output. If you don't like it, we
can also drop this patch, or do it in another way, I don't mind too much.
>> +#define HOST_SYNC(vmp, stage) \
>> +{ \
>> + HOST_SYNC_NO_TAP(vmp, stage); \
>> + ksft_test_result_pass("" #stage "\n"); \
>> +}
>> +
>
> It should not be a problem, but is there any reason you're not using
> do { ... } while(0) or ({ ... }) instead of just braces?
Yes, that would be better, indeed.
Thomas
Powered by blists - more mailing lists