#!/usr/bin/env bash SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" BYS=$(dd if=/dev/urandom bs=64 count=1 2>/dev/null | tr -dc '[[:print:]]') ARG1=${BYS:0:${#BYS}/2} ARG2=${BYS:${#BYS}/2} [[ "$ARG1" == -* ]] && exit 0 [[ "$ARG2" == -* ]] && exit 0 RES1=$($SCRIPTDIR/target/release/alpmver "$ARG1" "$ARG2") RES2=$($SCRIPTDIR/calpmver "$ARG1" "$ARG2") if [ "$RES1" != "$RES2" ] then printf 'error: failed on payloads "%s" -> "%s": rust = "%s", c = "%s"\n' "$ARG1" "$ARG2" "$RES1" "$RES2" fi