Commit ec03728
committed
gh-149078: test_socket: verify runtime kernel support for UDPLite
The test suite previously only checked for the existence of the
socket.IPPROTO_UDPLITE constant. This caused test failures on systems
where the constant is defined in headers (and thus present in the
interpreter) but the protocol is not supported or enabled in the
running kernel (e.g., restricted build environments).
This change adds a _have_socket_udplite() helper that performs a
runtime check by attempting to create a UDPLite socket, aligning its
behavior with other optional protocols like RDS or AF_ALG.1 parent 0efd679 commit ec03728
2 files changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
173 | 189 | | |
174 | 190 | | |
175 | 191 | | |
| |||
247 | 263 | | |
248 | 264 | | |
249 | 265 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
| 266 | + | |
254 | 267 | | |
255 | 268 | | |
256 | 269 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments