Skip to content

Commit 21f25cd

Browse files
Guillaume Naultdavem330
authored andcommitted
selftests: fib rule: Log test description
All callers of fib_rule6_test_match_n_redirect() and fib_rule4_test_match_n_redirect() pass a third argument containing a description of the test being run. Instead of ignoring this argument, let's use it for logging instead of printing a truncated version of the command. Signed-off-by: Guillaume Nault <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2e25211 commit 21f25cd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tools/testing/selftests/net/fib_rule_tests.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,14 @@ fib_rule6_test_match_n_redirect()
104104
{
105105
local match="$1"
106106
local getmatch="$2"
107+
local description="$3"
107108

108109
$IP -6 rule add $match table $RTABLE
109110
$IP -6 route get $GW_IP6 $getmatch | grep -q "table $RTABLE"
110-
log_test $? 0 "rule6 check: $1"
111+
log_test $? 0 "rule6 check: $description"
111112

112113
fib_rule6_del_by_pref "$match"
113-
log_test $? 0 "rule6 del by pref: $match"
114+
log_test $? 0 "rule6 del by pref: $description"
114115
}
115116

116117
fib_rule6_test()
@@ -176,13 +177,14 @@ fib_rule4_test_match_n_redirect()
176177
{
177178
local match="$1"
178179
local getmatch="$2"
180+
local description="$3"
179181

180182
$IP rule add $match table $RTABLE
181183
$IP route get $GW_IP4 $getmatch | grep -q "table $RTABLE"
182-
log_test $? 0 "rule4 check: $1"
184+
log_test $? 0 "rule4 check: $description"
183185

184186
fib_rule4_del_by_pref "$match"
185-
log_test $? 0 "rule4 del by pref: $match"
187+
log_test $? 0 "rule4 del by pref: $description"
186188
}
187189

188190
fib_rule4_test()

0 commit comments

Comments
 (0)