From: David Hildenbrand Subject: Re: [kvm-unit-tests PATCH v1 2/6] s390x: basic self test Date: Wed, 17 May 2017 18:50:47 +0200 Message-ID: References: <20170512105830.10604-1-david@redhat.com> <20170512105830.10604-3-david@redhat.com> <20170516133511.GA10587@potion> <20170517131222.GA7101@potion> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Paolo Bonzini , Thomas Huth , Christian Borntraeger , Cornelia Huck To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39600 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbdEQQuu (ORCPT ); Wed, 17 May 2017 12:50:50 -0400 In-Reply-To: <20170517131222.GA7101@potion> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: >>>> + if (strcmp(argv[1], "test") != 0) >>>> + report_abort("wrong parameter value"); >>>> + if (strcmp(argv[2], "123") != 0) >>>> + report_abort("wrong parameter value"); >>>> + >>>> + report("test true", true, 0); >>> ^ >>> It seems you'll be doing v2 -- please remove this zero in it. >> >> Thanks, if that would throw an error during compile time like printf, it >> would be perfect. >> >> Yes, I'll resend! > > Thinking more about it, the test would look better if we used report() > instead of if()+report_abort() and a final report, something like: > > report("argv[0] == PROGNAME", !strcmp(argv[0], "s390x/selftest.elf")); > report("argv[1] == test", !strcmp(argv[1], "test")); > report("argv[2] == 123", !strcmp(argv[2], "123")); > > This is also a nitpick and I'll gladly accept the original version. :) > Thanks - I'll add that change and send a new version out tomorrow. -- Thanks, David