All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Thomas Huth <thuth@redhat.com>
Cc: Nicholas Piggin <npiggin@gmail.com>,
	Andrew Jones <andrew.jones@linux.dev>,
	kvm@vger.kernel.org
Subject: [kvm-unit-tests PATCH 1/4] powerpc/sprs: Fix report_kfail call
Date: Sun,  2 Jun 2024 22:25:55 +1000	[thread overview]
Message-ID: <20240602122559.118345-2-npiggin@gmail.com> (raw)
In-Reply-To: <20240602122559.118345-1-npiggin@gmail.com>

Parameters to report_kfail are wrong. String to bool conversion is not
warned by gcc, and printf format did not catch it due to string variable
being passed at the format location.

Fixes: 8f6290f0e6 ("powerpc/sprs: Specify SPRs with data rather than code")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 powerpc/sprs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/powerpc/sprs.c b/powerpc/sprs.c
index de9e87a21..33872136d 100644
--- a/powerpc/sprs.c
+++ b/powerpc/sprs.c
@@ -590,7 +590,7 @@ int main(int argc, char **argv)
 
 		if (sprs[i].width == 32 && !(before[i] >> 32) && !(after[i] >> 32)) {
 			/* known failure KVM migration of CTRL */
-			report_kfail(true && i == 136,
+			report_kfail(i == 136, pass,
 				"%-10s(%4d):\t        0x%08lx <==>         0x%08lx",
 				sprs[i].name, i,
 				before[i], after[i]);
-- 
2.43.0


  reply	other threads:[~2024-06-02 12:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02 12:25 [kvm-unit-tests PATCH 0/4] powerpc fix and misc docs/build/CI improvements Nicholas Piggin
2024-06-02 12:25 ` Nicholas Piggin [this message]
2024-06-03  4:22   ` [kvm-unit-tests PATCH 1/4] powerpc/sprs: Fix report_kfail call Thomas Huth
2024-06-02 12:25 ` [kvm-unit-tests PATCH 2/4] doc: update unittests doc Nicholas Piggin
2024-06-03  4:24   ` Thomas Huth
2024-06-03  6:47   ` Andrew Jones
2024-06-03  8:12     ` Nicholas Piggin
2024-06-03  8:45       ` Andrew Jones
2024-06-02 12:25 ` [kvm-unit-tests PATCH 3/4] build: Make build output pretty Nicholas Piggin
2024-06-03  7:00   ` Andrew Jones
2024-06-03  8:26   ` Thomas Huth
2024-06-03  8:56     ` Andrew Jones
2024-06-05  0:38       ` Nicholas Piggin
2024-06-12 10:32         ` Thomas Huth
2024-06-14  1:07           ` Nicholas Piggin
2024-06-04  5:05     ` Nicholas Piggin
2024-06-02 12:25 ` [kvm-unit-tests PATCH 4/4] gitlab-ci: Always save artifacts Nicholas Piggin
2024-06-03  4:29   ` Thomas Huth
2024-06-03  8:17     ` Nicholas Piggin

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=20240602122559.118345-2-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=andrew.jones@linux.dev \
    --cc=kvm@vger.kernel.org \
    --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.