limbo/scripts/run-until-fail.sh
Pekka Enberg 9288471525 stress: Make random seed configurable
When we're not running under Antithesis, allow the user to specify a
seed for random number generation, which impacts the SQL operations we
do. Although not deterministic, this makes reproducing some issues
easier.

Also, add a "scripts/run-until-fail.sh", which you can use to discover
interesting seeds. For example, you can run

```
./scripts/run-until-fail.sh cargo run -p turso_stress -- -t1
```

to find a bug and then just copy-paste the reported seed to attempt to
reproduce it.
2025-12-15 17:56:33 +02:00

14 lines
258 B
Bash
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -u
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <command> [args...]" >&2
exit 1
fi
# Run the given command repeatedly until it exits with nonzero status.
while "$@"; do
:
done
echo "Command failed with exit code $?; stopping."