diff options
author | fanquake <fanquake@gmail.com> | 2023-05-05 13:58:29 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-05-05 14:13:03 +0100 |
commit | b11bd045e4f1dadab1c8bdd422bb5f2ebf588e56 (patch) | |
tree | 0fc7658f4f32b0eb8356623c4ad356fb8e030596 /.cirrus.yml | |
parent | 6c7ebcc14b7908a67a8f8764b398e76c8fb4fe8b (diff) | |
parent | c371cae07a7ba045130568b6abc470eaa4f95ef4 (diff) | |
download | bitcoin-b11bd045e4f1dadab1c8bdd422bb5f2ebf588e56.tar.xz |
Merge bitcoin/bitcoin#26653: test, init: perturb file to ensure failure instead of only deleting them
c371cae07a7ba045130568b6abc470eaa4f95ef4 test, init: perturb file to ensure failure instead of only deleting them (brunoerg)
Pull request description:
In `feature_init.py` there is a TODO about perturbing the files instead of only testing by deleting them.
```py
# TODO: at some point, we should test perturbing the files instead of removing
# them, e.g.
#
# contents = target_file.read_bytes()
# tweaked_contents = bytearray(contents)
# tweaked_contents[50:250] = b'1' * 200
# target_file.write_bytes(bytes(tweaked_contents))
#
# At the moment I can't get this to work (bitcoind loads successfully?) so
# investigate doing this later.
```
This PR adds it by writing into the file random bytes and checking whether it throws an error when starting.
ACKs for top commit:
MarcoFalke:
lgtm ACK c371cae07a7ba045130568b6abc470eaa4f95ef4
Tree-SHA512: d691eee60b91dd9d1b200588608f56b0a10dccd9761a75254b69e0ba5e5866cae14d2f90cb2bd7ec0f95b0617c2562cd33f20892ffd16355b6df770d3806a0ff
Diffstat (limited to '.cirrus.yml')
0 files changed, 0 insertions, 0 deletions