Skip to content

Commit ff35f0e

Browse files
committed
tests: support hurd
socket operation on non-socket gives a different message Signed-off-by: Steve Bennett <[email protected]>
1 parent e1a70f2 commit ff35f0e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/aio.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ test aio-7.1 {close args} -constraints socket -body {
124124

125125
test aio-7.2 {close w on non-socket} -constraints socket -body {
126126
$f close w
127-
} -returnCodes error -match regexp -result {^(Socket operation on non-socket|Not a socket)$}
127+
} -returnCodes error -match regexp -result {(bad|socket)}
128128

129129
test aio-7.3 {close -nodelete on non-socket} -constraints socket -body {
130130
$f close -nodelete

tests/socket.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ test socket-3.3 {listen usage} -body {
295295
test socket-3.4 {listen not a socket} -body {
296296
set f [open [info script]]
297297
$f listen 10
298-
} -returnCodes error -match regexp -result {^(Socket operation on non-socket|Not a socket)$} -cleanup {
298+
} -returnCodes error -match regexp -result {(bad|socket)} -cleanup {
299299
$f close
300300
}
301301

@@ -310,14 +310,14 @@ test socket-4.2 {invalid ipv4 address} -body {
310310
test socket-4.3 {sockname on non-socket} -body {
311311
set f [open [info script]]
312312
$f sockname
313-
} -returnCodes error -match regexp -result {^(Socket operation on non-socket|Not a socket)$} -cleanup {
313+
} -returnCodes error -match regexp -result {(bad|socket)} -cleanup {
314314
$f close
315315
}
316316

317317
test socket-4.4 {peername on non-socket} -body {
318318
set f [open [info script]]
319319
$f peername
320-
} -returnCodes error -match regexp -result {^(Socket operation on non-socket|Not a socket)$} -cleanup {
320+
} -returnCodes error -match regexp -result {(bad|socket)} -cleanup {
321321
$f close
322322
}
323323

0 commit comments

Comments
 (0)