From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB9DEEB64DC for ; Mon, 3 Jul 2023 13:40:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F0349866DF; Mon, 3 Jul 2023 15:40:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jHFwqwN6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5E3B4866DA; Mon, 3 Jul 2023 15:40:15 +0200 (CEST) Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B6D5486658 for ; Mon, 3 Jul 2023 15:40:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jpewhacker@gmail.com Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-6b708b97418so3688363a34.3 for ; Mon, 03 Jul 2023 06:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688391611; x=1690983611; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EXWxTLmxUE2jaA97pb3y9BpGbfKh7u8lS6zy1FSor9g=; b=jHFwqwN6FJrdhcPUPWnEz2HGRtceF583WGGNnaKWEog3MONOgzJ1qCtcEG+vINWTfc 77gINMSDZ8qeOadEsTh/h1tAU0B4NvBK4LHKnT9UMiUmtNADOXAWnaCzMREaVvseeccR 7LZw2mmtRsasXu7pBehnGXh+5Q7Hxl5G48UoU81TiFtUEE1gEPFEbz9DSsEw8iNW6mCh xvXltBXbLbc7ZtjbGglWZDg58ntMMhhaLr6YePuZIpqNWyVhCK2l2K24HG2RSqfXdLA8 fDMyWMajgAvrj13L+4R1SXO0TthkABLMJJFLBMneq37XKGc68ZqZ06GgQHoQsfnwO5Pe 3EUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688391611; x=1690983611; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EXWxTLmxUE2jaA97pb3y9BpGbfKh7u8lS6zy1FSor9g=; b=IFaRDWiazhq0tHhxg8RtzdsY/kjp5X4q76eMvhmW08PEZ+11ipRYS5ciFNOltdCzvr VvUPz5U1QwfViCz5rIQRomT8X0RzvkLZnDor5WWZhUSdfhvyLss1nNGgIHjkJGGX/rv7 goOAfArldMzN297rsp9zKtglKx5HnGB9aMtRjVddoD8SYpe79QtgMJQ0h9S2pSeK4mWp 5OODFThMaKCrFGbIkK7BaEmLPN/2kCUI1ms1O1ygntapw2EAQ0P3rJSiQTaDKWua6wKM pMKsUKeBrnO3Co2mmLnVOXzrOY1GBDnEuojlJ/A0/4iwTJmjcuirNBCuPFA5xUirUp0D 0QOg== X-Gm-Message-State: AC+VfDzJX7f8jaCmdhTExHhBsfqCjmfiYMcTig8DRAokm1GCxe7mJBpv BCHhpzhj987bkqHAud+47bOHQAkQZzg= X-Google-Smtp-Source: ACHHUZ6LAfeTKLesWAzLiTaUi5gekOO6bqHpad5yC5S0L0nTZGFRabUGIsZCEsfN2u62p0hbvPwdIw== X-Received: by 2002:a9d:7553:0:b0:6b8:82ed:ea30 with SMTP id b19-20020a9d7553000000b006b882edea30mr9451884otl.26.1688391610864; Mon, 03 Jul 2023 06:40:10 -0700 (PDT) Received: from localhost.localdomain ([204.77.163.107]) by smtp.gmail.com with ESMTPSA id j2-20020a9d7382000000b006b8cf55a997sm535720otk.28.2023.07.03.06.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 06:40:10 -0700 (PDT) From: Joshua Watt X-Google-Original-From: Joshua Watt To: u-boot@lists.denx.de Cc: Joshua Watt , Simon Glass Subject: [PATCH v2 2/5] dm: test: Improve partition test error output Date: Mon, 3 Jul 2023 08:39:53 -0500 Message-Id: <20230703133959.3880305-3-JPEWhacker@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230703133959.3880305-1-JPEWhacker@gmail.com> References: <20230623200031.2689749-1-JPEWhacker@gmail.com> <20230703133959.3880305-1-JPEWhacker@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Improve the logging when the partition test fails so that it is clear what went wrong, shown with actual values. Signed-off-by: Joshua Watt --- test/dm/part.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/dm/part.c b/test/dm/part.c index d5c58d6e3f..7dd8bc7a3c 100644 --- a/test/dm/part.c +++ b/test/dm/part.c @@ -17,10 +17,12 @@ static int do_test(struct unit_test_state *uts, int expected, struct blk_desc *mmc_dev_desc; struct disk_partition part_info; - ut_asserteq(expected, - part_get_info_by_dev_and_name_or_num("mmc", part_str, - &mmc_dev_desc, - &part_info, whole)); + int ret = part_get_info_by_dev_and_name_or_num("mmc", part_str, + &mmc_dev_desc, + &part_info, whole); + + ut_assertf(expected == ret, "test(%d, \"%s\", %d) == %d", expected, + part_str, whole, ret); return 0; } -- 2.33.0