Re: [PATCH v3] regmap: kunit: Ensure that changed bytes are actually different

From: Mark Brown
Date: Mon Feb 12 2024 - 09:07:37 EST


On Sun, Feb 11, 2024 at 10:54:25AM -0800, Guenter Roeck wrote:
> On Sun, Feb 11, 2024 at 04:58:17PM +0000, Mark Brown wrote:

> > - KUNIT_EXPECT_MEMNEQ(test, &hw_buf[6], val, sizeof(u16));
> > + KUNIT_EXPECT_MEMNEQ(test, &hw_buf[2], &val[0], sizeof(val));

> I kept those two checks separate on purpose because a non-equal check
> will "succeed" if a single byte is different. That means the above check
> will "pass" if one of regmap_raw_write() or regmap_write() works but
> the other is broken.

Good point, I'll do an incremental change for that though since that's
more of a belt and braces thing for something that should be checked
elsewhere than a core part of the test here.

Attachment: signature.asc
Description: PGP signature