Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1925735rwb; Fri, 28 Jul 2023 18:18:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlF0EcwUrdpfSM8B+V6/2euwXEw4HNEk1PW4GFQWQEP66Di3tQA248PIH0hdeIPE8eOAx16L X-Received: by 2002:a17:902:c20c:b0:1b8:5735:2850 with SMTP id 12-20020a170902c20c00b001b857352850mr3023435pll.32.1690593522750; Fri, 28 Jul 2023 18:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690593522; cv=none; d=google.com; s=arc-20160816; b=0DhnhxntgWp0lsjtmKBxkcunrhYJjNkM8C9rzKGybT6KQ8lLV5xToz+c0uowrM2ilw qug9tyj7111YkEpGBDv3NvSWe8SanlUg+2f8IkrUItDG8WNhSd9nSRVDJqYaCUytJteu 0Tdvpuys3uXejODfa0sJhLy/DdRvo5vdsKLgMZYShYBFt63YG8PnEdAsSSBi4le09ukj rd5R+ykGHUypbt4Ajl8w0kC7Bzohh4yrGt+zy+iNIM1hqEVn1oHRRWlsA59lx+OsTKng GvSc25Io86O/TjbADvqbRhLMkUzejdXjvbDRQYXvOZBSHAZWQEl1UXZsXI+Tv6oW7hrz kKKA== 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=Ngl8lC+/wGQlijkr13PT2tPWtqTwIZBUn/V8pQLJnsI=; fh=Ctt0ydInMKwei8YFBFbw7rU4p8H0G/T51ZI/KkO6Md4=; b=Y41GfIzzIjy8mZK+1DTjdfkz60v8rOvkEHkXoenuVxDCg0ucYBsr0p7NG3gzzbdJ51 akkb5pswWASEGp3yg7P0pWieI1iJnkQE1SazK6p1xX7KygLc2PHpczaUnabr4rADprnA h8jXack0IL2F6oI4KDdxgjoGBEAlrvRNzRvz3S3O6ws08fDjd37bVypwFp8A/oPkNUhq UE1ILt8U0azVZziIdWHXPxsVlaxv/GmqH/kr1wUYwFbk+BFWci9E317GHvuzZ9pyuT2p 3HBMIWJrYmhCqzIy9HVMFPlDD5LYPAmsB+0hleP3or5pFmgTQkKgf+YAxEemHaL73x4b faQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=jTQgJijv; 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 i2-20020a17090332c200b001b22f31cce9si3975652plr.179.2023.07.28.18.18.30; Fri, 28 Jul 2023 18:18:42 -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=jTQgJijv; 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 S236489AbjG2AjC (ORCPT + 99 others); Fri, 28 Jul 2023 20:39:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236507AbjG2AiY (ORCPT ); Fri, 28 Jul 2023 20:38:24 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99ED55593 for ; Fri, 28 Jul 2023 17:37:36 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d052f58b7deso2516084276.2 for ; Fri, 28 Jul 2023 17:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1690591037; x=1691195837; 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=Ngl8lC+/wGQlijkr13PT2tPWtqTwIZBUn/V8pQLJnsI=; b=jTQgJijvaSA87s20WcW+DJNYcBr6iycXkShWiPEyn+ZHzYOOnQWRcWv0EDcUck3WSB dDF9I/Q1ySsvk1kWojQd9tEW8CDUPb3rTBRDLk/39KSQDC1qIvUaOTYBgFEBQSQG5ATK 8R4xRcct2Y93O33tOsGnfxwy3mlvnE7TbvOuNpUzxRO2IweGEzpWlv7WtggKrSBIcfG9 sEllWKhZpl8xKL/qkLMA6jfKxBkcLUU8sa+YBP7gnqHUx9AQjq6pptXGY8yhdC+XrS3V Cvu0hwoiZQ5M1a1Zqzfe0E2sT4WnjUBLlClEx7LF5ZDnUPi2DLOSqL0+TuJZZvycUOll a2og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690591037; x=1691195837; 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=Ngl8lC+/wGQlijkr13PT2tPWtqTwIZBUn/V8pQLJnsI=; b=fxyZ0bd/qRgKc9X83OyZFIaduzLoSP8duvRDjxC7vYuaC/A0ibMNyjDT8BXwRRC2KY D/rDv3e4ulzhUNLGVutEONxXV5CgnsM9BXvuPRvoKJGv+XDikTGa0bf5ah/ekKdRVCTZ GcfwGfhxgIPB0iJqbJ6Nj7qwQOIqHUoz1/dxTrXwbprJiEhMuQLFXr3qQ7nbOna3eWsq +fKwt2M226ru6VYKNdlRqNpk/dKmmdUgjWVqlqGXCAM2psZwgslMSiBKtpiYLwreu/P3 ZVNE8lJgEpB6DawQvg/iew991JsswKbGewCvXnyaSBAHIvSZVnxxBbeS2kJqtXOdTyA+ 8TqQ== X-Gm-Message-State: ABy/qLZ41ujaTkUnTxvPB19A8ImJNL34VORAOzIZ9SBTH1TrJkn0c5zw hu3JvWKka2M4xFhDGtQC4yyMxU9Ho2I= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:20c3:0:b0:d11:b0d5:cd01 with SMTP id g186-20020a2520c3000000b00d11b0d5cd01mr17235ybg.8.1690591037120; Fri, 28 Jul 2023 17:37:17 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 28 Jul 2023 17:36:25 -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-17-seanjc@google.com> Subject: [PATCH v4 16/34] KVM: selftests: Convert s390's memop 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 memop test to printf-based GUEST_ASSERT, and opportunistically use GUEST_FAIL() to report invalid sizes. Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/s390x/memop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/kvm/s390x/memop.c b/tools/testing/selftests/kvm/s390x/memop.c index de73dc030905..a49173907cec 100644 --- a/tools/testing/selftests/kvm/s390x/memop.c +++ b/tools/testing/selftests/kvm/s390x/memop.c @@ -4,6 +4,7 @@ * * Copyright (C) 2019, Red Hat, Inc. */ +#define USE_GUEST_ASSERT_PRINTF 1 #include #include @@ -279,7 +280,7 @@ enum stage { 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); \ @@ -469,7 +470,7 @@ static __uint128_t cut_to_size(int size, __uint128_t val) case 16: return val; } - GUEST_ASSERT_1(false, "Invalid size"); + GUEST_FAIL("Invalid size = %u", size); return 0; } @@ -598,7 +599,7 @@ static bool _cmpxchg(int size, void *target, __uint128_t *old_addr, __uint128_t return ret; } } - GUEST_ASSERT_1(false, "Invalid size"); + GUEST_FAIL("Invalid size = %u", size); return 0; } -- 2.41.0.487.g6d72f3e995-goog