Skip to content

Commit cfc2eef

Browse files
vladimirolteankuba-moo
authored andcommitted
selftests: net: use upstream mtools
Joachim kindly merged the IPv6 support in troglobit/mtools#2, so we can just use his version now. A few more fixes subsequently came in for IPv6, so even better. Check that the deployed mtools version is 3.0 or above. Note that the version check breaks compatibility with my fork where I didn't bump the version, but I assume that won't be a problem. Signed-off-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f37dc28 commit cfc2eef

File tree

1 file changed

+17
-2
lines changed
  • tools/testing/selftests/net/forwarding

1 file changed

+17
-2
lines changed

tools/testing/selftests/net/forwarding/lib.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,32 @@ require_command()
309309
fi
310310
}
311311

312+
# IPv6 support was added in v3.0
313+
check_mtools_version()
314+
{
315+
local version="$(msend -v)"
316+
local major
317+
318+
version=${version##msend version }
319+
major=$(echo $version | cut -d. -f1)
320+
321+
if [ $major -lt 3 ]; then
322+
echo "SKIP: expected mtools version 3.0, got $version"
323+
exit $ksft_skip
324+
fi
325+
}
326+
312327
if [[ "$REQUIRE_JQ" = "yes" ]]; then
313328
require_command jq
314329
fi
315330
if [[ "$REQUIRE_MZ" = "yes" ]]; then
316331
require_command $MZ
317332
fi
318333
if [[ "$REQUIRE_MTOOLS" = "yes" ]]; then
319-
# https://github.com/vladimiroltean/mtools/
320-
# patched for IPv6 support
334+
# https://github.com/troglobit/mtools
321335
require_command msend
322336
require_command mreceive
337+
check_mtools_version
323338
fi
324339

325340
##############################################################################

0 commit comments

Comments
 (0)