From c170b69602ad865b9fb01241b4ebf8dbe32297fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Mon, 2 Jul 2018 23:14:34 +0200 Subject: [PATCH] realtime-virtual-host: Fix verification in script.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code was completely broken. Jaroslav and I think the purpose of the code was to check that the files /sys/module/kvm/parameters/kvmclock_periodic_sync /sys/module/kvm_intel/parameters/ple_gap contain "0", which we think is the (at least intended) result of profiles/functions:setup_kvm_mod_low_latency(). So I'm fixing it to do that. Signed-off-by: Ondřej Lysoněk --- profiles/realtime-virtual-host/script.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh index e821bef..22bc1bc 100755 --- a/profiles/realtime-virtual-host/script.sh +++ b/profiles/realtime-virtual-host/script.sh @@ -104,12 +104,14 @@ stop() { verify() { python /usr/libexec/tuned/defirqaffinity.py "verify" "$TUNED_isolated_cores_expanded" - retval = "$?" + retval=$? if [ $retval -eq 0 -a -f /sys/module/kvm/parameters/kvmclock_periodic_sync ]; then - retval = `cat /sys/module/kvm/parameters/kvmclock_periodic_sync` + test "$(cat /sys/module/kvm/parameters/kvmclock_periodic_sync)" = 0 + retval=$? fi if [ $retval -eq 0 -a -f /sys/module/kvm_intel/parameters/ple_gap ]; then - retval = `cat /sys/module/kvm_intel/parameters/ple_gap` + test "$(cat /sys/module/kvm_intel/parameters/ple_gap)" = 0 + retval=$? fi return $retval }