Skip to content

Commit 657707a

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 217d05b commit 657707a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/phar/tests/tar/bug70417.phpt

Lines changed: 3 additions & 0 deletions
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)