[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d7c61e25-f09e-4260-8228-d28f0289795a@redhat.com>
Date: Tue, 3 Jun 2025 22:18:32 +0200
From: David Hildenbrand <david@...hat.com>
To: Mark Brown <broonie@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/4] selftests/mm: Add helper for logging test start
and results
On 03.06.25 20:27, Mark Brown wrote:
> On Tue, Jun 03, 2025 at 02:37:41PM +0200, David Hildenbrand wrote:
>> On 27.05.25 18:04, Mark Brown wrote:
>
>>> +static char test_name[1024];
>>> +
>>> +static inline void log_test_start(const char *name, ...)
>>> +{
>>> + va_list args;
>>> + va_start(args, name);
>>> +
>>> + vsnprintf(test_name, sizeof(test_name), name, args);
>>> + ksft_print_msg("[RUN] %s\n", test_name);
>
>> We could allocate the array in log_test_start() and free it in
>> log_test_result(). Then, we could assert more easily that we always have a
>> log_test_result() follow exactly one log_test_start() etc.
>
> We could, however we don't have vasprintf() in nolibc and people have
> been doing work towards making nolibc more generally useful as a libc
> for the selftests (and/or the selftest interfaces more friendly to
> nolibc). I don't really know what the end goal with that is but given
> the fairly small gain and the hope that this won't be a long term
> framework for anything I'd rather not add something that gets in the way
> of whatever's going on there.
>
> Ideally the test programs would be refactored and these helpers deleted,
> but as we said previously that's a bigger job that neither of us is
> likely to get to in the short term :(
Jup ...
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists