From patchwork Wed Nov 20 10:01:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goodbody X-Patchwork-Id: 844525 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:8b:b0:382:43a8:7b94 with SMTP id m11csp1618088wrx; Wed, 20 Nov 2024 02:03:04 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVpCw4DW3dAxKojmH5vzhPDMHgRnbAn/SDQPCGFnmNzQnE9JaQ/jTT3qkDer6fe4Mq8d7ZoQg==@linaro.org X-Google-Smtp-Source: AGHT+IGzQm25gtbGVKFAPuq7kR5VztHZJyOheLMEL+rQFOJnHFQUoJgOq5CtS1kn6/Sboact8bQr X-Received: by 2002:a05:651c:210e:b0:2ff:55f0:ae52 with SMTP id 38308e7fff4ca-2ff8db15f24mr17292701fa.4.1732096984566; Wed, 20 Nov 2024 02:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732096984; cv=none; d=google.com; s=arc-20240605; b=VCeraafYgBXJodZbiImO1E1NSnMdqpUKTopnjWln+UbJhERhWY2jdW1pF3kqMANL2y S4KGs/AW7fXjIzCX9lziUpuCAYTik8IqsxVNLBX0H7D9oyT8VyHu8deNUYzIRoEwVOuM lKLKwTa/etjAPRqYOMI55s7Vs3iem/tJEnE71FUkP9myq7TEHwgg0Y+R54CC5YI1YOTg ZLufdkHzmzm8R/qDFfx+Wco6fBLn5DyoZ3PdhZuutAxmB++pbmpHiuYrz84Nj74ou1kg e+7BAtzqrBUciBug/tUPXNR/AUr/2fqsgi3277AdYLtUVVNigwpwnO1ZTQ9h7ltcHWkX n/5w== 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=cmAW8/LIad3dpkshTTwsYb3oxmsfByZwJqz4iRcC7XE=; fh=mvv6mVRmKOPcEmZLoMLLhpun845FJri2xT3sxnR+3xI=; b=cQWGFqMHnInfgyL2ETdq5OoUK/T9v2HldM/hAbnAWTZ19kOuePbPq0M61oRat7XlW6 ziMW4MzVL+0DHz3qgMx6eAgtb+U0rEZqCUvGY8zKqi+zhPJwhyN/oBOVFTUPEvWST31A 1fxjyrkU3m28Y6oPuPUPvSG1D6dIcRg6ZGoPp9tpLI24hvU0zPqNOL2xlAQKEGtjUrEt +Ys43EQt+sFpmzbh+Dj0YpiPLulVNlom050ZhWLlmKc9PXLB5DvzOX53d0LOjm8TItN1 WmBZ6krIIMC1z5hNw/cn7VbPJEV+gRWzcBzJ26Hr4Q8ZUjtNLfvcl/aOWueLW/zub/cH GfBQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tLqWhfuH; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-aa20e0c36dasi782045866b.652.2024.11.20.02.03.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:03:04 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tLqWhfuH; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 0D313896A8; Wed, 20 Nov 2024 11:02:41 +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="tLqWhfuH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8D5958969D; Wed, 20 Nov 2024 11:02:40 +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-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 97BC2895D2 for ; Wed, 20 Nov 2024 11:02:38 +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-x32a.google.com with SMTP id 5b1f17b1804b1-4315eeb2601so56418515e9.2 for ; Wed, 20 Nov 2024 02:02:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732096958; x=1732701758; 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=cmAW8/LIad3dpkshTTwsYb3oxmsfByZwJqz4iRcC7XE=; b=tLqWhfuHmjQSnh/vMYkFQ/OVE6GvN1BI116wz+69S+YMp06fiy0usZQ0ZWSdLwITlW 0TY4TM47PWJKhYHXJQxOaabDk87cm3GVixAvOTNJ3cwQpdHHbhTRGm4ViiozvDu/nrBK h/8BJ44VbyJL98sNafot6CrOkn1yjAhOhHlw1KqzocxA2TeMXKSLe2UtW8ztrwsm03RZ 68b4Sf8LMZe+dcJwxWgGcsQ++sU38lSjUFh/iolIJc8JgWK/AH9MY9mqOka2WuEIZf3W /PO3MlOqD1q38+RZ/BK3LWsxOkk5hzaokbr/36GxShCjzIDyc9C4+B2bkhjbri9hCrCb XRQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732096958; x=1732701758; 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=cmAW8/LIad3dpkshTTwsYb3oxmsfByZwJqz4iRcC7XE=; b=cXtYjrnpyd1NlJ6SsRSUuJfm8oSZkmkWYAa1wlVhSMQUsiONT1TmLY8jmXb+cn7cfk XMdsv2ss0aC41t57jUn3x7gkJNEvHGNNpGgCL068PntEoyUjqRKFIrDYcwHEheS+EUph WBOSsfWqN8gtXCNF+hjwp+yd7oPfWxy0kB0FK09Y9J2z9ozq8HJS+tzx5el4idF2dpmw q5fmRKd+yRLiKmuyN9Nyn4+oUCv5O9O3FZshJOdYgm4DFsntCTQj3SGoUprw1Avd5ZLT r32wx3fAStG/YE+eT5gw7z7+iNusBo2Xud+NEg7/Ofg480iY4RPKvynZLeKVKjYj9f1A IwiQ== X-Gm-Message-State: AOJu0YzZSWyh/WlspLx2tO38zlEBiiMsT5g+XcadSoBbdgZX2LYt0c+l KL2Y1/0cJvHYetQIrcmyqjTlzoCr5cKSmaVfAHD37LG/X8sYeXZ4CJIwfH+EpTA/FdkW3Wle8lr cgXcO4A== X-Received: by 2002:a05:600c:3b9c:b0:431:24c3:dbaa with SMTP id 5b1f17b1804b1-43348981499mr23088005e9.2.1732096958082; Wed, 20 Nov 2024 02:02:38 -0800 (PST) Received: from artemis2.broadband ([2a0a:ef40:edb:fc01:24e0:2f5f:4be2:4309]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45fa706sm13572655e9.16.2024.11.20.02.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 02:02:37 -0800 (PST) From: Andrew Goodbody To: u-boot@lists.denx.de Cc: Andrew Goodbody , Simon Glass , Tom Rini Subject: [PATCH v3 4/4] test: lib: Use CONFIG_64BIT to detect 64 bit compile Date: Wed, 20 Nov 2024 10:01:57 +0000 Message-Id: <20241120100157.485418-5-andrew.goodbody@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241120100157.485418-1-andrew.goodbody@linaro.org> References: <20241120100157.485418-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. Signed-off-by: Andrew Goodbody Reviewed-by: Simon Glass --- 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 3cc9dfea6a..0505aed09d 100644 --- a/test/lib/str.c +++ b/test/lib/str.c @@ -206,13 +206,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; } @@ -226,13 +226,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; }