#!/usr/bin/env bash # Tier — custom-backend fuzz. The custom module's exec output flows straight into # formatting / sanitising / (optionally) JSON parsing, so feed it the pathological # inputs that tend to segfault (empty, non-zero exit, invalid JSON, huge, non-UTF8, # empty format) and assert no crash / critical, including on clean exit. # # Usage: fuzz.sh set -euo pipefail DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # shellcheck source=lib.sh source "$DIR/lib.sh" smoke::setup smoke::start_compositor trap smoke::stop EXIT fail=0 # run_case run_case() { local name="$1" mod="$2" cfg echo "::group::fuzz: $name" cfg="$(mktemp --suffix=.json)" cat > "$cfg" <