Skip to content

Commit 0b5d371

Browse files
committed
Merge branch 'PHP-8.1'
* PHP-8.1: socket cmsg credential test fixes, "backporting" from the FreeBSD PR.
2 parents fae4344 + 938a81c commit 0b5d371

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/sockets/tests/socket_cmsg_credentials.phpt

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ die('skip not for AIX');
1414
if (!defined('SO_PASSCRED')) {
1515
die('skip SO_PASSCRED is not defined');
1616
}
17-
--CLEAN--
18-
<?php
19-
$path = __DIR__ . "/socket_cmsg_credentials.sock";
20-
@unlink($path);
2117
--FILE--
2218
<?php
2319
include __DIR__."/mcast_helpers.php.inc";
@@ -35,7 +31,7 @@ $s = socket_create(AF_UNIX, SOCK_DGRAM, 0) or die("err");
3531
var_dump($s);
3632
$br = socket_bind($s, $path) or die("err");
3733
var_dump($br);
38-
socket_set_nonblock($sends1) or die("Could not put in non-blocking mode");
34+
socket_set_nonblock($s) or die("Could not put in non-blocking mode");
3935
socket_set_option($s, SOL_SOCKET, SO_PASSCRED, 1) or die("could not set SO_PASSCRED");
4036

4137

@@ -57,6 +53,10 @@ print_r($data);
5753
$pid = getmypid();
5854
var_dump($data['control'][0]['data']['pid'] === $pid);
5955
?>
56+
--CLEAN--
57+
<?php
58+
$path = __DIR__ . "/socket_cmsg_credentials.sock";
59+
@unlink($path);
6060
--EXPECTF--
6161
creating send socket
6262
object(Socket)#%d (0) {

0 commit comments

Comments
 (0)