test-pseudotcp-random.sh 281 Bytes
Newer Older
1
#!/bin/sh
2

3 4 5 6 7 8 9 10 11 12 13 14 15 16
set -e

if test -n "${BUILT_WITH_MESON}"; then
  TEST_PSEUDOTCP=$1
else
  TEST_PSEUDOTCP=./test-pseudotcp
fi

cleanup() {
  rm -rf rand rand-copy
}

trap cleanup EXIT

17
dd if=/dev/urandom of=rand count=1024 ibs=1024
18
"${TEST_PSEUDOTCP}" rand rand-copy
19
diff rand rand-copy