From 48b8c2778184c6968977180d1671273c4a24d474 Mon Sep 17 00:00:00 2001 From: Nick Dokos Date: Fri, 15 Jul 2016 13:25:56 -0400 Subject: [PATCH] Fix condition for warning of already running tools. The condition should be -gt, not -ge (in both instances). Use extended test to get the precedence right. --- agent/tool-scripts/kvm-spinlock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/tool-scripts/kvm-spinlock b/agent/tool-scripts/kvm-spinlock index 20e35c4f24..013f84ed50 100755 --- a/agent/tool-scripts/kvm-spinlock +++ b/agent/tool-scripts/kvm-spinlock @@ -264,7 +264,7 @@ function safe_kill() { done # hack: individual tools will have a different number of pids running. # we might just delete the warning if it gets too cumbersome. - if [ $len -ge 4 -o $len -ge 3 -a $tool!="turbostat" ] ;then + if [[ $len > 4 || ($len > 3 && $tool != "turbostat") ]] ;then warn_log "Too many pids for $tool: $pidlist -- maybe old tools running? Use pbench-kill-tools." fi