Commit 787eb1e4 authored by Matthieu Baerts's avatar Matthieu Baerts Committed by Jakub Kicinski
Browse files

selftests: mptcp: uniform 'rndh' variable



The definition of 'rndh' was probably copied from one script to another
but some times, 'sec' was not defined, not used and/or not spelled
properly.

Here all the 'rndh' are now defined the same way.

Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b71dd705
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

sec=$(date +%s)
rndh=$(printf %x $sec)-$(mktemp -u XXXXXX)
ns="ns1-$rndh"
ksft_skip=4
+1 −2
Original line number Diff line number Diff line
@@ -274,8 +274,7 @@ check_transfer()

check_mptcp_disabled()
{
	local disabled_ns
	disabled_ns="ns_disabled-$sech-$(mktemp -u XXXXXX)"
	local disabled_ns="ns_disabled-$rndh"
	ip netns add ${disabled_ns} || exit $ksft_skip

	# net.mptcp.enabled should be enabled by default
+3 −2
Original line number Diff line number Diff line
@@ -59,8 +59,9 @@ init_partial()
{
	capout=$(mktemp)

	local rndh
	rndh=$(mktemp -u XXXXXX)
	local sec rndh
	sec=$(date +%s)
	rndh=$(printf %x $sec)-$(mktemp -u XXXXXX)

	ns1="ns1-$rndh"
	ns2="ns2-$rndh"
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ add_mark_rules()

init()
{
	local sec rndh
	sec=$(date +%s)
	rndh=$(printf %x $sec)-$(mktemp -u XXXXXX)

	ns1="ns1-$rndh"
+1 −0
Original line number Diff line number Diff line
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

sec=$(date +%s)
rndh=$(printf %x $sec)-$(mktemp -u XXXXXX)
ns1="ns1-$rndh"
ns2="ns2-$rndh"
Loading