Skip to content

Commit fac61bb

Browse files
Fix verify.sh typo and refine comments
1 parent 31762c7 commit fac61bb

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

scripts/verify.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [ $? -ne 0 ]; then
2121
fi
2222

2323
if [ $final_ret -eq 0 ]; then
24-
# to avoid device or resource busy error
24+
# To avoid device or resource busy error
2525
sleep 0.5
2626

2727
# set transmit power (mBm)
@@ -49,7 +49,7 @@ if [ $final_ret -eq 0 ]; then
4949
sudo ip netns add ns4
5050
sudo ip netns add ns5
5151

52-
# add each phy (interface) to separate network namesapces
52+
# add each phy (interface) to separate network namespaces
5353
sudo iw phy $vw0_phy set netns name ns0
5454
sudo iw phy $vw1_phy set netns name ns1
5555
sudo iw phy $vw2_phy set netns name ns2
@@ -77,7 +77,7 @@ if [ $final_ret -eq 0 ]; then
7777
sudo ip netns exec ns5 ip link set vw5 up
7878
sudo ip netns exec ns5 ip link set lo up
7979

80-
# assing IP address to each interface
80+
# assign IP address to each interface
8181
sudo ip netns exec ns0 ip addr add 10.0.0.1/24 dev vw0
8282
sudo ip netns exec ns1 ip addr add 10.0.0.2/24 dev vw1
8383
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
9191
echo "================================================================================"
9292
echo "Ping Test: STA vw1 (10.0.0.2) (not connected) <--> STA vw2 (10.0.0.3) (not connected)"
9393
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))"
9595
echo "(be patient, it will take some time to route...)"
9696
echo "================================================================================"
9797
sudo ip netns exec ns1 ping -c 1 10.0.0.3
@@ -129,12 +129,12 @@ if [ $final_ret -eq 0 ]; then
129129
echo "=================================="
130130

131131
# 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)
133133
echo
134134
echo "================================================================================"
135135
echo "Ping Test: STA vw1 (10.0.0.2) (connected) <--> STA vw2 (10.0.0.3) (connected)"
136136
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))"
138138
echo "================================================================================"
139139
sudo ip netns exec ns1 ping -c 4 10.0.0.3
140140

@@ -145,12 +145,12 @@ if [ $final_ret -eq 0 ]; then
145145
fi
146146

147147
# 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
149149
echo
150150
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)"
152152
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)"
154154
echo "================================================================================"
155155
sudo ip netns exec ns2 ping -c 4 10.0.0.1
156156

@@ -202,12 +202,12 @@ if [ $final_ret -eq 0 ]; then
202202
echo "================================================================================"
203203
sudo ip netns exec ns3 ping -c 1 10.0.0.6
204204

205-
# ping test: IBSS vw3 <--> IBSS vw4, should success
205+
# ping test: IBSS vw3 <--> IBSS vw4, should succeed
206206
echo
207207
echo "================================================================================"
208208
echo "Ping Test: IBSS vw3 (10.0.0.4) (in ibss1) <--> IBSS vw4 (10.0.0.5) (in ibss1)"
209209
echo
210-
echo "(should success)"
210+
echo "(should succeed)"
211211
echo "(be patient, it will take some time to route...)"
212212
echo "================================================================================"
213213
sudo ip netns exec ns3 ping -c 1 10.0.0.5
@@ -225,7 +225,7 @@ if [ $final_ret -eq 0 ]; then
225225
uptime=$(echo "$uptime*1000000" | bc | awk -F "." '{print $1}')
226226
diff=$((tsf - uptime))
227227

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.
229229
if [ "${diff#-}" -gt 500000 ]; then
230230
final_ret=9
231231
fi
@@ -276,4 +276,4 @@ fi
276276

277277
echo "FAILED (code: $final_ret)"
278278
echo "==== Test FAILED ===="
279-
exit $final_ret
279+
exit $final_ret

0 commit comments

Comments
 (0)