From patchwork Tue Aug 20 02:12:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= X-Patchwork-Id: 11102611 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B30FC14DE for ; Tue, 20 Aug 2019 02:15:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C90922CE8 for ; Tue, 20 Aug 2019 02:15:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="EII99mP3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C90922CE8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=invisiblethingslab.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hzte2-00035s-GH; Tue, 20 Aug 2019 02:13:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hzte1-00035n-8D for xen-devel@lists.xenproject.org; Tue, 20 Aug 2019 02:13:09 +0000 X-Inumbo-ID: 0d2ee2d4-c2f0-11e9-b90c-bc764e2007e4 Received: from wout1-smtp.messagingengine.com (unknown [64.147.123.24]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0d2ee2d4-c2f0-11e9-b90c-bc764e2007e4; Tue, 20 Aug 2019 02:13:08 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 4A6583AA; Mon, 19 Aug 2019 22:13:07 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 19 Aug 2019 22:13:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=NtaTNY +OLBQUDOeNMN0d8n3GBZuysoQrzdHpDIw4jxY=; b=EII99mP3otqsmDIihif5fp QrPWtfBejQzhBRmMiuFn9u38i0Go2IEUX0ZtwxHJAEJUFbpp2CbnHdLa2eDyjIIz RlZxFFFFfCLvJaQY/tKJvSCzAjuILvhe5knbHf47q/zqG9nv5IA22ktDKwX+i+Qz B6TFilB5RSPT81hfcr6m8OG0QooBomouvyYMNCa89T/ezagIMPec7juL4u6E2OID ILkg6viiZ16kS7gsuFPs2w+jvIyP0MKcek1AAspNwDzrobW7sR3r23tur34TMhf2 059UV8W19XuPi5brekOJknlVJgFxeEslUwT9fV61g/wNwQ5LhI2NRcH1YqrOFR0Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudegtddgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffogggtohfgsehtkeertdertdejnecuhfhrohhmpeforghrvghk ucforghrtgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvh hishhisghlvghthhhinhhgshhlrggsrdgtohhmqeenucffohhmrghinhephhgrnhgulhgv rdhrvggrugenucfkphepledurdeihedrfeegrdeffeenucfrrghrrghmpehmrghilhhfrh homhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhen ucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost.localdomain (ip5b412221.dynamic.kabel-deutschland.de [91.65.34.33]) by mail.messagingengine.com (Postfix) with ESMTPA id BF1A3380075; Mon, 19 Aug 2019 22:13:05 -0400 (EDT) From: =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Date: Tue, 20 Aug 2019 04:12:41 +0200 Message-Id: <20190820021241.30843-1-marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Organization: Invisible Things Lab Subject: [Xen-devel] [PATCH] python: do not report handled EAGAIN error X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson , =?utf-8?q?Marek_Marczykowski-G?= =?utf-8?q?=C3=B3recki?= , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" match_watch_by_token() when returns an error, sets also exception within python. This is generally the right thing to do, but when xspy_read_watch() handle EAGAIN error internally, the exception needs to be cleared. Otherwise it will fail like this: xen.lowlevel.xs.Error: (11, 'Resource temporarily unavailable') The above exception was the direct cause of the following exception: Traceback (most recent call last): (...) result = self.handle.read_watch() SystemError: returned a result with an error set Fixes f6e1023412 "python: Extract registered watch search logic from xspy_read_watch()" Signed-off-by: Marek Marczykowski-Górecki Acked-by: Wei Liu --- tools/python/xen/lowlevel/xs/xs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/python/xen/lowlevel/xs/xs.c b/tools/python/xen/lowlevel/xs/xs.c index ea50f86bc3..621039d7a7 100644 --- a/tools/python/xen/lowlevel/xs/xs.c +++ b/tools/python/xen/lowlevel/xs/xs.c @@ -531,6 +531,7 @@ again: free(xsval); if (!val && errno == EAGAIN) { + PyErr_Clear(); goto again; }