From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4679948BFE; Mon, 1 Dec 2025 23:04:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F215C4042F; Mon, 1 Dec 2025 23:04:28 +0100 (CET) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) by mails.dpdk.org (Postfix) with ESMTP id C3E834013F for ; Mon, 1 Dec 2025 23:04:27 +0100 (CET) Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-8b1f2fbaed7so429718285a.2 for ; Mon, 01 Dec 2025 14:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1764626667; x=1765231467; darn=dpdk.org; 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=8Lp92mt8DEs+4Z3BFcQSxKPGzAOcDpLQADktLILshNQ=; b=R/KQ/oO1zXIPz5WCBcEUVbGHHz00KJbyp6FBL9mjnu1mK6aNGiXwbiIW3OsoPDsBEi yGLGvVE+rpLV+hcwXRftwPlpjvrbgpv2zLzfiLvrcf5W2t8g5CGNjynNsLXByOyilVrc Mg0v9HCrTftXEwQNdYSxZB6tU2KvNs62e6GoEDn0E8NMJSsTK6SucaoWdix1hKeY00i5 NOqAvAIK/CZ1LJZq3cwUdIBw+NuZtFJ9/fSmb0adh1SHirs/AlUfDqQw9gPa0xm105HI hgyVAJcL8zHMRYfTJGYj761ZMEqKoFCSJDnkLW5pRglILzW6Y9kFf54B5vxB3Fvv2KwD tavw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764626667; x=1765231467; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject: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ldIhetq8rQ7vH4dswN1vcoODKpDQ== X-Google-Smtp-Source: AGHT+IGF26UHdGOtBRQg/zKifYjon8dvd95Y23dQZlNwFUo3Xt2j5eOrSbRw2Uh5yd0HvCyEFInUmQ== X-Received: by 2002:a05:620a:400a:b0:8b1:c1d3:8e80 with SMTP id af79cd13be357-8b33d4d09dbmr4860845485a.58.1764626666900; Mon, 01 Dec 2025 14:04:26 -0800 (PST) Received: from phoenix.lan (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8b52a1cad4esm934398885a.45.2025.12.01.14.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Dec 2025 14:04:26 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Bruce Richardson , Anatoly Burakov Subject: [PATCH v9 1/9] test: increase size of memzone name Date: Mon, 1 Dec 2025 14:01:59 -0800 Message-ID: <20251201220421.207285-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251201220421.207285-1-stephen@networkplumber.org> References: <20251110182209.104087-1-stephen@networkplumber.org> <20251201220421.207285-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The tests were using a name buffer of 20 characters which could overflow if number of memory zones got large. The upper limit is defined as RTE_MEMZONE_NAMESIZE so use that. In function ‘test_memzone_free’, inlined from ‘test_memzone’ at ../app/test/test_memzone.c:1117:6: ../app/test/test_memzone.c:52:35: warning: ‘%u’ directive output may be truncated writing between 1 and 10 bytes into a region of size 4 [-Wformat-truncation=] 52 | #define TEST_MEMZONE_NAME(suffix) "MZ_TEST_" suffix | ^~~~~~~~~~ ../app/test/test_memzone.c:931:46: note: in expansion of macro ‘TEST_MEMZONE_NAME’ 931 | snprintf(name, sizeof(name), TEST_MEMZONE_NAME("tempzone%u"), | ^~~~~~~~~~~~~~~~~ ../app/test/test_memzone.c:52:35: note: directive argument in the range [0, 2147483647] 52 | #define TEST_MEMZONE_NAME(suffix) "MZ_TEST_" suffix | ^~~~~~~~~~ ../app/test/test_memzone.c:931:46: note: in expansion of macro ‘TEST_MEMZONE_NAME’ 931 | snprintf(name, sizeof(name), TEST_MEMZONE_NAME("tempzone%u"), | ^~~~~~~~~~~~~~~~~ ../app/test/test_memzone.c:931:17: note: ‘snprintf’ output between 18 and 27 bytes into a destination of size 20 931 | snprintf(name, sizeof(name), TEST_MEMZONE_NAME("tempzone%u"), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 932 | i); | Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- app/test/test_memzone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c index 506725ea41..6586dad18d 100644 --- a/app/test/test_memzone.c +++ b/app/test/test_memzone.c @@ -872,7 +872,7 @@ test_memzone_free(void) { const struct rte_memzone **mz; int i; - char name[20]; + char name[RTE_MEMZONE_NAMESIZE]; int rc = -1; mz = rte_calloc("memzone_test", rte_memzone_max_get() + 1, -- 2.51.0