public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <andrew.jones@linux.dev>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, thuth@redhat.com, lvivier@redhat.com,
	 frankja@linux.ibm.com, imbrenda@linux.ibm.com,
	nrb@linux.ibm.com, npiggin@gmail.com
Subject: Re: [RFC kvm-unit-tests PATCH] lib/report: Return pass/fail result from report
Date: Wed, 6 Nov 2024 09:13:39 +0100	[thread overview]
Message-ID: <20241106-46bb88a736cb836739b5aa86@orel> (raw)
In-Reply-To: <20241023165347.174745-2-andrew.jones@linux.dev>

On Wed, Oct 23, 2024 at 06:53:48PM +0200, Andrew Jones wrote:
> A nice pattern to use in order to try and maintain parsable reports,
> but also output unexpected values, is
> 
>     if (!report(value == expected_value, "my test")) {
>         report_info("failure due to unexpected value (received %d, expected %d)",
>                     value, expected_value);
>     }
> 
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> ---
>  lib/libcflat.h |  6 +++---
>  lib/report.c   | 28 +++++++++++++++++++++-------
>  2 files changed, 24 insertions(+), 10 deletions(-)

Merged.

Thanks,
drew

      parent reply	other threads:[~2024-11-06  8:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 16:53 [RFC kvm-unit-tests PATCH] lib/report: Return pass/fail result from report Andrew Jones
2024-10-25 15:45 ` Alexandru Elisei
2024-10-29 10:59   ` Andrew Jones
2024-10-29 16:58 ` Claudio Imbrenda
2024-11-06  8:13 ` Andrew Jones [this message]

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=20241106-46bb88a736cb836739b5aa86@orel \
    --to=andrew.jones@linux.dev \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=lvivier@redhat.com \
    --cc=npiggin@gmail.com \
    --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