From 657707a105832f2cbd4de4cbdaa3fc5f48a06d97 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 10 Aug 2020 14:36:06 +0200 Subject: [PATCH] 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. --- ext/phar/tests/tar/bug70417.phpt | 3 +++ 1 file changed, 3 insertions(+) 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--