All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] testsuite/xeno-test: Stop systemd-timesyncd across smokey runs
@ 2021-06-09 19:53 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2021-06-09 19:53 UTC (permalink / raw)
  To: Xenomai

From: Jan Kiszka <jan.kiszka@siemens.com>

With dovetail, clock_settime affects the Linux wall clock as well. When
systemd-timesyncd is running, the posix-clock test will fail because its
check of clock settings will immediately be overwritten by timesyncd
again. So stop that service if present and running and restart it after
the test.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 testsuite/xeno-test/xeno-test.in | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/testsuite/xeno-test/xeno-test.in b/testsuite/xeno-test/xeno-test.in
index 505adfd75..95bf59606 100644
--- a/testsuite/xeno-test/xeno-test.in
+++ b/testsuite/xeno-test/xeno-test.in
@@ -82,7 +82,18 @@ echo 0 > /proc/xenomai/latency || :
 
 testdir=@testdir@
 
+timesyncd_running=false
+if which systemctl > /dev/null && systemctl is-active --quiet systemd-timesyncd; then
+    timesyncd_running=true
+    systemctl stop systemd-timesyncd
+fi
+
 $testdir/smokey --run $run_on_vm $keep_going random_alloc_rounds=64 pattern_check_rounds=64
+
+if $timesyncd_running; then
+    systemctl start systemd-timesyncd
+fi
+
 $testdir/clocktest -D -T 30 -C CLOCK_HOST_REALTIME || $testdir/clocktest -T 30
 $testdir/switchtest -T 30
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-09 19:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 19:53 [PATCH] testsuite/xeno-test: Stop systemd-timesyncd across smokey runs Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.