HomePhabricator

[test] feature_init: prevent UnicodeDecodeError errors when opening log file

Description

[test] feature_init: prevent UnicodeDecodeError errors when opening log file

Summary:

open log file as a raw byte stream (fixes core#23989)

The log file can be read partially while some emoji is being written, causing a UnicodeDecodeError. It did not make sense to decode the file anyway, as the file content is not being used. We read the file only to count the log lines.

This is a backport of core#24039

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
sogoagain <imyong0@gmail.com>Authored on Jan 11 2022, 15:50
PiRKCommitted on Nov 25 2022, 14:26
PiRKPushed on Nov 25 2022, 14:26
Reviewer
Restricted Project
Differential Revision
D12617: [test] feature_init: prevent UnicodeDecodeError errors when opening log file
Parents
rABC7a3161961067: test: enable txindex in feature_init
Branches
Unknown
Tags
Unknown