Skip to content

Commit c1b4129

Browse files
authored
Skip MPTCP test on platforms without MPTCP (valkey-io#3089)
The test case added in valkey-io#3042 fails on platforms without MPTCP support. This change automatically skips the MPTCP tests on platforms without MTPCP. --------- Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
1 parent 4b5a48a commit c1b4129

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

tests/support/server.tcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ proc tags_acceptable {tags err_return} {
273273
return 0
274274
}
275275

276+
if {[lsearch $tags "mptcp"] >= 0 && ![is_mptcp_available]} {
277+
set err "MPTCP not available on this system"
278+
return 0
279+
}
280+
276281
return 1
277282
}
278283

tests/test_helper.tcl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,17 @@ proc is_ipv6_available {} {
10181018
return 0
10191019
}
10201020

1021+
# MPTCP detection
1022+
proc is_mptcp_available {} {
1023+
# Typical error output from valkey-cli --mptcp:
1024+
# Could not connect to Valkey at 127.0.0.1:6379: MPTCP is not supported on this platform
1025+
if {[catch {exec $::VALKEY_CLI_BIN --mptcp ping} e] &&
1026+
[string match "*MPTCP is not supported on this platform*" $e]} {
1027+
return 0
1028+
}
1029+
return 1
1030+
}
1031+
10211032
# With the parallel test running multiple server instances at the same time
10221033
# we need a fast enough computer, otherwise a lot of tests may generate
10231034
# false positives.

0 commit comments

Comments
 (0)