1 /* ADJ_FREQ Skew consistency test
2 * by: john stultz (johnstul@us.ibm.com)
3 * (C) Copyright IBM 2012
4 * Licensed under the GPLv2
6 * NOTE: This is a meta-test which cranks the ADJ_FREQ knob back
7 * and forth and watches for consistency problems. Thus this test requires
8 * that the inconsistency-check tests be present in the same directory it
12 * $ gcc skew_consistency.c -o skew_consistency -lrt
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
30 #include <sys/timex.h>
32 #include <sys/types.h>
37 #include "../kselftest.h"
39 #define NSEC_PER_SEC 1000000000LL
41 int main(int argv
, char **argc
)
48 printf("Running Asynchronous Frequency Changing Tests...\n");
52 return system("./inconsistency-check -c 1 -t 600");
57 while (pid
!= waitpid(pid
, &ret
, WNOHANG
)) {
59 tx
.modes
= ADJ_FREQUENCY
;
66 tx
.modes
= ADJ_FREQUENCY
;
73 return ksft_exit_fail();
76 return ksft_exit_pass();