Skip to content

Commit

Permalink
Randomize data size in echo test
Browse files Browse the repository at this point in the history
  • Loading branch information
olegv142 committed Mar 21, 2024
1 parent 25f5795 commit d2f721f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/echo_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ for (( ; ; )); do
sum $fifo > $cktx &
sum_pid=$!

dd if=/dev/urandom bs=1M count=10 2>/dev/null | tee $fifo | nc -N $1 3333 | sum > $ckrx
size=$((1 + ($RANDOM % 4096) + 4096 * ($RANDOM % 4096)))
dd if=/dev/urandom bs=1 count=$size 2>/dev/null | tee $fifo | nc -N $1 3333 | sum > $ckrx
wait $sum_pid

if diff $cktx $ckrx; then
Expand Down

0 comments on commit d2f721f

Please sign in to comment.