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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 926C3C54FB9 for ; Fri, 17 Nov 2023 20:58:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232067AbjKQU6Y (ORCPT ); Fri, 17 Nov 2023 15:58:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232195AbjKQU6V (ORCPT ); Fri, 17 Nov 2023 15:58:21 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFB03B6 for ; Fri, 17 Nov 2023 12:58:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rzRni3SyCzvfWCvZwkgGkrmcDNOymWMsu+dejMBz2eA=; b=JpU+e3o9oEBqqeK+qfnkW1baFa tqxEYyJjfTIgWLL+cs59Tg1X4fa+MjLZOwpLLEUU2jKGj9CneHjpc20Aa6k+KuKuZxfB9yUv0m1fT tKrVn/RY1H/qc5gjT9di9Nl7Jab5OOl3CqaVyrtMMhf8kfZ83iH+2yzay8abq8oZtMJidk4PK0JFR wR8CiySx7wx+VEELHiDRcC77Wzd0kpcZqTeUU1yxoEa8obQaMEpkw37VRi87cc2RhA8bGSm9zQVv4 taMwfq8NyZqFDuCrnSaRiwNwIM6/NORQtGqEGJHoYZbdFCGpgjgxUgr9iKT7BdRkaXYcg4ru5rNCf HEyl+d7A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1r45uf-00BZLy-Ea; Fri, 17 Nov 2023 20:58:05 +0000 Date: Fri, 17 Nov 2023 20:58:05 +0000 From: Matthew Wilcox To: Luis Chamberlain Cc: kernel test robot , Daniel Gomez , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, "gost.dev@samsung.com" , Pankaj Raghav Subject: Re: [PATCH 1/2] test_xarray: add tests for advanced multi-index use Message-ID: References: <20231104005747.1389762-2-da.gomez@samsung.com> <202311152254.610174ff-oliver.sang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 17, 2023 at 12:54:09PM -0800, Luis Chamberlain wrote: > +/* > + * Can be used in contexts which busy loop on large number of entries but can > + * sleep and timing is if no importance to test correctness. > + */ > +#define XA_BUG_ON_RELAX(xa, x) do { \ > + if ((tests_run % 1000) == 0) \ > + schedule(); \ > + XA_BUG_ON(xa, x); \ > +} while (0) That is awful. Please don't do that. You're mixing two completely unrelated thing into the same macro, which makes no sense. Not only that, it's a macro which refers to something in the containing environment that isn't a paramter to the macro.