|
9 | 9 | . "$(dirname "${0}")/mptcp_lib.sh"
|
10 | 10 |
|
11 | 11 | ns=""
|
12 |
| -test_cnt=1 |
13 | 12 | timeout_poll=30
|
14 | 13 | timeout_test=$((timeout_poll * 2 + 1))
|
15 | 14 | ret=0
|
@@ -55,21 +54,20 @@ __chk_nr()
|
55 | 54 |
|
56 | 55 | nr=$(eval $command)
|
57 | 56 |
|
58 |
| - printf "%-50s" "$msg" |
| 57 | + mptcp_lib_print_title "$msg" |
59 | 58 | if [ "$nr" != "$expected" ]; then
|
60 | 59 | if [ "$nr" = "$skip" ] && ! mptcp_lib_expect_all_features; then
|
61 |
| - echo "[ skip ] Feature probably not supported" |
| 60 | + mptcp_lib_pr_skip "Feature probably not supported" |
62 | 61 | mptcp_lib_result_skip "${msg}"
|
63 | 62 | else
|
64 |
| - echo "[ fail ] expected $expected found $nr" |
| 63 | + mptcp_lib_pr_fail "expected $expected found $nr" |
65 | 64 | mptcp_lib_result_fail "${msg}"
|
66 | 65 | ret=${KSFT_FAIL}
|
67 | 66 | fi
|
68 | 67 | else
|
69 |
| - echo "[ ok ]" |
| 68 | + mptcp_lib_pr_ok |
70 | 69 | mptcp_lib_result_pass "${msg}"
|
71 | 70 | fi
|
72 |
| - test_cnt=$((test_cnt+1)) |
73 | 71 | }
|
74 | 72 |
|
75 | 73 | __chk_msk_nr()
|
@@ -114,20 +112,19 @@ wait_msk_nr()
|
114 | 112 | sleep 1
|
115 | 113 | done
|
116 | 114 |
|
117 |
| - printf "%-50s" "$msg" |
| 115 | + mptcp_lib_print_title "$msg" |
118 | 116 | if [ $i -ge $timeout ]; then
|
119 |
| - echo "[ fail ] timeout while expecting $expected max $max last $nr" |
| 117 | + mptcp_lib_pr_fail "timeout while expecting $expected max $max last $nr" |
120 | 118 | mptcp_lib_result_fail "${msg} # timeout"
|
121 | 119 | ret=${KSFT_FAIL}
|
122 | 120 | elif [ $nr != $expected ]; then
|
123 |
| - echo "[ fail ] expected $expected found $nr" |
| 121 | + mptcp_lib_pr_fail "expected $expected found $nr" |
124 | 122 | mptcp_lib_result_fail "${msg} # unexpected result"
|
125 | 123 | ret=${KSFT_FAIL}
|
126 | 124 | else
|
127 |
| - echo "[ ok ]" |
| 125 | + mptcp_lib_pr_ok |
128 | 126 | mptcp_lib_result_pass "${msg}"
|
129 | 127 | fi
|
130 |
| - test_cnt=$((test_cnt+1)) |
131 | 128 | }
|
132 | 129 |
|
133 | 130 | chk_msk_fallback_nr()
|
|
0 commit comments