2 # SPDX-License-Identifier: GPL-2.0
7 # SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var can be set when validating all
8 # features using the last version of the kernel and the selftests to make sure
9 # a test is not being skipped by mistake.
10 mptcp_lib_expect_all_features() {
11 [ "${SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES:-}" = "1" ]
15 mptcp_lib_fail_if_expected_feature() {
16 if mptcp_lib_expect_all_features; then
17 echo "ERROR: missing feature: ${*}"
25 mptcp_lib_has_file() {
28 if [ -f "${f}" ]; then
32 mptcp_lib_fail_if_expected_feature "${f} file not found"
35 mptcp_lib_check_mptcp() {
36 if ! mptcp_lib_has_file "/proc/sys/net/mptcp/enabled"; then
37 echo "SKIP: MPTCP support is not available"