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)
commitc5f0a17288740573f4de72965c5294a60244c5fc
treea9b41c34d8ae43d10c4928c498fb15fe5a5b46dd
parent95a0396a0642d3c28b6cefdc76697e0b8f594825
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