Skip to content

Add shebang to delete_nonreduced_fuzz_inputs.sh#268

Closed
ekzyis wants to merge 1 commit intobitcoin-core:mainfrom
ekzyis:delete-nonreduced-fuzz-inputs-shebang
Closed

Add shebang to delete_nonreduced_fuzz_inputs.sh#268
ekzyis wants to merge 1 commit intobitcoin-core:mainfrom
ekzyis:delete-nonreduced-fuzz-inputs-shebang

Conversation

@ekzyis
Copy link
Copy Markdown
Contributor

@ekzyis ekzyis commented Mar 26, 2026

The script uses array features like readarray and the [@] syntax. Afaik, these require bash, see manual.

While working on #266, I wasn't sure if I can assume bash and use syntax like REFS=("master").

I created this PR to get this question out of the way.

@ekzyis ekzyis force-pushed the delete-nonreduced-fuzz-inputs-shebang branch from b856d11 to e8f063b Compare March 26, 2026 12:15
@maflcko
Copy link
Copy Markdown
Contributor

maflcko commented Mar 26, 2026

While working on #266, I wasn't sure if I can assume bash and use syntax like REFS=("master").

Thanks for working on this, and sorry for not reviewing that earlier, but I think Bash or Python are the wrong answer to long-running scripts, because inherently there will be an accidental typo (none vs None) or a type confusion string vs array (or syntax question like yours), which will only be discovered at run-time, possibly after waiting (wasting) hours.

I think such long-running scripts should be written in a compiled language.

So my recommendation would be to first re-write the existing Bash script to Rust. I wanted to do this last week, but I didn't get to it yet.

@maflcko
Copy link
Copy Markdown
Contributor

maflcko commented Mar 26, 2026

edit: See https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/deterministic-unittest-coverage/src/main.rs for an example template for a main.rs that could be used as a style guide.

@ekzyis
Copy link
Copy Markdown
Contributor Author

ekzyis commented Mar 26, 2026

sorry for not reviewing that earlier

No worries! I didn't expect any review, since it's still a draft.

I think such long-running scripts should be written in a compiled language.

Oh, yes, I agree! A compiled language would have helped with many conceptually small, yet time-consuming issues for shell reasons ("can I use arrays?", mv vs cp semantics if target is same file, syntax etc.)

I'll see what I can do, but I might not get to it this week. So don't feel blocked by me, if you happen to have time.

@ekzyis ekzyis closed this Mar 26, 2026
@ekzyis ekzyis deleted the delete-nonreduced-fuzz-inputs-shebang branch March 26, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants