@@ -21,7 +21,7 @@ if [ $? -ne 0 ]; then
21
21
fi
22
22
23
23
if [ $final_ret -eq 0 ]; then
24
- # to avoid device or resource busy error
24
+ # To avoid device or resource busy error
25
25
sleep 0.5
26
26
27
27
# set transmit power (mBm)
@@ -49,7 +49,7 @@ if [ $final_ret -eq 0 ]; then
49
49
sudo ip netns add ns4
50
50
sudo ip netns add ns5
51
51
52
- # add each phy (interface) to separate network namesapces
52
+ # add each phy (interface) to separate network namespaces
53
53
sudo iw phy $vw0_phy set netns name ns0
54
54
sudo iw phy $vw1_phy set netns name ns1
55
55
sudo iw phy $vw2_phy set netns name ns2
@@ -77,7 +77,7 @@ if [ $final_ret -eq 0 ]; then
77
77
sudo ip netns exec ns5 ip link set vw5 up
78
78
sudo ip netns exec ns5 ip link set lo up
79
79
80
- # assing IP address to each interface
80
+ # assign IP address to each interface
81
81
sudo ip netns exec ns0 ip addr add 10.0.0.1/24 dev vw0
82
82
sudo ip netns exec ns1 ip addr add 10.0.0.2/24 dev vw1
83
83
sudo ip netns exec ns2 ip addr add 10.0.0.3/24 dev vw2
@@ -91,7 +91,7 @@ if [ $final_ret -eq 0 ]; then
91
91
echo " ================================================================================"
92
92
echo " Ping Test: STA vw1 (10.0.0.2) (not connected) <--> STA vw2 (10.0.0.3) (not connected)"
93
93
echo
94
- echo " (should fail, because they haven't connnected to AP vw0 (10.0.0.1))"
94
+ echo " (should fail, because they haven't connected to AP vw0 (10.0.0.1))"
95
95
echo " (be patient, it will take some time to route...)"
96
96
echo " ================================================================================"
97
97
sudo ip netns exec ns1 ping -c 1 10.0.0.3
@@ -129,12 +129,12 @@ if [ $final_ret -eq 0 ]; then
129
129
echo " =================================="
130
130
131
131
# ping test: STA vw1 (10.0.0.2) <--> STA vw2 (10.0.0.3),
132
- # should success , packet will be relayed by AP vw0 (10.0.0.1)
132
+ # should succeed , packet will be relayed by AP vw0 (10.0.0.1)
133
133
echo
134
134
echo " ================================================================================"
135
135
echo " Ping Test: STA vw1 (10.0.0.2) (connected) <--> STA vw2 (10.0.0.3) (connected)"
136
136
echo
137
- echo " (should success , packet will be relay by AP vw0 (10.0.0.1))"
137
+ echo " (should succeed , packet will be relayed by AP vw0 (10.0.0.1))"
138
138
echo " ================================================================================"
139
139
sudo ip netns exec ns1 ping -c 4 10.0.0.3
140
140
@@ -145,12 +145,12 @@ if [ $final_ret -eq 0 ]; then
145
145
fi
146
146
147
147
# ping test: STA vw2 (10.0.0.3) <--> AP vw0 (10.0.0.1),
148
- # should success , packet will directly send/receive between STA and AP
148
+ # should succeed , packet will directly send/receive between STA and AP
149
149
echo
150
150
echo " ================================================================================"
151
- echo " Ping Test: STA vw1 (10.0.0.3) (connected) <--> AP vw0 (10.0.0.1)"
151
+ echo " Ping Test: STA vw2 (10.0.0.3) (connected) <--> AP vw0 (10.0.0.1)"
152
152
echo
153
- echo " (should success , packet will directly send/receive between STA vw1 and AP vw0)"
153
+ echo " (should succeed , packet will directly send/receive between STA vw2 and AP vw0)"
154
154
echo " ================================================================================"
155
155
sudo ip netns exec ns2 ping -c 4 10.0.0.1
156
156
@@ -202,12 +202,12 @@ if [ $final_ret -eq 0 ]; then
202
202
echo " ================================================================================"
203
203
sudo ip netns exec ns3 ping -c 1 10.0.0.6
204
204
205
- # ping test: IBSS vw3 <--> IBSS vw4, should success
205
+ # ping test: IBSS vw3 <--> IBSS vw4, should succeed
206
206
echo
207
207
echo " ================================================================================"
208
208
echo " Ping Test: IBSS vw3 (10.0.0.4) (in ibss1) <--> IBSS vw4 (10.0.0.5) (in ibss1)"
209
209
echo
210
- echo " (should success )"
210
+ echo " (should succeed )"
211
211
echo " (be patient, it will take some time to route...)"
212
212
echo " ================================================================================"
213
213
sudo ip netns exec ns3 ping -c 1 10.0.0.5
@@ -225,7 +225,7 @@ if [ $final_ret -eq 0 ]; then
225
225
uptime=$( echo " $uptime *1000000" | bc | awk -F " ." ' {print $1}' )
226
226
diff=$(( tsf - uptime))
227
227
228
- # difference between tsf and uptime should less than 0.5 sec.
228
+ # difference between tsf and uptime should be less than or equal to 0.5 sec.
229
229
if [ " ${diff# -} " -gt 500000 ]; then
230
230
final_ret=9
231
231
fi
276
276
277
277
echo " FAILED (code: $final_ret )"
278
278
echo " ==== Test FAILED ===="
279
- exit $final_ret
279
+ exit $final_ret
0 commit comments