[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZVfT3bs9+F0jqIAw@casper.infradead.org>
Date: Fri, 17 Nov 2023 20:58:05 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: kernel test robot <oliver.sang@...el.com>,
Daniel Gomez <da.gomez@...sung.com>, oe-lkp@...ts.linux.dev,
lkp@...el.com, linux-kernel@...r.kernel.org,
"gost.dev@...sung.com" <gost.dev@...sung.com>,
Pankaj Raghav <p.raghav@...sung.com>
Subject: Re: [PATCH 1/2] test_xarray: add tests for advanced multi-index use
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.
Powered by blists - more mailing lists