#!/bin/sh dd if=/dev/zero bs=1048576 count=100 2>/dev/null | /usr/bin/time t/helper/test-tool sha1 >/dev/null while read expect cnt pfx do case "$expect" in '#'*) continue ;; esac actual=$( { test -z "$pfx" || echo "$pfx" dd if=/dev/zero bs=1048576 count=$cnt 2>/dev/null | perl -pe 'y/\000/g/' } | ./t/helper/test-tool sha1 $cnt ) if test "$expect" = "$actual" then echo "OK: $expect $cnt $pfx" else echo >&2 "OOPS: $cnt" echo >&2 "expect: $expect" echo >&2 "actual: $actual" exit 1 fi done </dev/null | perl -pe 'y/\000/g/' } | sha1sum | sed -e 's/ .*//' ) echo "$actual $cnt $pfx" done <