From patchwork Tue Nov 14 19:56:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mat Martineau X-Patchwork-Id: 13455856 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 310DF41A97; Tue, 14 Nov 2023 19:58:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Tk4QmYKi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7DF1C43391; Tue, 14 Nov 2023 19:58:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699991907; bh=4LaAPrJNRyV9Kxo822qcQi+Li0GOQODfZw7dr5xUWj0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Tk4QmYKiiSox5Eo9b3x4ORBjlYy+VFmBqAcw4aLoeclpd+MgjD3wRYdEB7sCjTFZO Ps9S0hJAFfAXtyCD/l0RPP4WnivH3uuMRBQBLbrcSM9XwTqcayozUDUs5QeOtX/ReF +7zyZ4iSsvYo6p/LRQlNgOx9OVkTa+5F08ncKXggYQmmLQ+B4ajCkdaCeup1BRQyxw hd/7FjGFguykbB2IudmtsqkkNhPmczFPkX6gw1TrtnEK/HHMQPnX4KcnegTvs7EB57 meowfgAU5DBPk9autZKvPYlcUWTYsExAjUfhdDOpeiEBw6pKpL0YVo4uw+/Q7S/Tlm 06pBDXcYQHbwA== From: Mat Martineau Date: Tue, 14 Nov 2023 11:56:54 -0800 Subject: [PATCH net-next v2 12/15] selftests: mptcp: add missing oflag=append Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231114-send-net-next-2023107-v2-12-b650a477362c@kernel.org> References: <20231114-send-net-next-2023107-v2-0-b650a477362c@kernel.org> In-Reply-To: <20231114-send-net-next-2023107-v2-0-b650a477362c@kernel.org> To: Matthieu Baerts , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, Mat Martineau , Geliang Tang X-Mailer: b4 0.12.4 From: Geliang Tang 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 Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau --- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"