linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libaio: fix aio poll test
@ 2018-05-23 16:14 Christoph Hellwig
  2018-05-23 16:14 ` [PATCH] 22.t: fix check for POLLIN Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2018-05-23 16:14 UTC (permalink / raw)
  To: linux-aio; +Cc: linux-fsdevel

This is against the aio-poll branch of libaio.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] 22.t: fix check for POLLIN
  2018-05-23 16:14 libaio: fix aio poll test Christoph Hellwig
@ 2018-05-23 16:14 ` Christoph Hellwig
  2018-05-23 16:19   ` Jeff Moyer
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2018-05-23 16:14 UTC (permalink / raw)
  To: linux-aio; +Cc: linux-fsdevel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] 22.t: fix check for POLLIN
  2018-05-23 16:14 ` [PATCH] 22.t: fix check for POLLIN Christoph Hellwig
@ 2018-05-23 16:19   ` Jeff Moyer
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Moyer @ 2018-05-23 16:19 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linux-aio, linux-fsdevel

Christoph Hellwig <hch@lst.de> writes:

> 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>

Thanks, Christoph, I'll pull this in.

-Jeff

> ---
>  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;
>  		}

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-23 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-23 16:14 libaio: fix aio poll test Christoph Hellwig
2018-05-23 16:14 ` [PATCH] 22.t: fix check for POLLIN Christoph Hellwig
2018-05-23 16:19   ` Jeff Moyer

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).