Skip to content

Commit

Permalink
selftests: mptcp: connect: better display the files size
Browse files Browse the repository at this point in the history
'du' will print the name of the file, which was already displayed
before, e.g.

  Created /tmp/tmp.UOyy0ghfmQ (size 4703740/tmp/tmp.UOyy0ghfmQ) containing data sent by client
  Created /tmp/tmp.xq3zvFinGo (size 1391724/tmp/tmp.xq3zvFinGo) containing data sent by server

'stat' can be used instead, to display this instead:

  Created /tmp/tmp.UOyy0ghfmQ (size 4703740 B) containing data sent by client
  Created /tmp/tmp.xq3zvFinGo (size 1391724 B) containing data sent by server

So easier to spot the file sizes.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
  • Loading branch information
matttbe authored and intel-lab-lkp committed Jan 8, 2025
1 parent 41484ff commit 167a303
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/mptcp/mptcp_connect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ make_file()
mptcp_lib_make_file $name 1024 $ksize
dd if=/dev/urandom conv=notrunc of="$name" oflag=append bs=1 count=$rem 2> /dev/null

echo "Created $name (size $(du -b "$name")) containing data sent by $who"
echo "Created $name (size $(stat -c "%s" "$name") B) containing data sent by $who"
}

run_tests_lo()
Expand Down

0 comments on commit 167a303

Please sign in to comment.