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 6E13746054 for ; Fri, 17 Jan 2025 17:57:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 658C74028F; Fri, 17 Jan 2025 17:57:55 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id 9C9744028F for ; Fri, 17 Jan 2025 17:57:54 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2166651f752so56542195ad.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=FSB4WqzFOyXxV/Z6s9SW+K3pqzCeGbs9F8AE8IwYFy5Sz6TH59vhO3Oke+afvKe4Mq g1y7ikS6Hw6mjd74zMjvQl7kZU1YElikSFkNYaIHb0WjT7FdC4w2fl9APDiwwlTTaNTt JMVLlywiuXXri3JwaiRiDTFX66aI/RK1UIOFfktn+5dyXD4tHJd0MlgnPpNWa95NgjKp g/Wp8s2pL6BS5+Eed2GR02EddlX0FiOdoX+K9YnbBqngQpdwO33i94Ot80U62vqgMVzp jl/zjGVOZ0gskx22Z9PnHF0PoXob2FB/PGRtDCRN242EOvM2H46z5HeiHVVZTG58hwIu NUsQ== X-Forwarded-Encrypted: i=1; AJvYcCX2oCYa6M21qYLIY/X2Qi6Sgu7T+38NZ4EZLGMVPxJKycFhqayV840b32PoH9RcXO8Rk2M8cnU=@dpdk.org X-Gm-Message-State: AOJu0Yz8iiaOWqIPuwxOegb6Jh/mgSbu0+2ZDvRTm0Gsy39uwj8HpaZq hiLDIwC+7Q4GoMo2grkKTPBN42SVyKvhkoQiq5KbDysXDjk3OLjBVa5ILtilvLP62n0+fvGX5NW n X-Gm-Gg: ASbGncv/N14REOVXhPm43IvkpkuFR6i3F/oXbujvzJAHNG1uDPzpDSIocPoxPqsy7ET nuPDWbzDXZr4PWKh98xGGmejhi48Go/6QEq+xf8NcXXv7X6XeqsF/K7I55GV5Wk9vbmV6OuoQGL 3VNz+Qr8MfRUxvMPg38C9DRPtrmLOP+qUO0Zz9nkm6msVouYv5k5oxE9hVKS3S38viDU9Thrat/ cAi0OUGIIVkkLMSqTQ9AoZ3BbiFF1skyzFPK3YwfN0X62bXT9FA7HKs3Z9QmMlIpdMsu7IbDcDj TU1di3x+eBemTz8q78tLSVK1LaEIzeM4jg== 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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?