Skip to content

Commit 1f8a4dc

Browse files
committed
Skip bug70417.phpt if lsof output looks wrong
On alpine lsof accepts -p but it doesn't actually do anything. Add a crude check for whether lsof looks like Linux lsof.
1 parent 6d0ea70 commit 1f8a4dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/phar/tests/tar/bug70417.phpt

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ exec('lsof -p ' . getmypid(), $out, $status);
99
if ($status !== 0) {
1010
die("skip lsof(8) not available");
1111
}
12+
if (!str_starts_with($out[0], 'COMMAND')) {
13+
die("skip Might be a different lsof");
14+
}
1215
?>
1316
--FILE--
1417
<?php

0 commit comments

Comments
 (0)