Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: net: use upstream mtools

Joachim kindly merged the IPv6 support in
https://github.com/troglobit/mtools/pull/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 <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20240510112856.1262901-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
cfc2eefd f37dc28a

+17 -2
+17 -2
tools/testing/selftests/net/forwarding/lib.sh
··· 309 309 fi 310 310 } 311 311 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 + 312 327 if [[ "$REQUIRE_JQ" = "yes" ]]; then 313 328 require_command jq 314 329 fi ··· 331 316 require_command $MZ 332 317 fi 333 318 if [[ "$REQUIRE_MTOOLS" = "yes" ]]; then 334 - # https://github.com/vladimiroltean/mtools/ 335 - # patched for IPv6 support 319 + # https://github.com/troglobit/mtools 336 320 require_command msend 337 321 require_command mreceive 322 + check_mtools_version 338 323 fi 339 324 340 325 ##############################################################################