From patchwork Mon Dec 12 16:18:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Lagerwall X-Patchwork-Id: 9470925 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 AA62360573 for ; Mon, 12 Dec 2016 16:24:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A226E284D4 for ; Mon, 12 Dec 2016 16:24:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9704E284D9; Mon, 12 Dec 2016 16:24:26 +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 3ABA9284D4 for ; Mon, 12 Dec 2016 16:24:26 +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 1cGTMf-0002ES-FN; Mon, 12 Dec 2016 16:22:09 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGTMd-0002D6-Uy for xen-devel@lists.xen.org; Mon, 12 Dec 2016 16:22:08 +0000 Received: from [85.158.143.35] by server-9.bemta-6.messagelabs.com id F4/C7-28694-FAECE485; Mon, 12 Dec 2016 16:22:07 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeJIrShJLcpLzFFi42JxWrohUnf9Ob8 IgxW/2C2WfFzM4sDocXT3b6YAxijWzLyk/IoE1oyfD9+zF1zhqLh+07iB8QtbFyMHh4SAv8Se VQJdjJwcbAIGErcufWcGsUUEZCVWd81h72Lk4mAWWMEoce/7ThaQemGBMInp29RAalgEVCW63 18Bq+cV8JR41dTBAmJLCMhJ3DzXCRbnFPCSuL2lnR3EFgKqWdb5iRXCVpN4u/wMC0SvoMTJmU /AbGYBCYmDL14wT2DknYUkNQtJagEj0ypGjeLUorLUIl0jU72kosz0jJLcxMwcXUMDM73c1OL ixPTUnMSkYr3k/NxNjMDAYQCCHYyrFgQeYpTkYFIS5f1ywC9CiC8pP6UyI7E4I76oNCe1+BCj DAeHkgTv0bNAOcGi1PTUirTMHGAIw6QlOHiURHhFgWEsxFtckJhbnJkOkTrFqCglznscpE8AJ JFRmgfXBoubS4yyUsK8jECHCPEUpBblZpagyr9iFOdgVBLmvQ0yhSczrwRu+iugxUxAi5/v8w ZZXJKIkJJqYCw/8vH4lxcGRvqB5/Kz98ul5X3i+MlbnHxlc9jWF/ckD53xeHXSYfqBN19DtzP cXFLyI/TigdyTC/NEF/mvqdkilfpi0bHVbHVXHk+/18hpsmjzbLvACTebFr7N3sLJbGg16Zdq mM3sopfsnUtdvklvi135SWqZpfSsqz1XdZ7eLTv+pDXynMQfJZbijERDLeai4kQA1Tgk+ZYCA AA= X-Env-Sender: prvs=147044df7=ross.lagerwall@citrix.com X-Msg-Ref: server-4.tower-21.messagelabs.com!1481559724!41703460!2 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 32372 invoked from network); 12 Dec 2016 16:22:06 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-4.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 12 Dec 2016 16:22:06 -0000 X-IronPort-AV: E=Sophos;i="5.33,337,1477958400"; d="scan'208";a="394308072" From: Ross Lagerwall To: Date: Mon, 12 Dec 2016 16:18:04 +0000 Message-ID: <1481559490-13844-2-git-send-email-ross.lagerwall@citrix.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481559490-13844-1-git-send-email-ross.lagerwall@citrix.com> References: <1481559490-13844-1-git-send-email-ross.lagerwall@citrix.com> MIME-Version: 1.0 Cc: Ross Lagerwall , Ian Jackson , Wei Liu Subject: [Xen-devel] [PATCH v1 1/7] 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 "allowed" 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; }