diff options
author | Mark Brown <broonie@kernel.org> | 2024-02-11 19:58:17 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-02-12 16:55:51 +0300 |
commit | 2f0dbb24f78a333433a2b875c0b76bf55c119cd4 (patch) | |
tree | 77de26cc5b97304be313ffc52dface40c58b0fe2 /Kbuild | |
parent | 7011b51f13b391ee06708bb1f82653a2953f8cfc (diff) | |
download | linux-2f0dbb24f78a333433a2b875c0b76bf55c119cd4.tar.xz |
regmap: kunit: Ensure that changed bytes are actually different
During the cache sync test we verify that values we expect to have been
written only to the cache do not appear in the hardware. This works most
of the time but since we randomly generate both the original and new values
there is a low probability that these values may actually be the same.
Wrap get_random_bytes() to ensure that the values are different, there
are other tests which should have similar verification that we actually
changed something.
While we're at it refactor the test to use three changed values rather
than attempting to use one of them twice, that just complicates checking
that our new values are actually new.
We use random generation to try to avoid data dependencies in the tests.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://msgid.link/r/20240211-regmap-kunit-random-change-v3-1-e387a9ea4468@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions