Skip to content

Commit 7a7524a

Browse files
author
Ossama Othman
authored
tests: Skip listener manager test if no MPTCP. (#272)
The mptcpd listener manager will fail with a "Protocol not supported" error when run against Linux kernels that do not support MPTCP. Skip the test rather than fail with an error if MPTCP support isn't available. Fixes #271.
1 parent 0f05846 commit 7a7524a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ test_id_manager_LDADD = \
106106
test_listener_manager_SOURCES = test-listener-manager.c
107107
test_listener_manager_LDADD = \
108108
$(top_builddir)/lib/libmptcpd.la \
109+
$(builddir)/lib/libmptcpd_test.la \
109110
$(ELL_LIBS) \
110111
$(CODE_COVERAGE_LIBS)
111112

tests/test-listener-manager.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <mptcpd/private/listener_manager.h>
2222
#include <mptcpd/listener_manager.h>
2323

24-
#include "test-plugin.h" // For test sockaddrs
24+
#include "test-util.h"
2525

2626
#undef NDEBUG
2727
#include <assert.h>
@@ -151,6 +151,9 @@ static void test_destroy(void const *test_data)
151151

152152
int main(int argc, char *argv[])
153153
{
154+
// Skip this test if the kernel is not MPTCP capable.
155+
tests_skip_if_no_mptcp();
156+
154157
l_log_set_stderr();
155158
//l_debug_enable("*");
156159

0 commit comments

Comments
 (0)