static void test18(void) { tprintf("Enter random seed: "); stresstest(geti(), false); }
static void test21(void) { tprintf("Enter random seed: "); stresstest(geti(), true); }
int main () { simpletest (); stresstest (); printf ("Tests passed.\n"); return 0; }
int main(int argc, char *argv[]) { int nreaders = 1; int duration = 1; qemu_mutex_init(&counts_mutex); if (argc >= 2 && argv[1][0] == '-') { g_test_init(&argc, &argv, NULL); if (g_test_quick()) { g_test_add_func("/rcu/torture/1reader", gtest_stress_1_1); g_test_add_func("/rcu/torture/10readers", gtest_stress_10_1); } else { g_test_add_func("/rcu/torture/1reader", gtest_stress_1_5); g_test_add_func("/rcu/torture/10readers", gtest_stress_10_5); } return g_test_run(); } if (argc >= 2) { nreaders = strtoul(argv[1], NULL, 0); } if (argc > 3) { duration = strtoul(argv[3], NULL, 0); } if (argc < 3 || strcmp(argv[2], "stress") == 0) { stresstest(nreaders, duration); } else if (strcmp(argv[2], "rperf") == 0) { rperftest(nreaders, duration); } else if (strcmp(argv[2], "uperf") == 0) { uperftest(nreaders, duration); } else if (strcmp(argv[2], "perf") == 0) { perftest(nreaders, duration); } usage(argc, argv); return 0; }
static void test20(void) { stresstest(getseed(), true); }
static void test19(void) { stresstest(0, true); }
static void test17(void) { stresstest(getseed(), false); }
static void test16(void) { stresstest(0, false); }