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 4135346054; Fri, 17 Jan 2025 17:57:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92CCA40B95; Fri, 17 Jan 2025 17:57:55 +0100 (CET) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id A0A0B40294 for ; Fri, 17 Jan 2025 17:57:54 +0100 (CET) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-2166651f752so56542205ad.3 for ; Fri, 17 Jan 2025 08:57:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1737133074; x=1737737874; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=NOgRU5lrazbLnUXLFXNyhVMRYXvD0m1cPMpZOfzF8Ks=; b=JCA59xvPHzC80Hsu0yT1JCLK3NO1QxQCx7aQaRAKmUYpXVTRqg22nZ/4225d98N6wZ mH4kPnvh2x+u8WISfz8NAlwvlBqxmabrf7bgsEmjT/oelo9zSKC/mbYNbIwARXeyz8qM QfQKtiwJUfRmmk8hSXvRufHimFu4oo/1PN/J5cmqIFiu/hk7I8fGUJbHRifyAZuJ5RlX rAboZxsvC6ysM+cB/AOyRGhZlI7o/T2KX2rg+JoOznsSXb9uxmC3c8GsL06ySRBxMzqp 7UpYCm68+daZ9cfddDJC4xi2t807jZpujTo2iJdEMFjswyXtP39BkdbJukhpvSq61tLm VwWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737133074; x=1737737874; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NOgRU5lrazbLnUXLFXNyhVMRYXvD0m1cPMpZOfzF8Ks=; b=cpoclTr+dmSHJPx8TlmNgO1cpWLI6e1Nqzj7xjk19LJBAVemUkzKDfvZsq+bvQifW5 Ej1X+hxY62XSAZbNTRJvyzwb8uOrZGvrvalWe4jKD1eGKCUy8JD9bSjw+23rlnymv1em Nd491hvJsGP25KUN6QflL4htTjAP2I+YeNdhPmVJD3uD1j6PBw39PQsL0aFhQGeXgdKQ u2SpAd7kKXSw/46P9ftgr1JnE7T4g11EPTEyqZg+M15U1P9U4Z0vzPT4lf4N8ZL5g1EA E0TVZ32AXdqwaxuLAMWMdVYmDjOuwaHBwRhJVlt0eZJ9dbFvd37khOw+JNO2cxLyKdF8 HXcg== X-Forwarded-Encrypted: i=1; AJvYcCWeFyKW8G9L+5QXO3FL4cGorIsal6nP7IHMFEjU35zyXTsYUtbqv5wJtLYzXqGV987Qbwo=@dpdk.org X-Gm-Message-State: AOJu0YxdPejrBOhLvQE9sZvHZR8uSPv+D8WtaSUwFDoCLqtXtGMXVoff Va+y7lsrgonZnkReos/8Pbx59nVeCiJwh4u4g8tyIQSRmFy4QC4g9wbddRynri4= X-Gm-Gg: ASbGnct+XPKEbJlm7qe6WzdFoQPgd3eUIt8QxOX6IlTxdkQCQg7tSKyD0CRSKOuZ2Jb VLbLRamheUVTmenVq4p8l+oP8/B7Un+4Lw5jBmQrd4HzXdwXClYmKCjwHmVpI8w2PkVcmPtg0Oq 6j48cl8Jum3zYMeKDAgqM3DEuxzI1BYHwVvesZGGTsqiuPGrgOf2YLcAXRi9hIc9U/HQEV4kSeO 1rtHB52FXGPkl9EpAPbjzGiAv7sZ2bertCG6D8NEjQ6TAMsm6XN/YeC6qRvVE5mVaEgqDmuvTYP 74NDvYhKmmId5mGs+t/HStqXWYxCLxJGAw== X-Google-Smtp-Source: AGHT+IF1fri+I4CbkckdHsKhDK3XDbArwup2P60Uq/PIPfbrgwC+5/VB5g0AtQ+Kksnkz4QwLA8jcQ== X-Received: by 2002:a05:6a00:4c18:b0:72d:8d98:c250 with SMTP id d2e1a72fcca58-72daf9a5535mr5294059b3a.4.1737133073737; Fri, 17 Jan 2025 08:57:53 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72dab9c8e95sm2164290b3a.106.2025.01.17.08.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 08:57:53 -0800 (PST) Date: Fri, 17 Jan 2025 08:57:51 -0800 From: Stephen Hemminger To: Bruce Richardson Cc: Dmitry Kozlyuk , , Subject: Re: [PATCH v2] test: improve resiliency of malloc autotest Message-ID: <20250117085751.42bc15ae@hermes.local> In-Reply-To: References: <20250117125912.985475-1-bruce.richardson@intel.com> <20250117135239.1980838-1-bruce.richardson@intel.com> <20250117172041.6bfacba7@sovereign> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Fri, 17 Jan 2025 14:26:01 +0000 Bruce Richardson wrote: > On Fri, Jan 17, 2025 at 05:20:41PM +0300, Dmitry Kozlyuk wrote: > > 2025-01-17 13:52 (UTC+0000), Bruce Richardson: > > > The test case "test_multi_alloc_statistics" was brittle in that it did > > > some allocations and frees and then checked statistics without > > > considering the initial state of the malloc heaps. This meant that, > > > depending on what allocations/frees were done beforehand, the test can > > > sometimes fail. > > > > > > We can improve resiliency by running the test using a new malloc heap, > > > which means it is unaffected by any previous allocations. > > > > > > Bugzilla ID: 1579 > > > Fixes: a40a1f8231b4 ("app: various tests update") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Bruce Richardson > > > --- > > > v2: > > > * removed unnecessary extra include > > > * only added new code for non-windows, since using mmap for allocation. > > > > Why is it necessary to use `mmap()` and not portable `malloc()`? > > Even the comment in the patch says "malloc" :) > > I did originally use malloc, but malloc didn't give us aligned memory so > the call to add the memory to the heap was subsequently failing. Use posix_memalign() or aligned_alloc() for that?