Commit 119931cc authored by Geliang Tang's avatar Geliang Tang Committed by Jakub Kicinski

selftests: mptcp: add missing oflag=append

In mptcp_connect.sh we are missing something like "oflag=append"
because this will write "${rem}" bytes at the beginning of the file
where there is already some random bytes. It should write that at
the end.

This patch adds this missing 'oflag=append' flag for 'dd' command in
make_file().
Suggested-by: default avatarMatthieu Baerts <matttbe@kernel.org>
Reviewed-by: default avatarMatthieu Baerts <matttbe@kernel.org>
Signed-off-by: default avatarGeliang Tang <geliang.tang@suse.com>
Signed-off-by: default avatarMat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-12-8d6b94150f6b@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 61c131f5
......@@ -593,7 +593,7 @@ make_file()
rem=$((SIZE - (ksize * 1024)))
dd if=/dev/urandom of="$name" bs=1024 count=$ksize 2> /dev/null
dd if=/dev/urandom conv=notrunc of="$name" bs=1 count=$rem 2> /dev/null
dd if=/dev/urandom conv=notrunc of="$name" oflag=append bs=1 count=$rem 2> /dev/null
echo -e "\nMPTCP_TEST_FILE_END_MARKER" >> "$name"
echo "Created $name (size $(du -b "$name")) containing data sent by $who"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment