diff options
author | Geliang Tang <geliang.tang@suse.com> | 2023-11-29 02:18:56 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-30 07:06:18 +0300 |
commit | 119931cc88ce7073b9a289c13abaf2348d55fdfa (patch) | |
tree | ed817d05ee4831828c2d74cdceb505836da4c036 /tools | |
parent | 61c131f5d4d2b79904af2fdcb2839a9db8e7c55c (diff) | |
download | linux-119931cc88ce7073b9a289c13abaf2348d55fdfa.tar.xz |
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: Matthieu Baerts <matttbe@kernel.org>
Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-12-8d6b94150f6b@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 3b971d1617d8..c4f08976c418 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -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" |