From patchwork Wed Dec 14 07:51:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Lagerwall X-Patchwork-Id: 9473771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0726E60571 for ; Wed, 14 Dec 2016 07:54:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F142B28681 for ; Wed, 14 Dec 2016 07:54:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4FB8286D5; Wed, 14 Dec 2016 07:54:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A83EB28681 for ; Wed, 14 Dec 2016 07:54:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cH4MF-0001Yy-Lk; Wed, 14 Dec 2016 07:52:11 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cH4ME-0001Ym-6G for xen-devel@lists.xen.org; Wed, 14 Dec 2016 07:52:10 +0000 Received: from [85.158.143.35] by server-4.bemta-6.messagelabs.com id B9/53-25093-92AF0585; Wed, 14 Dec 2016 07:52:09 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeJIrShJLcpLzFFi42JxWrohUlfjV0C EwblvNhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8bVk8YFvzgqvrR9YW5gnMbexcjBISHgL7H3 SX4XIycHm4CBxK1L35lBbBEBWYnVXXOASrg4mAVWMErc+76TBSQhLBAmsb/pPSuIzSKgKnFqB kScV8BTYkPfAbC4hICcxM1znWCDOAW8JJof3WMDsYWAas4v38MKYatJvF1+BqpXUOLkzCdgNr OAhMTBFy+YJzDyzkKSmoUktYCRaRWjRnFqUVlqka6RoV5SUWZ6RkluYmaOrqGBmV5uanFxYnp qTmJSsV5yfu4mRmDoMADBDsY/ywIOMUpyMCmJ8nJdDYgQ4kvKT6nMSCzOiC8qzUktPsQow8Gh JMF7+AdQTrAoNT21Ii0zBxjEMGkJDh4lEd4rIGne4oLE3OLMdIjUKUZFKXHeOpCEAEgiozQPr g0WOZcYZaWEeRmBDhHiKUgtys0sQZV/xSjOwagkzKv+E2gKT2ZeCdz0V0CLmYAWiy7xB1lcko iQkmpglLoXfmKylEP2yvBJLFZ3ZiQ1mV5rmLOm48S79t7+iyELtLIW3PN6X8S6yrVNxbb2sbT VA6Zp2Z97rZY3OMz5t162QmWdTGlv5NGNrG8r9zUzRG3MlNjON+Fu39pG8Yvm7yUvPPhu4MYi +fTZbqEvyfXfanv1sh7f7l7577V5/CPz+kb9PdcXKrEUZyQaajEXFScCADWC2SiXAgAA X-Env-Sender: prvs=149da8861=ross.lagerwall@citrix.com X-Msg-Ref: server-6.tower-21.messagelabs.com!1481701927!25115382!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 39242 invoked from network); 14 Dec 2016 07:52:08 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 14 Dec 2016 07:52:08 -0000 X-IronPort-AV: E=Sophos;i="5.33,345,1477958400"; d="scan'208";a="394683830" From: Ross Lagerwall To: Date: Wed, 14 Dec 2016 07:51:53 +0000 Message-ID: <1481701920-13758-2-git-send-email-ross.lagerwall@citrix.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481701920-13758-1-git-send-email-ross.lagerwall@citrix.com> References: <1481701920-13758-1-git-send-email-ross.lagerwall@citrix.com> MIME-Version: 1.0 Cc: Ross Lagerwall , Ian Jackson , Wei Liu Subject: [Xen-devel] [PATCH v2 1/8] tools/livepatch: Show the correct expected state before action X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Somewhat confusingly, before the action has been executed the patch is expected to be in the "allow" state, not the "expected" state. The check for this was correct but the subsequent error message was not. Fix the error message to show this state correctly. Before: $ xen-livepatch unload test test: in wrong state (APPLIED), expected (unknown) After: $ xen-livepatch unload test test: in wrong state (APPLIED), expected (CHECKED) Signed-off-by: Ross Lagerwall Acked-by: Wei Liu --- tools/misc/xen-livepatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/misc/xen-livepatch.c b/tools/misc/xen-livepatch.c index 2de04c0..f6c7c8a 100644 --- a/tools/misc/xen-livepatch.c +++ b/tools/misc/xen-livepatch.c @@ -308,7 +308,7 @@ int action_func(int argc, char *argv[], unsigned int idx) { printf("%s: in wrong state (%s), expected (%s)\n", name, state2str(status.state), - state2str(action_options[idx].expected)); + state2str(action_options[idx].allow)); return -1; }