Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1938181rwb; Fri, 28 Jul 2023 18:39:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvV6aOsQtDigUCfR463JEpcNmX9FvppXyWA2R2skDfsnWddwH4uob3fQBbl1SDvAP0Q1jn X-Received: by 2002:a17:906:7788:b0:99b:dfe5:74f5 with SMTP id s8-20020a170906778800b0099bdfe574f5mr862493ejm.41.1690594751993; Fri, 28 Jul 2023 18:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690594751; cv=none; d=google.com; s=arc-20160816; b=tY/YFr9Yl8XV8M5aerMAb1WflQ67PYQLeS6iOti6hee6KVDdQkwvUVnSntNGWqybqO pHdfdfkE0Xy9hAVMtILXF7acSddOonPQcjXLe9TwDz8NvGH50g7zt5bdc8lU4GWkiaDl wAU0o5w7WnLSAyyzXiFdNGkYnDCOW7l1C4MEj5jYdbGPTDCYdg42PS15Um34HPBrVfAe ymNYrVfWS0Cku9j6ySFkCqDGjO7569QsdlGMApSIveOvnXeNjpEPLdcAYHiqVGRb0lKF C66nyL6RWlyKNvnC1QCg4VIObHrfK2p2jdN7Ju4xUSK4XwC/if3Oe/OR0P0bo9H1T12P VUcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:reply-to:dkim-signature; bh=ghJjf9GWvVyaghDwZhaADSILeZ7gBWODtxQxln/4ffA=; fh=Ctt0ydInMKwei8YFBFbw7rU4p8H0G/T51ZI/KkO6Md4=; b=taHipZ3FC4piPUdC47Juq4CgCxlaUKz4w21L8/TiZYyiHxA5Cw8Y4taaXlveB8I7Ng E8utrRLBJZRw+w+0GjPHhQuPnS36mlfoSmwq5hTLLEUul/LCUkerECbKRoY/YnimRif3 pyk/+dMMUvMGp5TI4dmjZaBMxMhleIMJ5UEvvdFVo/BZ1CLCQAj8WGEaAnc6wlnmJmwq NxPAuQH+x9YzznLH5AEbUKuUwMKd2iuuR46nBjsCNaAMH2rhxaQZIyY+5RowzJmJYQwd VhL53j8PubKC/RP8MsNeHQI+6YX0MsFWZRgqZSCJfI52efimutmmmevm5u5iSBsg9+5f VhbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=maWgMmnq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb10-20020a170906edca00b0099bd569daa4si3725773ejb.114.2023.07.28.18.38.47; Fri, 28 Jul 2023 18:39:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=maWgMmnq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236278AbjG2AjN (ORCPT + 99 others); Fri, 28 Jul 2023 20:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234930AbjG2AiZ (ORCPT ); Fri, 28 Jul 2023 20:38:25 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24DDE5595 for ; Fri, 28 Jul 2023 17:37:37 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id d9443c01a7336-1bb98659f3cso18212065ad.3 for ; Fri, 28 Jul 2023 17:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690591038; x=1691195838; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=ghJjf9GWvVyaghDwZhaADSILeZ7gBWODtxQxln/4ffA=; b=maWgMmnqFc3YTeKLPqw/lKtakn7FujXRZY95A1ym2PEZu5CChu6IlGjqWTu+fUFqQL zoq+6BxgefpGqPBhkpIA9667dZ0ojf+J1Z9g8FjcKPSeSiiOHzLvbec20n5BES71Jtqb wvnrEEbr8yJ15dxZILbTZTDn8ql6qUrqqLdFw8ll+n3b3Jqa/MAZ4S8/1ADT3yR/WcD5 Re4shMEJP08YXyczC/fKfFNAX1MK2uXOch7buigRGpuf+xzqNSnAndSw7DaifRC0T11w VSr3iLrJ71YH0QgsEEPIwCl3Lj/e6No/OylV6asvhU1jsps/crBGU7IBVbllYILPlaFg 1NNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591038; x=1691195838; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ghJjf9GWvVyaghDwZhaADSILeZ7gBWODtxQxln/4ffA=; b=jKtwOe3nn+puPSpzX+ZQr0qopQSmo6tilsGxJAfnBcBqysbCqVnTX6OdPbkpK7u7ug J1OJi917cvpo2H7Shjiw4u8GihGig9uHqxKNx335502eLErK7oDgK4XWxG7hjoFb+QMl fKAU0Qp9S24UYjB39m5Wco/sol6zH2B6HwrgbocwitmfSqXWSIvJcEJMGiBos2ZU+zwS D7zXrkWb7lc4pHaa18ya420Ff01O971RwUmis2kGh359uc6M1LObzeZqOwU7el5To4fl embyAe3XLywPt/LMvzzu/4I7y0wZ2am6hSU3XlmLabf+ekw7t/P32/opQVlaH/FmXjif aCBg== X-Gm-Message-State: ABy/qLbqy6HLXxmWlsDX11JgZpczmvboOhzsVReWQz7Tco4qiI+AfF8S oWXzkwe7+QPdyqecpHqCILBqatZ99ks= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:f683:b0:1b8:a54c:61ef with SMTP id l3-20020a170902f68300b001b8a54c61efmr12911plg.9.1690591038706; Fri, 28 Jul 2023 17:37:18 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 28 Jul 2023 17:36:26 -0700 In-Reply-To: <20230729003643.1053367-1-seanjc@google.com> Mime-Version: 1.0 References: <20230729003643.1053367-1-seanjc@google.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog Message-ID: <20230729003643.1053367-18-seanjc@google.com> Subject: [PATCH v4 17/34] KVM: selftests: Convert s390's tprot test to printf style GUEST_ASSERT From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Sean Christopherson , Thomas Huth , "=?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?=" , Aaron Lewis Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert s390's tprot test to printf-based GUEST_ASSERT. Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/s390x/tprot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/kvm/s390x/tprot.c b/tools/testing/selftests/kvm/s390x/tprot.c index 40d3ea16c052..c12c6824d963 100644 --- a/tools/testing/selftests/kvm/s390x/tprot.c +++ b/tools/testing/selftests/kvm/s390x/tprot.c @@ -4,6 +4,7 @@ * * Copyright IBM Corp. 2021 */ +#define USE_GUEST_ASSERT_PRINTF 1 #include #include "test_util.h" @@ -156,7 +157,9 @@ static enum stage perform_next_stage(int *i, bool mapped_0) !mapped_0; if (!skip) { result = test_protection(tests[*i].addr, tests[*i].key); - GUEST_ASSERT_2(result == tests[*i].expected, *i, result); + __GUEST_ASSERT(result == tests[*i].expected, + "Wanted %u, got %u, for i = %u", + tests[*i].expected, result, *i); } } return stage; @@ -190,7 +193,7 @@ static void guest_code(void) vcpu_run(__vcpu); \ get_ucall(__vcpu, &uc); \ if (uc.cmd == UCALL_ABORT) \ - REPORT_GUEST_ASSERT_2(uc, "hints: %lu, %lu"); \ + REPORT_GUEST_ASSERT(uc); \ TEST_ASSERT_EQ(uc.cmd, UCALL_SYNC); \ TEST_ASSERT_EQ(uc.args[1], __stage); \ }) -- 2.41.0.487.g6d72f3e995-goog