From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4CD6C38A02 for ; Mon, 31 Oct 2022 10:28:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C8266B0071; Mon, 31 Oct 2022 06:28:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 477BB6B0073; Mon, 31 Oct 2022 06:28:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33F448E0001; Mon, 31 Oct 2022 06:28:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 0AA7D6B0071 for ; Mon, 31 Oct 2022 06:28:22 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 9D25C1608BB for ; Mon, 31 Oct 2022 10:28:21 +0000 (UTC) X-FDA: 80080870002.07.4DDD7A9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf02.hostedemail.com (Postfix) with ESMTP id EB0C780043 for ; Mon, 31 Oct 2022 10:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667212100; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/hIeJVnchaNxDIQLVeOkkO5U18ich1B9OkG0LgN+vzo=; b=i3lDS4IFRGMDaMUQu93N7YeMqN0tWMRsudw1EErSJMFtkVcgT9W6MRnXVrRiDSoT1xIlUi giyE3mxHZgXuG1puv2kpcOY1ffB7FvR8+4Sn63QecD8qtNJyl/UzhFeoNQSTDN40fomOmL ld04RkN5f9qpWlnxHhtjsoyqXdNw4Vk= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-573-NZIZ37BbOriiMI7Xc0vDuQ-1; Mon, 31 Oct 2022 06:28:18 -0400 X-MC-Unique: NZIZ37BbOriiMI7Xc0vDuQ-1 Received: by mail-wm1-f69.google.com with SMTP id f62-20020a1c3841000000b003cf6d9aacbbso912759wma.8 for ; Mon, 31 Oct 2022 03:28:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:organization:from :references:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/hIeJVnchaNxDIQLVeOkkO5U18ich1B9OkG0LgN+vzo=; b=FT5sFGPxBnVpVsP8g0r50SpT/ALKzAoJYOCmerY4X4B3sejDFh6KMpljM6g+pa33x6 Lqh3wj5/rl7mNEhhJcUkkc4/lXcR85Odjy6c4I7Aq5q9RjSfyVBnmNWCEzu1atbZCGGY FRcpdlttkoS56vbJX/dvN4avkdIp1AMlyV/OcgeDTDCxmtixCdLSe1IyE7ve55aKuf2u 6ne/zRzFRSRaikk7qHcA9dwFBH6PezgKbf5k0AF5OWRlsgbALpctrjNF48+obw0ZWP0s ywwYwcw8wSHf+M4zARwe5Dn6Ac7yhhj/2a9IfChpi25xXe/3myz2FuCeAN3SGDiil07X iF+g== X-Gm-Message-State: ACrzQf3xePQA2BDJ3LJQ/OkWhFO6NeQynhJmyamC6/pK5UyeysnncUEO vuo0LIj0FaHcRU29Dz8ityr5rLieP4mQ+3KAkriU+F9WBBqER94BBY5L5c243HDDtiNPWVMPaGy zrRUED4v9nbM= X-Received: by 2002:adf:dd12:0:b0:236:6ef7:dacf with SMTP id a18-20020adfdd12000000b002366ef7dacfmr7421294wrm.204.1667212097621; Mon, 31 Oct 2022 03:28:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ydPFfgWp2fYwXo04xgnbDjn+PJoF9QYc3RViQ0SveCErN/DxpTH63zs/QvfNCPP/X+35XUA== X-Received: by 2002:adf:dd12:0:b0:236:6ef7:dacf with SMTP id a18-20020adfdd12000000b002366ef7dacfmr7421277wrm.204.1667212097269; Mon, 31 Oct 2022 03:28:17 -0700 (PDT) Received: from ?IPV6:2003:cb:c705:b300:ab9a:1f1f:ddaf:3b1d? (p200300cbc705b300ab9a1f1fddaf3b1d.dip0.t-ipconnect.de. [2003:cb:c705:b300:ab9a:1f1f:ddaf:3b1d]) by smtp.gmail.com with ESMTPSA id j18-20020a5d6192000000b00228692033dcsm6652894wru.91.2022.10.31.03.28.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 03:28:16 -0700 (PDT) Message-ID: Date: Mon, 31 Oct 2022 11:28:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 To: Rebecca Mckeever , Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: From: David Hildenbrand Organization: Red Hat Subject: Re: [PATCH v3 1/5] memblock tests: introduce range tests for memblock_alloc_exact_nid_raw In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667212101; a=rsa-sha256; cv=none; b=UCCJZAtcoLqnqWDRDJGfE48/CTTrAvA5kzFZVUcfeEo1D6VFWtP2WD5xfuYImY75IrGkyO lcEhoHM2Loqso7Yy4N7PAjTewFymdNEUOKTKRIyQ3x+K0mGk1KzKv8W7w9XnFfpAXNiM6F I05fOjSfrm4cBNBkL5hpF4XoBO2H7UA= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=i3lDS4IF; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf02.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667212101; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/hIeJVnchaNxDIQLVeOkkO5U18ich1B9OkG0LgN+vzo=; b=d2v/iUCO0LOIg6NQsROKKbhvTgJiiPtp6aqm+KEN8bkNwjDHQI/YPgeVhKrwa+klK9hf3q 4/UB65UXTuEXed0ONtSXqsHm4IbNy1jYsukk2BJ9BNeGZ/mH+EtfUM3g+nwpPAQdVZyJZm PnrmbpwQq4sb5IVHuvklQpu+BWNqUt8= X-Stat-Signature: pud1crxqmwfe5aot8a3qzek4n8px9wn4 X-Rspamd-Queue-Id: EB0C780043 X-Rspam-User: Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=i3lDS4IF; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf02.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam09 X-HE-Tag: 1667212100-907641 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 19.10.22 20:34, Rebecca Mckeever wrote: > Add TEST_F_EXACT flag, which specifies that tests should run > memblock_alloc_exact_nid_raw(). Introduce range tests for > memblock_alloc_exact_nid_raw() by using the TEST_F_EXACT flag to run the > range tests in alloc_nid_api.c, since memblock_alloc_exact_nid_raw() and > memblock_alloc_try_nid_raw() behave the same way when nid = NUMA_NO_NODE. > > Rename tests and other functions in alloc_nid_api.c by removing "_try". > Since the test names will be displayed in verbose output, they need to > be general enough to refer to any of the memblock functions that the > tests may run. > > Signed-off-by: Rebecca Mckeever [...] > diff --git a/tools/testing/memblock/tests/alloc_nid_api.c b/tools/testing/memblock/tests/alloc_nid_api.c > index 2c2d60f4e3e3..df8e7e038cab 100644 > --- a/tools/testing/memblock/tests/alloc_nid_api.c > +++ b/tools/testing/memblock/tests/alloc_nid_api.c > @@ -18,18 +18,27 @@ static const unsigned int node_fractions[] = { > 625, /* 1/16 */ > }; > > -static inline const char * const get_memblock_alloc_try_nid_name(int flags) > +static inline const char * const get_memblock_alloc_nid_name(int flags) > { > + if (flags & TEST_F_EXACT) > + return "memblock_alloc_exact_nid_raw"; > if (flags & TEST_F_RAW) > return "memblock_alloc_try_nid_raw"; > return "memblock_alloc_try_nid"; > } > > -static inline void *run_memblock_alloc_try_nid(phys_addr_t size, > - phys_addr_t align, > - phys_addr_t min_addr, > - phys_addr_t max_addr, int nid) > +static inline void *run_memblock_alloc_nid(phys_addr_t size, > + phys_addr_t align, > + phys_addr_t min_addr, > + phys_addr_t max_addr, int nid) > { I think we want to assert here that TEST_F_EXACT without TEST_F_RAW is not set --- because there is no API to support it. Apart from that Acked-by: David Hildenbrand Thanks! -- Thanks, David / dhildenb