From ccbb294f9d43587f5452aa4b102a95a3f5ab3596 Mon Sep 17 00:00:00 2001
From: josar <josuaarndt@live.de>
Date: Wed, 14 Nov 2018 01:01:07 +0100
Subject: [PATCH] tests/xtimer_drift: increase priority of worker

When the slacker threads and the worker thread have the same priority
the drift and jitter depend on the workload.
Timer set before the worker thread will be fired before the worker and so
the result is not the timings the system might reach when proper priority
is set. Increasing the priority of the worker thread ensures that the
measureed timings are the achievable timings.
---
 tests/xtimer_drift/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/xtimer_drift/main.c b/tests/xtimer_drift/main.c
index dcdfa77c8c..c442d77988 100644
--- a/tests/xtimer_drift/main.c
+++ b/tests/xtimer_drift/main.c
@@ -163,7 +163,7 @@ int main(void)
 
     /* create and trigger worker thread */
     kernel_pid_t pid3 = thread_create(worker_stack, sizeof(worker_stack),
-                                      THREAD_PRIORITY_MAIN - 1,
+                                      THREAD_PRIORITY_MAIN - 2,
                                       THREAD_CREATE_STACKTEST,
                                       worker_thread, NULL, "worker");
 
-- 
GitLab