@@ -68,10 +68,11 @@ send_uc_ipv4()
68
68
69
69
check_rcv ()
70
70
{
71
- local if_name=$1
72
- local type=$2
73
- local pattern=$3
74
- local should_receive=$4
71
+ local if_name=$1 ; shift
72
+ local type=$1 ; shift
73
+ local pattern=$1 ; shift
74
+ local should_receive=$1 ; shift
75
+ local test_name=" $1 " ; shift
75
76
local should_fail=
76
77
77
78
[ $should_receive = true ] && should_fail=0 || should_fail=1
@@ -81,7 +82,7 @@ check_rcv()
81
82
82
83
check_err_fail " $should_fail " " $? " " reception"
83
84
84
- log_test " $if_name : $type "
85
+ log_test " $test_name : $type "
85
86
}
86
87
87
88
mc_route_prepare ()
@@ -106,6 +107,7 @@ run_test()
106
107
{
107
108
local send_if_name=$1 ; shift
108
109
local rcv_if_name=$1 ; shift
110
+ local test_name=" $1 " ; shift
109
111
local smac=$( mac_get $send_if_name )
110
112
local rcv_dmac=$( mac_get $rcv_if_name )
111
113
@@ -150,61 +152,61 @@ run_test()
150
152
151
153
check_rcv $rcv_if_name " Unicast IPv4 to primary MAC address" \
152
154
" $smac > $rcv_dmac , ethertype IPv4 (0x0800)" \
153
- true
155
+ true " $test_name "
154
156
155
157
check_rcv $rcv_if_name " Unicast IPv4 to macvlan MAC address" \
156
158
" $smac > $MACVLAN_ADDR , ethertype IPv4 (0x0800)" \
157
- true
159
+ true " $test_name "
158
160
159
161
xfail_on_veth $h1 \
160
162
check_rcv $rcv_if_name " Unicast IPv4 to unknown MAC address" \
161
163
" $smac > $UNKNOWN_UC_ADDR1 , ethertype IPv4 (0x0800)" \
162
- false
164
+ false " $test_name "
163
165
164
166
check_rcv $rcv_if_name " Unicast IPv4 to unknown MAC address, promisc" \
165
167
" $smac > $UNKNOWN_UC_ADDR2 , ethertype IPv4 (0x0800)" \
166
- true
168
+ true " $test_name "
167
169
168
170
xfail_on_veth $h1 \
169
171
check_rcv $rcv_if_name \
170
172
" Unicast IPv4 to unknown MAC address, allmulti" \
171
173
" $smac > $UNKNOWN_UC_ADDR3 , ethertype IPv4 (0x0800)" \
172
- false
174
+ false " $test_name "
173
175
174
176
check_rcv $rcv_if_name " Multicast IPv4 to joined group" \
175
177
" $smac > $JOINED_MACV4_MC_ADDR , ethertype IPv4 (0x0800)" \
176
- true
178
+ true " $test_name "
177
179
178
180
xfail_on_veth $h1 \
179
181
check_rcv $rcv_if_name \
180
182
" Multicast IPv4 to unknown group" \
181
183
" $smac > $UNKNOWN_MACV4_MC_ADDR1 , ethertype IPv4 (0x0800)" \
182
- false
184
+ false " $test_name "
183
185
184
186
check_rcv $rcv_if_name " Multicast IPv4 to unknown group, promisc" \
185
187
" $smac > $UNKNOWN_MACV4_MC_ADDR2 , ethertype IPv4 (0x0800)" \
186
- true
188
+ true " $test_name "
187
189
188
190
check_rcv $rcv_if_name " Multicast IPv4 to unknown group, allmulti" \
189
191
" $smac > $UNKNOWN_MACV4_MC_ADDR3 , ethertype IPv4 (0x0800)" \
190
- true
192
+ true " $test_name "
191
193
192
194
check_rcv $rcv_if_name " Multicast IPv6 to joined group" \
193
195
" $smac > $JOINED_MACV6_MC_ADDR , ethertype IPv6 (0x86dd)" \
194
- true
196
+ true " $test_name "
195
197
196
198
xfail_on_veth $h1 \
197
199
check_rcv $rcv_if_name " Multicast IPv6 to unknown group" \
198
200
" $smac > $UNKNOWN_MACV6_MC_ADDR1 , ethertype IPv6 (0x86dd)" \
199
- false
201
+ false " $test_name "
200
202
201
203
check_rcv $rcv_if_name " Multicast IPv6 to unknown group, promisc" \
202
204
" $smac > $UNKNOWN_MACV6_MC_ADDR2 , ethertype IPv6 (0x86dd)" \
203
- true
205
+ true " $test_name "
204
206
205
207
check_rcv $rcv_if_name " Multicast IPv6 to unknown group, allmulti" \
206
208
" $smac > $UNKNOWN_MACV6_MC_ADDR3 , ethertype IPv6 (0x86dd)" \
207
- true
209
+ true " $test_name "
208
210
209
211
tcpdump_cleanup $rcv_if_name
210
212
}
0 commit comments