From patchwork Tue Nov 28 23:18:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mat Martineau X-Patchwork-Id: 13471940 X-Patchwork-Delegate: mat@martineau.name 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 D54425DF06; Tue, 28 Nov 2023 23:19:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cbm6rBVu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B465C433D9; Tue, 28 Nov 2023 23:19:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701213565; bh=bynPJq83fp3giWDlaCUzoDgPg1mkX10IQ8ZYzRHCe74=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=cbm6rBVunqCzdzPw9Sw0pwqzWYPFsNt/vtH051Htcohi0Ba3OLWR+m+U7LDaTyUll aYpdMnhZGoUh8jKzKkfJG4WnoyBSob0xrTjF6UkHqHfBJ/6A6SUkxMuz8fIMlfC+PA 97V39i+gFgVikpWZcXbo5PjfnbWl3lXbD7ogp6zK28H4DvkfzSUIQ1Mpv8cBKXv8fB xZOnCbj4AbUTMKmQnSyLwBzBoJuFb3oWPoMJhaVcb4/zTxp0Hl7OGaBb0vHOuFNikG bbD5WkHsEg7zQFSWEL6XVBRHSYX48PXgMUhfbLGjAqiBnDiS/bzwHVEkLsWncBI30+ LBtQmXpkbSwUA== From: Mat Martineau Date: Tue, 28 Nov 2023 15:18:56 -0800 Subject: [PATCH net-next v4 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: <20231128-send-net-next-2023107-v4-12-8d6b94150f6b@kernel.org> References: <20231128-send-net-next-2023107-v4-0-8d6b94150f6b@kernel.org> In-Reply-To: <20231128-send-net-next-2023107-v4-0-8d6b94150f6b@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"