Skip to content

Commit c58241a

Browse files
andypostbukka
authored andcommitted
Make socket path shorter for ext/sockets/tests/socket_cmsg_{rights|credentials}.phpt
When running in CI it fails when path/address is longer 108
1 parent b0cc5ed commit c58241a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ext/sockets/tests/socket_cmsg_credentials.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ die('skip SO_PASSCRED is not defined');
1717
--FILE--
1818
<?php
1919
include __DIR__."/mcast_helpers.php.inc";
20-
$path = __DIR__ . "/socket_cmsg_credentials.sock";
20+
$path = sys_get_temp_dir() . "/socket_cmsg_credentials.sock";
2121

2222
@unlink($path);
2323

@@ -55,7 +55,7 @@ var_dump($data['control'][0]['data']['pid'] === $pid);
5555
?>
5656
--CLEAN--
5757
<?php
58-
$path = __DIR__ . "/socket_cmsg_credentials.sock";
58+
$path = sys_get_temp_dir() . "/socket_cmsg_credentials.sock";
5959
@unlink($path);
6060
--EXPECTF--
6161
creating send socket

ext/sockets/tests/socket_cmsg_rights.phpt

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@ die('skip not for Microsoft Windows');
1111
if (strtolower(substr(PHP_OS, 0, 3)) == 'aix') {
1212
die('skip not for AIX');
1313
}
14-
--CLEAN--
15-
<?php
16-
$path = __DIR__ . "/socket_cmsg_rights.sock";
17-
@unlink($path);
1814
--FILE--
1915
<?php
2016
include __DIR__."/mcast_helpers.php.inc";
21-
$path = __DIR__ . "/socket_cmsg_rights.sock";
17+
$path = sys_get_temp_dir() . "/socket_cmsg_rights.sock";
2218

2319
@unlink($path);
2420

@@ -78,6 +74,10 @@ if ($data["control"]) {
7874
var_dump($data);
7975
}
8076
?>
77+
--CLEAN--
78+
<?php
79+
$path = sys_get_temp_dir() . "/socket_cmsg_rights.sock";
80+
@unlink($path);
8181
--EXPECTF--
8282
creating send socket
8383
object(Socket)#%d (0) {

0 commit comments

Comments
 (0)