mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-08-11 19:47:57 +02:00
qa: Ignore lsof warnings on NetBSD
On NetBSD, `lsof` can produce the following warnings: 1. "created device cache file: ..." - usually happens in a CI environment. 2. "compiled for NetBSD release 10.0; this is 10.1." or similar - when the `lsof` binary package is installed on a point release. This change suppresses both warnings printed to stderr and fixes the affected tests.
This commit is contained in:
@@ -100,7 +100,8 @@ def get_bind_addrs(pid):
|
||||
import re
|
||||
import subprocess
|
||||
output = subprocess.check_output(["lsof",
|
||||
*(["-Di"] if sys.platform.startswith("freebsd") else []), # Ignore device cache to avoid stderr warnings.
|
||||
*(["-Di"] if sys.platform.startswith(("freebsd", "netbsd")) else []), # Ignore device cache to avoid stderr warnings.
|
||||
*(["-w"] if sys.platform.startswith("netbsd") else []), # Ignore point release mismatch warnings.
|
||||
"-nP", # Keep hosts and ports numeric.
|
||||
"-a", # Require all filters to match.
|
||||
"-p", str(pid), # Limit results to the target pid.
|
||||
|
||||
Reference in New Issue
Block a user