]> git.baikalelectronics.ru Git - kernel.git/commit
rhashtable: make test actually random
authorRolf Eike Beer <eike-kernel@sf-tec.de>
Fri, 21 Oct 2022 13:47:03 +0000 (15:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Oct 2022 12:39:09 +0000 (13:39 +0100)
commite36d9dd72ea471acc9d9efd83e770508263cfeb6
treea9b41c34d8ae43d10c4928c498fb15fe5a5b46dd
parent9bd667ec77de204a2d19c3cd0265e80bab2e9111
rhashtable: make test actually random

The "random rhlist add/delete operations" actually wasn't very random, as all
cases tested the same bit. Since the later parts of this loop depend on the
first case execute this unconditionally, and then test on different bits for the
remaining tests. While at it only request as much random bits as are actually
used.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/test_rhashtable.c