Re: [PATCH 03/16] lib/test_bitmap: don't test bitmap_set if nbits == 0

From: Andy Shevchenko
Date: Mon Jul 18 2022 - 17:08:58 EST


On Mon, Jul 18, 2022 at 12:28:31PM -0700, Yury Norov wrote:
> Don't test bitmap_set(bitmap, start, 0) as it's useless, most probably
> a sign of error in real code, and makes CONFIG_DEBUG_BITMAP barking.

No, the test of not useful and sign of an error is a good thing to test!
Test cases may be positive, may be negative. Code shouldn't fail badly because
of that.

I tend to give a NAK here.

--
With Best Regards,
Andy Shevchenko