mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
fix flaky sockets test - form of response is OS dependent
This commit is contained in:
parent
abe38b5e48
commit
c54a247cb0
@ -55,7 +55,28 @@ $data = [
|
||||
];
|
||||
var_dump($data);
|
||||
if (!socket_recvmsg($s, $data, 0)) die("recvmsg");
|
||||
print_r($data);
|
||||
|
||||
if ($data["control"]) {
|
||||
$control = $data["control"][0];
|
||||
if ($control["level"] == SOL_SOCKET &&
|
||||
$control["type"] == SCM_RIGHTS) {
|
||||
foreach ($control["data"] as $resource) {
|
||||
if (!is_resource($resource)) {
|
||||
echo "FAIL RES\n";
|
||||
var_dump($data);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
echo "OK";
|
||||
} else {
|
||||
echo "FAIL RIGHTS\n";
|
||||
var_dump($data);
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
echo "FAIL CONTROL\n";
|
||||
var_dump($data);
|
||||
}
|
||||
--EXPECTF--
|
||||
creating send socket
|
||||
resource(%d) of type (Socket)
|
||||
@ -72,32 +93,4 @@ array(3) {
|
||||
["controllen"]=>
|
||||
int(%d)
|
||||
}
|
||||
Array
|
||||
(
|
||||
[name] =>
|
||||
[control] => Array
|
||||
(
|
||||
[0] => Array
|
||||
(
|
||||
[level] => %d
|
||||
[type] => %d
|
||||
[data] => Array
|
||||
(
|
||||
[0] => Resource id #%d
|
||||
[1] => Resource id #%d
|
||||
[2] => Resource id #%d
|
||||
[3] => Resource id #%d
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
[iov] => Array
|
||||
(
|
||||
[0] => test thing
|
||||
|
||||
)
|
||||
|
||||
[flags] => 0
|
||||
)
|
||||
OK
|
||||
|
Loading…
Reference in New Issue
Block a user