Page MenuHomePhabricator

test: improve functional tests compatibility with BSD/macOS
ClosedPublic

Authored by PiRK on Aug 27 2021, 14:33.

Details

Summary

test: use pgrep for better compatibility

pidof is not available on BSD system, while pgrep is present on BSD, Linux and macOS

test: retry when write to a socket fails on macOS

If the socket is tearing down macOS will return EPROTOTYPE instead of EPIPE.
Because python doesn't handle this internally we have to do a workaround and retry the request.
See https://bugs.python.org/issue33450

This is a backport of core#19368

Test Plan
test/functional/test_runner.py

Run it with and without bitcoind already running to check that it still detects it.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable