From patchwork Mon Nov 25 11:55:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 845313 Delivered-To: patch@linaro.org Received: by 2002:a5d:688e:0:b0:382:43a8:7b94 with SMTP id h14csp1128058wru; Mon, 25 Nov 2024 03:57:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXoPlXfEz7Uoxe2rnwVnwSdc6iE3KllpebfpK0uhf4OYqJT8yLCNXz+bU4qQ6kjN/AkfP4jWw==@linaro.org X-Google-Smtp-Source: AGHT+IFMgpnDGlMVyh8pAzXbutfKukMjglSp0qHkGVD3t2LzFc2AsWg5/a4eKvW35Z1+RAJvndRN X-Received: by 2002:a17:906:1daa:b0:aa5:3853:5531 with SMTP id a640c23a62f3a-aa53853579amr621239366b.33.1732535827341; Mon, 25 Nov 2024 03:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732535827; cv=none; d=google.com; s=arc-20240605; b=KzjGOhF0ClD2QDFN0VQu2/KZqfT2mgCajQ3SZ5G1yni8ogQnsjyroIAd1qurek1wv8 3s+mHKV78/+E0Wyp1FWE4a27WMOQuXJmFQ4+pg02vjPhuwxXpPa3rvuBb2V0NyOfWhCb 17LsS3a5kbuIaNF4FGlZmrLLV9ElgOw2CLQSWf/HWhsENAEpL5IsJa9wLaFktXidcT6E ZqtGFb74+qQ4fqhJxeDHRvnRBpH+Vpc5PvRtwhYmntdeFZXdvpxbjyZk1hLE5soY30jL vs/CF9HXo0ChEf6Ax4UXhI/A+8P1iRklNOmlH1I2mEvnwpHTIofIGup9u4SVkK9eswS/ 6ACw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hO6HN/1ZHKXZDlbmBO3+BH1EtfZLQTmPvADU2ZuQYXc=; fh=A2GsXalIWztJ5A0+VO1L81kAfCqqhJoj7Eogs4p63lk=; b=YhsCQttYyLzTvkZ1UF3ymPRY6Vx3XmxvDnoPP8QEXU/zqgTAr+cmehJDJlTwGtxD/6 AAqIkmpW+/P/zzqKvqthQvbNwc/rgXI7WcjJ/zlTxpEu1H7JIKmixiWX0R3xcEaexw0n LKQ4zgtDs/zzKd6hHZInhC2vWkC/Rm+1XYqsSm7ZvevbQF+tdp3tYHlDVNkR05bIyYjv g5gYVjjnHDjgVbkRHtLGIS4coMXJa3dXo1JXGnnsBLBN8lbrl0/sdCLzt5GNZqeXIr4x qoIhmfs+z1ZFOid9mQihFCUCj1loEFzsp3M3i29mPbnxR5wseMC3bKBwVsaNazSMk5ce O27w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bLJn42l0; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-aa5104bfc6csi461143066b.754.2024.11.25.03.57.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:57:07 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bLJn42l0; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6D47489A3F; Mon, 25 Nov 2024 12:56:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="bLJn42l0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D16AF89A3C; Mon, 25 Nov 2024 12:56:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 D0D7889987 for ; Mon, 25 Nov 2024 12:56:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andrew.goodbody@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-432d866f70fso40332985e9.2 for ; Mon, 25 Nov 2024 03:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732535815; x=1733140615; darn=lists.denx.de; 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=hO6HN/1ZHKXZDlbmBO3+BH1EtfZLQTmPvADU2ZuQYXc=; b=bLJn42l0cjofe/uiah8o3LqEETcW/r4WIAUC1/fHPOThPCAlJU0rHkCG9QcMk8JNhS PcfnRK9Y7UFza3bA6bOj3tId5WQwWLomW9qzYNe3WgxJsK0hUWj3prv+VkCUGIR2eBe7 8r3GRNaQuTjjvKb2Da+g1PFFGwC7ud3zDL/iNl4fgT9YtI6dfqRTDtc6JUThf02rzQzt qZiRQC3Z8Py9i7uufInKDNBdLcj1Srukisc0BIVGtAjhf9cBQeBAkcjYtfU5pu68H94l M3jocZ8un6uMmfqgM/pGKMQAfmV5h9aYH/hUzJuOuZZxevvp8xiB4sFFJy5zyhloVuC+ vpxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732535815; x=1733140615; 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=hO6HN/1ZHKXZDlbmBO3+BH1EtfZLQTmPvADU2ZuQYXc=; b=F+iDuV41c6aTkstnXk93gHHyt7K8SA92emQsNgrd2NTAxEIFCRH83lGaWlrXXWR/Kv j9EzzfVLYS+LdWhYuhXHUilgsoga/6tG2qU5Rgq/T3jUQiSr+WWxei+RzziXOOdkWT68 hwn9D7csl6slwWKozopA2CEfA5+U79Z+36pke3dOEgLpHJCt/e/WHLZQNJKW0dojftWR kyPtRAwFYq5ObwX9p5botspsm57zvXc6PXtbhPXTYPWADlt9tdpGvNTOOHtijrrD1FI4 zHpJxj9oj/qCnnMp0w8ePGbSC0GpGbzoOfwgDvxic6EKSSY/AnnQOoBEYuyDy64T+EYE lusw== X-Gm-Message-State: AOJu0Yyckle5D9ongY5RBK3gSQn2ekoXS3AWqBkodbPlJYAtI7rLSR4Z 0V5Ywh9smZ6pIL+lL91RGNA28Q5a4/uHMVy4t+H3zA0vpijpUQTwIYGhPC7+uxU+DUEek3yP/ai t9zHm7Q== X-Gm-Gg: ASbGncvlJCeejiCJO83YI6dgIeCk6KdSrHtMloEWIfamARFV5RIP5kFsITm2ohXbvh2 Cg0njdBsgl/lTiSlZ0wX9Px025C/xW1xRpYIbKoGKR1+hT0lbbjrYe4xXOk4TwWH2TFmt5JmRWF uTerPNoQCiHBdwGD1odf6dmY1/nLtPq3/SZwqWD0CUQpLQm+PgnJLHtryv7gSPrUevN0lOkeBbP BJH7aNs2WOISCwFkxhG+kWB+U05ZCDq98VHBNur2vcYgMCe2yVexksoG3q77NAPw9lz/A== X-Received: by 2002:a5d:5984:0:b0:37d:54de:1609 with SMTP id ffacd0b85a97d-38260b4574fmr10136601f8f.10.1732535815339; Mon, 25 Nov 2024 03:56:55 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:7b40:ce24:60a6:e419]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb271ffsm10139626f8f.53.2024.11.25.03.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 03:56:54 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Heinrich Schuchardt , Tom Rini Subject: [PATCH v4 4/4] test: lib: Use CONFIG_64BIT to detect 64 bit compile Date: Mon, 25 Nov 2024 11:55:54 +0000 Message-Id: <20241125115554.1707080-5-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125115554.1707080-1-andrew.goodbody@linaro.org> References: <20241125115554.1707080-1-andrew.goodbody@linaro.org> MIME-Version: 1.0 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 Should use CONFIG_64BIT to detect a 64 bit compile and not CONFIG_PHYS_64BIT. This allows more platforms to run the full test code. Reviewed-by: Simon Glass Signed-off-by: Andrew Goodbody --- (no changes since v3) Changes in v3: New patch added for this version. test/lib/str.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/lib/str.c b/test/lib/str.c index e62045318c..48351abc75 100644 --- a/test/lib/str.c +++ b/test/lib/str.c @@ -224,13 +224,13 @@ static int str_itoa(struct unit_test_state *uts) ut_asserteq_str("4294967295", simple_itoa(0xffffffff)); /* Use #ifdef here to avoid a compiler warning on 32-bit machines */ -#ifdef CONFIG_PHYS_64BIT +#ifdef CONFIG_64BIT if (sizeof(ulong) == 8) { ut_asserteq_str("9223372036854775807", simple_itoa((1UL << 63) - 1)); ut_asserteq_str("18446744073709551615", simple_itoa(-1)); } -#endif /* CONFIG_PHYS_64BIT */ +#endif /* CONFIG_64BIT */ return 0; } @@ -244,13 +244,13 @@ static int str_xtoa(struct unit_test_state *uts) ut_asserteq_str("ffffffff", simple_xtoa(0xffffffff)); /* Use #ifdef here to avoid a compiler warning on 32-bit machines */ -#ifdef CONFIG_PHYS_64BIT +#ifdef CONFIG_64BIT if (sizeof(ulong) == 8) { ut_asserteq_str("7fffffffffffffff", simple_xtoa((1UL << 63) - 1)); ut_asserteq_str("ffffffffffffffff", simple_xtoa(-1)); } -#endif /* CONFIG_PHYS_64BIT */ +#endif /* CONFIG_64BIT */ return 0; }