From 06ff5d4d75ea344198656ef65d76dfa060eef453 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 09:43:58 -0400 Subject: [PATCH 01/14] feat(test): track running process instead of pidfile during stop Refactor Bitcoin Core stopping logic to improve clarity and reliability. --- test/test_nodebuilder | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 5c174bd37..69fd1e10b 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -228,24 +228,30 @@ kill_tail_process # Stop Bitcoin Core if [ -f "${bitcoind_pid_path}" ]; then - read -r bitcoind_pid < "${bitcoind_pid_path}" - if command -v bitcoin-cli > /dev/null 2>&1; then - bitcoin-cli stop - bitcoind_stop_sleep_seconds=2 - bitcoind_stop_sleep_counter=0 - while [ -f "${bitcoind_pid_path}" ]; do - sleep "${bitcoind_stop_sleep_seconds}" - # TODO: debug intermittent stalled stop issue - # shellcheck disable=SC2009 - ps aux | grep "${bitcoind_pid}" - bitcoind_stop_sleep_counter=$((bitcoind_stop_sleep_counter + 1)) - if [ "$((bitcoind_stop_sleep_seconds * bitcoind_stop_sleep_counter))" -ge 3600 ]; then - throw_error 'Stopping Bitcoin Core took over an hour.' - fi - done - else + command -v bitcoin-cli > /dev/null 2>&1 || throw_error 'Unable to find bitcoin-cli in PATH.' - fi + read -r bitcoind_pid < "${bitcoind_pid_path}" + BITCOIN_STOP_SLEEP_SECONDS=2 + readonly BITCOIN_STOP_SLEEP_SECONDS + BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS=3600 + readonly BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS + + bitcoin_stop_sleep_elapsed=0 + bitcoin_pname="$(ps -p "$(< "${BITCOIN_CORE_PID_FILE}")" -o comm=)" + bitcoin-cli stop + + while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ]; do + sleep "${BITCOIN_STOP_SLEEP_SECONDS}" + bitcoin_stop_sleep_elapsed="$((bitcoin_stop_sleep_elapsed + BITCOIN_STOP_SLEEP_SECONDS))" + # TODO: debug intermittent stalled stop issue + # ps aux shouldnt be used for scripting (SC2009), but it's fine here since we're just printing to stdout + # shellcheck disable=SC2009 + ps aux | grep "${bitcoind_pid}" + bitcoind_stop_sleep_counter=$((bitcoind_stop_sleep_counter + 1)) + [ "${bitcoind_stop_sleep_elapsed}" -ge 3600 ] && + throw_error 'Stopping Bitcoin Core took over an hour.' + bitcoin_pname="$(ps -p "$(< "${BITCOIN_CORE_PID_FILE}")" -o comm=)" + done fi if [ -s "${STDERR_TEST_FILENAME}" ]; then From ba8da168eb4917885550bdc1aba9c9e0c96a4309 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 09:55:36 -0400 Subject: [PATCH 02/14] fix whitespace --- test/test_nodebuilder | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 69fd1e10b..497eda706 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -235,7 +235,8 @@ if [ -f "${bitcoind_pid_path}" ]; then readonly BITCOIN_STOP_SLEEP_SECONDS BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS=3600 readonly BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS - + + bitcoin_stop_sleep_elapsed=0 bitcoin_pname="$(ps -p "$(< "${BITCOIN_CORE_PID_FILE}")" -o comm=)" bitcoin-cli stop From 0d854644d2d665a0d5f33ed9ab22f537533f225e Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 10:07:41 -0400 Subject: [PATCH 03/14] feat(test): watch the running process during stop Bitcoin Core Updated variable names for consistency and clarity. --- test/test_nodebuilder | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 497eda706..82b6a8246 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -184,7 +184,6 @@ case "${TARGET_KERNEL}" in MINGW*) throw_error 'Windows is not supported.' ;; *) throw_error 'Your operating system is not supported.' ;; esac -bitcoind_pid_path="${bitcoin_data_directory}/bitcoind.pid" DOWNLOADED_NODEBUILDER='false' [ -f nodebuilder ] || { @@ -226,11 +225,18 @@ fi [ "${DOWNLOADED_NODEBUILDER:-false}" = 'true' ] && rm nodebuilder kill_tail_process +BITCOIN_PID_PATH="${bitcoin_data_directory}/bitcoind.pid" +readonly BITCOIN_PID_PATH + +[ -f "${BITCOIN_PID_PATH}" ] || + throw_error "Unable to find $(basename "${BITCOIN_PID_PATH}") in data directory." +# TODO Remove the conditional below since we just checked for the file. + # Stop Bitcoin Core -if [ -f "${bitcoind_pid_path}" ]; then +if [ -f "${BITCOIN_PID_PATH}" ]; then command -v bitcoin-cli > /dev/null 2>&1 || throw_error 'Unable to find bitcoin-cli in PATH.' - read -r bitcoind_pid < "${bitcoind_pid_path}" + read -r bitcoind_pid < "${BITCOIN_PID_PATH}" BITCOIN_STOP_SLEEP_SECONDS=2 readonly BITCOIN_STOP_SLEEP_SECONDS BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS=3600 From 7337000cf0c04015202f976abb6b86b6b9cc2d3a Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 10:21:53 -0400 Subject: [PATCH 04/14] use posix style for process retrieval --- test/test_nodebuilder | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 82b6a8246..a32e06403 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -242,9 +242,8 @@ if [ -f "${BITCOIN_PID_PATH}" ]; then BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS=3600 readonly BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS - bitcoin_stop_sleep_elapsed=0 - bitcoin_pname="$(ps -p "$(< "${BITCOIN_CORE_PID_FILE}")" -o comm=)" + bitcoin_pname="$(ps -p "${bitcoind_pid}" -o comm=)" bitcoin-cli stop while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ]; do @@ -254,10 +253,9 @@ if [ -f "${BITCOIN_PID_PATH}" ]; then # ps aux shouldnt be used for scripting (SC2009), but it's fine here since we're just printing to stdout # shellcheck disable=SC2009 ps aux | grep "${bitcoind_pid}" - bitcoind_stop_sleep_counter=$((bitcoind_stop_sleep_counter + 1)) - [ "${bitcoind_stop_sleep_elapsed}" -ge 3600 ] && + [ "${bitcoin_stop_sleep_elapsed}" -ge "${BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS}" ] && throw_error 'Stopping Bitcoin Core took over an hour.' - bitcoin_pname="$(ps -p "$(< "${BITCOIN_CORE_PID_FILE}")" -o comm=)" + bitcoin_pname="$(ps -p "${bitcoind_pid}" -o comm=)" done fi From 89c9244558e8add8e4440f35a37101f202cb11d2 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 12:46:18 -0400 Subject: [PATCH 05/14] refactor: remove unneeded conditional Refactor Bitcoin Core stop logic to remove redundant file check and streamline process. --- test/test_nodebuilder | 49 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index a32e06403..846448812 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -230,34 +230,33 @@ readonly BITCOIN_PID_PATH [ -f "${BITCOIN_PID_PATH}" ] || throw_error "Unable to find $(basename "${BITCOIN_PID_PATH}") in data directory." -# TODO Remove the conditional below since we just checked for the file. # Stop Bitcoin Core -if [ -f "${BITCOIN_PID_PATH}" ]; then - command -v bitcoin-cli > /dev/null 2>&1 || - throw_error 'Unable to find bitcoin-cli in PATH.' - read -r bitcoind_pid < "${BITCOIN_PID_PATH}" - BITCOIN_STOP_SLEEP_SECONDS=2 - readonly BITCOIN_STOP_SLEEP_SECONDS - BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS=3600 - readonly BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS - - bitcoin_stop_sleep_elapsed=0 +command -v bitcoin-cli > /dev/null 2>&1 || + throw_error 'Unable to find bitcoin-cli in PATH.' +read -r bitcoind_pid < "${BITCOIN_PID_PATH}" +readonly bitcoin_pid +bitcoin_pname="$(ps -p "${bitcoind_pid}" -o comm=)" + +BITCOIN_STOP_SLEEP_SECONDS=2 +readonly BITCOIN_STOP_SLEEP_SECONDS +BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS=3600 +readonly BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS +bitcoin_stop_sleep_elapsed=0 + +bitcoin-cli stop + +while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ]; do + sleep "${BITCOIN_STOP_SLEEP_SECONDS}" + bitcoin_stop_sleep_elapsed="$((bitcoin_stop_sleep_elapsed + BITCOIN_STOP_SLEEP_SECONDS))" + # TODO: debug intermittent stalled stop issue + # ps aux shouldnt be used for scripting (SC2009), but it's fine here since we're just printing to stdout + # shellcheck disable=SC2009 + ps aux | grep "${bitcoind_pid}" + [ "${bitcoin_stop_sleep_elapsed}" -ge "${BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS}" ] && + throw_error 'Stopping Bitcoin Core took over an hour.' bitcoin_pname="$(ps -p "${bitcoind_pid}" -o comm=)" - bitcoin-cli stop - - while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ]; do - sleep "${BITCOIN_STOP_SLEEP_SECONDS}" - bitcoin_stop_sleep_elapsed="$((bitcoin_stop_sleep_elapsed + BITCOIN_STOP_SLEEP_SECONDS))" - # TODO: debug intermittent stalled stop issue - # ps aux shouldnt be used for scripting (SC2009), but it's fine here since we're just printing to stdout - # shellcheck disable=SC2009 - ps aux | grep "${bitcoind_pid}" - [ "${bitcoin_stop_sleep_elapsed}" -ge "${BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS}" ] && - throw_error 'Stopping Bitcoin Core took over an hour.' - bitcoin_pname="$(ps -p "${bitcoind_pid}" -o comm=)" - done -fi +done if [ -s "${STDERR_TEST_FILENAME}" ]; then printf '%s\n' 'Printing the contents of stderr:' From 6c6a0e5cd367940df2591eab5f475c9eccbeae47 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 12:58:13 -0400 Subject: [PATCH 06/14] improve comment Updated comment for clarity and added context for debugging. --- test/test_nodebuilder | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 846448812..adab8d293 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -250,7 +250,8 @@ while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' sleep "${BITCOIN_STOP_SLEEP_SECONDS}" bitcoin_stop_sleep_elapsed="$((bitcoin_stop_sleep_elapsed + BITCOIN_STOP_SLEEP_SECONDS))" # TODO: debug intermittent stalled stop issue - # ps aux shouldnt be used for scripting (SC2009), but it's fine here since we're just printing to stdout + # ps aux shouldnt be used for scripting, per SC2009), + # but it's fine here since we're just printing to stdout for debug purposes # shellcheck disable=SC2009 ps aux | grep "${bitcoind_pid}" [ "${bitcoin_stop_sleep_elapsed}" -ge "${BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS}" ] && From e47b064f14e902fc4a2d8deaf78221de9f71a6ab Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 13:00:50 -0400 Subject: [PATCH 07/14] fix variable name --- test/test_nodebuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index adab8d293..4331696de 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -226,7 +226,7 @@ fi kill_tail_process BITCOIN_PID_PATH="${bitcoin_data_directory}/bitcoind.pid" -readonly BITCOIN_PID_PATH +readonly BITCOIND_PID_PATH [ -f "${BITCOIN_PID_PATH}" ] || throw_error "Unable to find $(basename "${BITCOIN_PID_PATH}") in data directory." From ce1f85b788ab5afd3f1ed332140cdf919ef83c21 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 13:03:39 -0400 Subject: [PATCH 08/14] fix variable names --- test/test_nodebuilder | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 4331696de..c848ee6e5 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -226,7 +226,7 @@ fi kill_tail_process BITCOIN_PID_PATH="${bitcoin_data_directory}/bitcoind.pid" -readonly BITCOIND_PID_PATH +readonly BITCOIN_PID_PATH [ -f "${BITCOIN_PID_PATH}" ] || throw_error "Unable to find $(basename "${BITCOIN_PID_PATH}") in data directory." @@ -234,9 +234,9 @@ readonly BITCOIND_PID_PATH # Stop Bitcoin Core command -v bitcoin-cli > /dev/null 2>&1 || throw_error 'Unable to find bitcoin-cli in PATH.' -read -r bitcoind_pid < "${BITCOIN_PID_PATH}" +read -r bitcoin_pid < "${BITCOIN_PID_PATH}" readonly bitcoin_pid -bitcoin_pname="$(ps -p "${bitcoind_pid}" -o comm=)" +bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" BITCOIN_STOP_SLEEP_SECONDS=2 readonly BITCOIN_STOP_SLEEP_SECONDS @@ -253,7 +253,7 @@ while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' # ps aux shouldnt be used for scripting, per SC2009), # but it's fine here since we're just printing to stdout for debug purposes # shellcheck disable=SC2009 - ps aux | grep "${bitcoind_pid}" + ps aux | grep "${bitcoin_pid}" [ "${bitcoin_stop_sleep_elapsed}" -ge "${BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS}" ] && throw_error 'Stopping Bitcoin Core took over an hour.' bitcoin_pname="$(ps -p "${bitcoind_pid}" -o comm=)" From 432605f2d848a6140dbf9497905a34859a438f04 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Fri, 28 Aug 2026 15:43:07 -0400 Subject: [PATCH 09/14] fix variable name and reorder commands --- test/test_nodebuilder | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index c848ee6e5..6fb1fc44e 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -230,13 +230,8 @@ readonly BITCOIN_PID_PATH [ -f "${BITCOIN_PID_PATH}" ] || throw_error "Unable to find $(basename "${BITCOIN_PID_PATH}") in data directory." - -# Stop Bitcoin Core -command -v bitcoin-cli > /dev/null 2>&1 || - throw_error 'Unable to find bitcoin-cli in PATH.' read -r bitcoin_pid < "${BITCOIN_PID_PATH}" readonly bitcoin_pid -bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" BITCOIN_STOP_SLEEP_SECONDS=2 readonly BITCOIN_STOP_SLEEP_SECONDS @@ -244,6 +239,9 @@ BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS=3600 readonly BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS bitcoin_stop_sleep_elapsed=0 +command -v bitcoin-cli > /dev/null 2>&1 || + throw_error 'Unable to find bitcoin-cli in PATH.' +bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" bitcoin-cli stop while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ]; do @@ -256,7 +254,7 @@ while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ps aux | grep "${bitcoin_pid}" [ "${bitcoin_stop_sleep_elapsed}" -ge "${BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS}" ] && throw_error 'Stopping Bitcoin Core took over an hour.' - bitcoin_pname="$(ps -p "${bitcoind_pid}" -o comm=)" + bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" done if [ -s "${STDERR_TEST_FILENAME}" ]; then From 6ee2b52648fb8171fea8cbaab54e6142b5b662e7 Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sat, 29 Aug 2026 13:50:36 -0400 Subject: [PATCH 10/14] Fix error handling for bitcoin process name retrieval --- test/test_nodebuilder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 6fb1fc44e..119142fb1 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -241,7 +241,7 @@ bitcoin_stop_sleep_elapsed=0 command -v bitcoin-cli > /dev/null 2>&1 || throw_error 'Unable to find bitcoin-cli in PATH.' -bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" +bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" || bitcoin_pname='' bitcoin-cli stop while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ]; do @@ -254,7 +254,7 @@ while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ps aux | grep "${bitcoin_pid}" [ "${bitcoin_stop_sleep_elapsed}" -ge "${BITCOIN_STOP_SLEEP_MAXIMUM_SECONDS}" ] && throw_error 'Stopping Bitcoin Core took over an hour.' - bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" + bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" || bitcoin_pname='' done if [ -s "${STDERR_TEST_FILENAME}" ]; then From 01de5d7bde0094a486451656865c56a5841cab5b Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sat, 29 Aug 2026 13:53:43 -0400 Subject: [PATCH 11/14] Update test_nodebuilder --- test/test_nodebuilder | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 119142fb1..9c3feb8fa 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -241,7 +241,8 @@ bitcoin_stop_sleep_elapsed=0 command -v bitcoin-cli > /dev/null 2>&1 || throw_error 'Unable to find bitcoin-cli in PATH.' -bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" || bitcoin_pname='' +bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" || + throw_error 'Found bitcoind.pid but cannot find running process with PID ${bitcoin_pid}.' bitcoin-cli stop while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ]; do From 4877e032492cbd105f9b0c6f9d244ec73dcafa9e Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sat, 29 Aug 2026 16:04:19 -0400 Subject: [PATCH 12/14] add debug to error throwing Add a fallback to find bitcoind.pid if not found. --- test/test_nodebuilder | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 9c3feb8fa..e8a9ed07b 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -228,8 +228,10 @@ kill_tail_process BITCOIN_PID_PATH="${bitcoin_data_directory}/bitcoind.pid" readonly BITCOIN_PID_PATH -[ -f "${BITCOIN_PID_PATH}" ] || +[ -f "${BITCOIN_PID_PATH}" ] || { + sudo find / -name "bitcoind.pid" -type f 2>/dev/null throw_error "Unable to find $(basename "${BITCOIN_PID_PATH}") in data directory." +} read -r bitcoin_pid < "${BITCOIN_PID_PATH}" readonly bitcoin_pid From bd9bcd11b35b261f736099df35ddef3f6c23629a Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sat, 29 Aug 2026 16:21:20 -0400 Subject: [PATCH 13/14] Update test_nodebuilder --- test/test_nodebuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index e8a9ed07b..7b2d1c1c5 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -229,7 +229,7 @@ BITCOIN_PID_PATH="${bitcoin_data_directory}/bitcoind.pid" readonly BITCOIN_PID_PATH [ -f "${BITCOIN_PID_PATH}" ] || { - sudo find / -name "bitcoind.pid" -type f 2>/dev/null + sudo find / -name "bitcoind.pid" -type f 2> /dev/null throw_error "Unable to find $(basename "${BITCOIN_PID_PATH}") in data directory." } read -r bitcoin_pid < "${BITCOIN_PID_PATH}" From faabfc7973666b46e1ecc4ccef39df8876bad94b Mon Sep 17 00:00:00 2001 From: Bitcoin Tools <156422466+bitcoin-tools@users.noreply.github.com> Date: Sat, 29 Aug 2026 17:04:24 -0400 Subject: [PATCH 14/14] Update test_nodebuilder --- test/test_nodebuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_nodebuilder b/test/test_nodebuilder index 7b2d1c1c5..7060c47e6 100755 --- a/test/test_nodebuilder +++ b/test/test_nodebuilder @@ -244,7 +244,7 @@ bitcoin_stop_sleep_elapsed=0 command -v bitcoin-cli > /dev/null 2>&1 || throw_error 'Unable to find bitcoin-cli in PATH.' bitcoin_pname="$(ps -p "${bitcoin_pid}" -o comm=)" || - throw_error 'Found bitcoind.pid but cannot find running process with PID ${bitcoin_pid}.' + throw_error "Found bitcoind.pid but cannot find running process with PID ${bitcoin_pid}." bitcoin-cli stop while [ "${bitcoin_pname}" = 'bitcoind' ] || [ "${bitcoin_pname}" = 'bitcoin-qt' ]; do