mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
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.
14 lines
258 B
Bash
Executable file
14 lines
258 B
Bash
Executable file
#!/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 non‑zero status.
|
||
while "$@"; do
|
||
:
|
||
done
|
||
|
||
echo "Command failed with exit code $?; stopping."
|