HomePhabricator

test: improve functional tests compatibility with BSD/macOS

Description

test: improve functional tests compatibility with BSD/macOS

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.

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9968

Details

Provenance
Ivan Metlushko <metlushko@gmail.com>Authored on Jun 24 2020, 02:08
PiRKCommitted on Aug 28 2021, 06:48
PiRKPushed on Aug 28 2021, 06:49
Reviewer
Restricted Project
Differential Revision
D9968: test: improve functional tests compatibility with BSD/macOS
Parents
rABCef5ce4bddb46: wallet: Handle concurrent wallet loading
Branches
Unknown
Tags
Unknown