Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:58414 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751646AbeEWQOV (ORCPT ); Wed, 23 May 2018 12:14:21 -0400 From: Christoph Hellwig To: linux-aio@kvack.org Cc: linux-fsdevel@vger.kernel.org Subject: [PATCH] 22.t: fix check for POLLIN Date: Wed, 23 May 2018 18:14:07 +0200 Message-Id: <20180523161407.30689-2-hch@lst.de> In-Reply-To: <20180523161407.30689-1-hch@lst.de> References: <20180523161407.30689-1-hch@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Recent kernels seem to also set POLLRDNORM in addition to POLLIN, so check by masking instead of equality. Signed-off-by: Christoph Hellwig --- harness/cases/22.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harness/cases/22.t b/harness/cases/22.t index c7e7c0e..f376afc 100644 --- a/harness/cases/22.t +++ b/harness/cases/22.t @@ -139,7 +139,7 @@ int test_main(void) printf("parent: io_pgetevents reports wrong fd\n"); return 1; } - if (ev.res != POLLIN) { + if (!(ev.res & POLLIN)) { printf("parent: io_pgetevents did not report readable fd\n"); return 1; } -- 2.17.0