summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/timers/freq-step.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2017-09-28 15:56:49 +0300
committerJani Nikula <jani.nikula@intel.com>2017-09-28 15:56:49 +0300
commit32f35b863451884e856f0f577474740561a87fad (patch)
tree2d1d55c7e2d23e27197bf84246c5f23070eb0fce /tools/testing/selftests/timers/freq-step.c
parentae7617f0ef1820be033eef93859a6bb6174a843f (diff)
parent754270c7c56292e97d0eff924a5d5d83f92add07 (diff)
downloadop-kernel-dev-32f35b863451884e856f0f577474740561a87fad.zip
op-kernel-dev-32f35b863451884e856f0f577474740561a87fad.tar.gz
Merge drm-upstream/drm-next into drm-intel-next-queued
Need MST sideband message transaction to power up/down nodes. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools/testing/selftests/timers/freq-step.c')
-rw-r--r--tools/testing/selftests/timers/freq-step.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/testing/selftests/timers/freq-step.c b/tools/testing/selftests/timers/freq-step.c
index e8c6183..14a2b77 100644
--- a/tools/testing/selftests/timers/freq-step.c
+++ b/tools/testing/selftests/timers/freq-step.c
@@ -33,6 +33,10 @@
#define MAX_FREQ_ERROR 10e-6
#define MAX_STDDEV 1000e-9
+#ifndef ADJ_SETOFFSET
+ #define ADJ_SETOFFSET 0x0100
+#endif
+
struct sample {
double offset;
double time;
@@ -229,10 +233,9 @@ static void init_test(void)
printf("CLOCK_MONOTONIC_RAW+CLOCK_MONOTONIC precision: %.0f ns\t\t",
1e9 * precision);
- if (precision > MAX_PRECISION) {
- printf("[SKIP]\n");
- ksft_exit_skip();
- }
+ if (precision > MAX_PRECISION)
+ ksft_exit_skip("precision: %.0f ns > MAX_PRECISION: %.0f ns\n",
+ 1e9 * precision, 1e9 * MAX_PRECISION);
printf("[OK]\n");
srand(ts.tv_sec ^ ts.tv_nsec);
@@ -262,7 +265,7 @@ int main(int argc, char **argv)
set_frequency(0.0);
if (fails)
- ksft_exit_fail();
+ return ksft_exit_fail();
- ksft_exit_pass();
+ return ksft_exit_pass();
}
OpenPOWER on IntegriCloud