Skip to content

Commit a17c5aa

Browse files
matttbekuba-moo
authored andcommitted
selftests: mptcp: print trailing bytes with od
This is better than printing random bytes in the terminal. Note that Jakub suggested 'hexdump', but Mat found out this tool is not often installed by default. 'od' can do a similar job, and it is in the POSIX specs and available in coreutils, so it should be on more systems. While at it, display a few more bytes, just to fill in the two lines. And no need to display the 3rd only line showing the next number of bytes: 0000040. Suggested-by: Jakub Kicinski <kuba@kernel.org> Suggested-by: Mat Martineau <martineau@kernel.org> Reviewed-by: Mat Martineau <martineau@kernel.org> Reviewed-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20250912-net-mptcp-fix-sft-connect-v1-4-d40e77cbbf02@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 8708c5d commit a17c5aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/net/mptcp/mptcp_lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ mptcp_lib_make_file() {
384384
mptcp_lib_print_file_err() {
385385
ls -l "${1}" 1>&2
386386
echo "Trailing bytes are: "
387-
tail -c 27 "${1}"
387+
tail -c 32 "${1}" | od -x | head -n2
388388
}
389389

390390
# $1: input file ; $2: output file ; $3: what kind of file

0 commit comments

Comments
 (0)