Skip to contentSkip to conversation

libaio: fix aio poll test

PATCH In review Christoph Hellwig 2 participants 3 messages May 23, 2018 VFS

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 22.t: fix check for POLLIN

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

---
 harness/cases/22.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
harness/cases/22.t +1 -1
index c7e7c0e..f376afc 100644
@@ -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;
 		}
Signature · 1 line
2.17.0
#2 lore raw

Re: [PATCH] 22.t: fix check for POLLIN

Quoted 4 lines · Christoph Hellwig

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

Thanks, Christoph, I'll pull this in.

-Jeff

Quoted 17 lines
---
 harness/cases/22.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
harness/cases/22.t +1 -1
index c7e7c0e..f376afc 100644
@@ -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;
 		}