aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/net/af_unix
diff options
context:
space:
mode:
authorGravatar Kuniyuki Iwashima <kuniyu@amazon.co.jp> 2022-03-17 12:08:09 +0900
committerGravatar David S. Miller <davem@davemloft.net> 2022-03-18 13:30:52 +0000
commitd9a232d435dcc966738b0f414a86f7edf4f4c8c4 (patch)
treee3b8f4e40775f0b6d0c8113991565c7d77bee4f7 /tools/testing/selftests/net/af_unix
parentaf_unix: Fix some data-races around unix_sk(sk)->oob_skb. (diff)
downloadlinux-d9a232d435dcc966738b0f414a86f7edf4f4c8c4.tar.gz
linux-d9a232d435dcc966738b0f414a86f7edf4f4c8c4.tar.bz2
linux-d9a232d435dcc966738b0f414a86f7edf4f4c8c4.zip
af_unix: Support POLLPRI for OOB.
The commit 314001f0bf92 ("af_unix: Add OOB support") introduced OOB for AF_UNIX, but it lacks some changes for POLLPRI. Let's add the missing piece. In the selftest, normal datagrams are sent followed by OOB data, so this commit replaces `POLLIN | POLLPRI` with just `POLLPRI` in the first test case. Fixes: 314001f0bf92 ("af_unix: Add OOB support") Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/af_unix')
-rw-r--r--tools/testing/selftests/net/af_unix/test_unix_oob.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/net/af_unix/test_unix_oob.c b/tools/testing/selftests/net/af_unix/test_unix_oob.c
index 3dece8b29253..b57e91e1c3f2 100644
--- a/tools/testing/selftests/net/af_unix/test_unix_oob.c
+++ b/tools/testing/selftests/net/af_unix/test_unix_oob.c
@@ -218,10 +218,10 @@ main(int argc, char **argv)
/* Test 1:
* veriyf that SIGURG is
- * delivered and 63 bytes are
- * read and oob is '@'
+ * delivered, 63 bytes are
+ * read, oob is '@', and POLLPRI works.
*/
- wait_for_data(pfd, POLLIN | POLLPRI);
+ wait_for_data(pfd, POLLPRI);
read_oob(pfd, &oob);
len = read_data(pfd, buf, 1024);
if (!signal_recvd || len != 63 || oob != '@') {