Repository navigation
Commit 81fd3e2
committed
test: deflake test-permission-net-udp-handle
Sending a dgram socket over IPC duplicates the handle instead of moving
it: `dgram.Socket` has no `postSend` in the child_process conversion
table, and `bind()` calls `recvStart()` unconditionally, so the parent
copy keeps consuming datagrams after the child adopts the handle. Both
sockets then compete for every packet, and the child receives nothing
until it wins that race. Locally the parent took up to 111 consecutive
packets first, stretching the run to about 1.2s; the retry interval is
the only thing keeping the test alive, and how long the parent can hold
the socket is a property of the scheduler, not of the test.
Close the parent copy as soon as the child reports it is receiving, so
the child is the only reader by the time the first datagram is sent.
Signed-off-by: Christian Aurich <christian.aurichzm@gmail.com>1 parent 761e49e commit 81fd3e2
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
76 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
84 | | - | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
0 commit comments