[php-src] PR #13924: Fix tests when stdout is unbuffered
| From: | arnaud-lb | Date: | Tue, 09 Apr 2024 13:59:23 +0000 |
| Subject: | [php-src] PR #13924: Fix tests when stdout is unbuffered | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25686@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13924
Author: arnaud-lb
These tests spawn a sub-process with
-d extension=phar.so, which emits a warning on
stdout when the extension is compiled statically in the php binary.
In glibc, stdout is buffered, and we also don't flush it explicitly. The process
is later killed with SIGTERM, so the buffer is never flushed, and the warning is not visible.
With musl, stdout is unbuffered (or maybe line-buffered, or the buffer is smaller), so
the warning is visible, causing the tests to fail.
In this PR I add -d extension=phar.so only if phar was compiled as a
dynamic module, so that no warning is emitted.