cpu clock: add independent test for monotonic/sane TSC
Fire up all threads on the system, checking the clock 100,000
times on each. Then collect and compare results, to ensure we
never have a clock that goes backwards.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/init.c b/init.c
index e90d735..c894af3 100644
--- a/init.c
+++ b/init.c
@@ -208,6 +208,11 @@
.val = 'C',
},
{
+ .name = (char *) "cpuclock-test",
+ .has_arg = no_argument,
+ .val = 'T',
+ },
+ {
.name = NULL,
},
};
@@ -1621,6 +1626,10 @@
optind++;
}
break;
+ case 'T':
+ do_exit++;
+ exit_val = fio_monotonic_clocktest();
+ break;
default:
do_exit++;
exit_val = 1;