From: Nikita Popov Date: Mon, 10 Aug 2020 12:36:06 +0000 (+0200) Subject: Skip bug70417.phpt if lsof output looks wrong X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=657707a105832f2cbd4de4cbdaa3fc5f48a06d97;p=php 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. --- diff --git a/ext/phar/tests/tar/bug70417.phpt b/ext/phar/tests/tar/bug70417.phpt index f288efc8f5..021342c234 100644 --- a/ext/phar/tests/tar/bug70417.phpt +++ b/ext/phar/tests/tar/bug70417.phpt @@ -9,6 +9,9 @@ exec('lsof -p ' . getmypid(), $out, $status); if ($status !== 0) { die("skip lsof(8) not available"); } +if (!str_starts_with($out[0], 'COMMAND')) { + die("skip Might be a different lsof"); +} ?> --FILE--