Skip to content

Commit 47b12ce

Browse files
committed
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 ab67b52 commit 47b12ce

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

ext/sockets/tests/socket_cmsg_credentials.phpt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@ die('skip not for AIX');
1414
if (!defined('SO_PASSCRED')) {
1515
die('skip SO_PASSCRED is not defined');
1616
}
17+
--CLEAN--
18+
<?php
19+
chdir(sys_get_temp_dir());
20+
$path = "./socket_cmsg_credentials.sock";
21+
@unlink($path);
1722
--FILE--
1823
<?php
1924
include __DIR__."/mcast_helpers.php.inc";
20-
$path = __DIR__ . "/socket_cmsg_credentials.sock";
25+
chdir(sys_get_temp_dir());
26+
$path = "./socket_cmsg_credentials.sock";
2127

2228
@unlink($path);
2329

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

ext/sockets/tests/socket_cmsg_rights.phpt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ die('skip not for AIX');
1313
}
1414
--CLEAN--
1515
<?php
16-
$path = __DIR__ . "/socket_cmsg_rights.sock";
16+
chdir(sys_get_temp_dir());
17+
$path = "./socket_cmsg_rights.sock";
1718
@unlink($path);
1819
--FILE--
1920
<?php
2021
include __DIR__."/mcast_helpers.php.inc";
21-
$path = __DIR__ . "/socket_cmsg_rights.sock";
22+
chdir(sys_get_temp_dir());
23+
$path = "./socket_cmsg_rights.sock";
2224

2325
@unlink($path);
2426

0 commit comments

Comments
 (0)