linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
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	[thread overview]
Message-ID: <20180523161407.30689-2-hch@lst.de> (raw)
In-Reply-To: <20180523161407.30689-1-hch@lst.de>

Recent kernels seem to also set POLLRDNORM in addition to POLLIN,
so check by masking instead of equality.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 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

  reply	other threads:[~2018-05-23 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 16:14 libaio: fix aio poll test Christoph Hellwig
2018-05-23 16:14 ` Christoph Hellwig [this message]
2018-05-23 16:19   ` [PATCH] 22.t: fix check for POLLIN Jeff Moyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180523161407.30689-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=linux-aio@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).