Default to doing expensive checks in rhc_torture
The entire point of this test program is to exercise the RHC while checking its internal state. The likelihood of (at least some) forgetting to enable the "expensive" checks has been proven to be significant. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
7f8f1d1a12
commit
347b6edf04
1 changed files with 13 additions and 1 deletions
|
@ -894,6 +894,7 @@ int main (int argc, char **argv)
|
||||||
uint32_t states_seen[2 * 2 * 3][2] = {{ 0 }};
|
uint32_t states_seen[2 * 2 * 3][2] = {{ 0 }};
|
||||||
unsigned seed = 0;
|
unsigned seed = 0;
|
||||||
bool print = false;
|
bool print = false;
|
||||||
|
int xchecks = 1;
|
||||||
int first = 0, count = 10000;
|
int first = 0, count = 10000;
|
||||||
|
|
||||||
ddsrt_mutex_init (&wait_gc_cycle_lock);
|
ddsrt_mutex_init (&wait_gc_cycle_lock);
|
||||||
|
@ -909,10 +910,21 @@ int main (int argc, char **argv)
|
||||||
count = atoi (argv[3]);
|
count = atoi (argv[3]);
|
||||||
if (argc > 4)
|
if (argc > 4)
|
||||||
print = (atoi (argv[4]) != 0);
|
print = (atoi (argv[4]) != 0);
|
||||||
|
if (argc > 5)
|
||||||
|
xchecks = atoi (argv[4]);
|
||||||
|
|
||||||
printf ("prng seed %u first %d count %d print %d\n", seed, first, count, print);
|
printf ("prng seed %u first %d count %d print %d xchecks %d\n", seed, first, count, print, xchecks);
|
||||||
ddsrt_prng_init_simple (&prng, seed);
|
ddsrt_prng_init_simple (&prng, seed);
|
||||||
|
|
||||||
|
if (xchecks != 0)
|
||||||
|
{
|
||||||
|
struct ddsi_domaingv *gv = get_gv (pp);
|
||||||
|
if (xchecks > 0)
|
||||||
|
gv->config.enabled_xchecks = ~0u;
|
||||||
|
else
|
||||||
|
gv->config.enabled_xchecks = 0u;
|
||||||
|
}
|
||||||
|
|
||||||
memset (rres_mseq, 0, sizeof (rres_mseq));
|
memset (rres_mseq, 0, sizeof (rres_mseq));
|
||||||
for (size_t i = 0; i < sizeof (rres_iseq) / sizeof(rres_iseq[0]); i++)
|
for (size_t i = 0; i < sizeof (rres_iseq) / sizeof(rres_iseq[0]); i++)
|
||||||
rres_ptrs[i] = &rres_mseq[i];
|
rres_ptrs[i] = &rres_mseq[i];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue