-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathffunctional_tests_run
More file actions
executable file
·258 lines (164 loc) · 18.8 KB
/
Copy pathffunctional_tests_run
File metadata and controls
executable file
·258 lines (164 loc) · 18.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
#!/bin/bash
trap 'kill $(jobs -p)' EXIT
clear
./etracker --no-locations &
sleep 1
echo Start Testing
gcc origin-udp/_client_udp.c string.c -o client-udp.o -lm || exit
echo Base Tests
echo 1 ADD tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/01.txt -
echo 2 ADD tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=started&compact=1" | hexdump -C | diff functional_tests/02.txt -
echo 3 ADD tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/03.txt -
echo 4 ADD tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=started&compact=1" | hexdump -C | diff functional_tests/04.txt -
echo 5 ADD tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/05.txt -
echo 6 ADD tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=started&compact=1" | hexdump -C | diff functional_tests/06.txt -
echo 1-1 ADD tcp peer 11111111111111111111 hash 22223333444455551111
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=22223333444455551111&event=started&compact=0" | hexdump -C | diff functional_tests/01-1.txt -
echo 11 ADD tcp peer 11111111111111111111 hash 22223333444455551111
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=22223333444455551111&event=started&no_peer_id=1&compact=0" | hexdump -C | diff functional_tests/11.txt -
echo 2-1 ADD tcp peer 11111111111111111111 hash 22223333444455551111
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=22223333444455551111&event=started&compact=1" | hexdump -C | diff functional_tests/02-1.txt -
echo 7 STOP tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/07.txt -
echo 8 STOP tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=stopped&compact=1" | hexdump -C | diff functional_tests/08.txt -
echo 9 STOP tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/09.txt -
echo 10 STOP tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/10.txt -
echo 12 STOP tcp peer 11111111111111111111 hash 22223333444455551111
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=22223333444455551111&event=stopped&compact=1" | hexdump -C | diff functional_tests/12.txt -
echo 13 ADD udp peer 11111111111111111111 hash 22222222222222222222 scrape 11111111111111111111 22222222222222222222
./client-udp.o 2 11111111111111111111 22222222222222222222 11111111111111111111 22222222222222222222 | diff functional_tests/13.txt -
echo 14 ADD udp peer 22222222222222222222 hash 22222222222222222222 scrape 11111111111111111111 22222222222222222222
./client-udp.o 2 22222222222222222222 22222222222222222222 11111111111111111111 22222222222222222222 | diff functional_tests/14.txt -
echo Ipv4 Tests
echo 15 ADD tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/15.txt -
echo 16 ADD tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/16.txt -
echo 17 ADD udp peer 22222222222222222222 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 22222222222222222222 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/17.txt -
echo 18 ADD udp peer 33333333333333333333 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 33333333333333333333 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/18.txt -
echo 19 ADD tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/19.txt -
echo 20 STOP udp peer 33333333333333333333 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 33333333333333333333 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/20.txt -
echo 21 ADD tcp peer 44444444444444444444 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=44444444444444444444&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/21.txt -
echo 22 STOP udp peer 44444444444444444444 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 44444444444444444444 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/22.txt -
echo 23 STOP tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/23.txt -
echo 24 STOP tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/24.txt -
echo Ipv6 tcp Tests
echo 25 ADD tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/25.txt -
echo 26 ADD tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=started&compact=1" | hexdump -C | diff functional_tests/26.txt -
echo 27 ADD tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=started&no_peer_id=1&compact=0" | hexdump -C | diff functional_tests/27.txt -
echo 28 STOP tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=stopped&compact=1" | hexdump -C | diff functional_tests/28.txt -
echo 29 STOP tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=stopped&no_peer_id=1&compact=0" | hexdump -C | diff functional_tests/29.txt -
echo 30 STOP tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/30.txt -
echo Ipv6 udp Tests
echo 31 ADD udp peer 11111111111111111111 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 11111111111111111111 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/31.txt -
echo 32 ADD udp peer 22222222222222222222 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 22222222222222222222 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/32.txt -
echo 33 ADD udp peer 33333333333333333333 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 33333333333333333333 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/33.txt -
echo 34 STOP udp peer 33333333333333333333 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 33333333333333333333 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/34.txt -
echo 35 STOP udp peer 22222222222222222222 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 22222222222222222222 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/35.txt -
echo 36 STOP udp peer 11111111111111111111 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 11111111111111111111 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/36.txt -
echo Mix tests
echo 37 ADD tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/37.txt -
echo 38 ADD udp peer 22222222222222222222 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 22222222222222222222 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/38.txt -
echo 39 ADD v6 tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=started&no_peer_id=1&compact=0" | hexdump -C | diff functional_tests/39.txt -
echo 40 ADD v6 udp peer 44444444444444444444 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 44444444444444444444 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/40.txt -
echo 41 ADD tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/41.txt -
echo 42 ADD udp peer 22222222222222222222 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 22222222222222222222 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/42.txt -
echo 43 ADD v6 tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=started&no_peer_id=1&compact=0" | hexdump -C | diff functional_tests/43.txt -
echo 44 ADD v6 udp peer 44444444444444444444 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 44444444444444444444 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/44.txt -
echo 45 STOP tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/45.txt -
echo 46 STOP udp peer 22222222222222222222 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 22222222222222222222 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/46.txt -
echo 47 STOP v6 tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=stopped&no_peer_id=1&compact=0" | hexdump -C | diff functional_tests/47.txt -
echo 48 STOP v6 udp peer 44444444444444444444 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 44444444444444444444 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/48.txt -
echo Compact defailt tests
echo 49 ADD tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=started&no_peer_id=1" | hexdump -C | diff functional_tests/49.txt -
echo 50 ADD tcp peer 44444444444444444444 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=44444444444444444444&info_hash=11112222333344445555&event=started" | hexdump -C | diff functional_tests/50.txt -
echo 51 STOP v6 udp peer 44444444444444444444 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 44444444444444444444 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/51.txt -
echo 52 STOP v6 udp peer 33333333333333333333 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 3 33333333333333333333 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/52.txt -
echo Mix tests 2
echo 53 ADD tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/53.txt -
echo 54 ADD udp peer 11111111111111111111 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 11111111111111111111 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/54.txt -
echo 55 ADD v6 tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/55.txt -
echo 56 ADD v6 udp peer 22222222222222222222 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 22222222222222222222 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/56.txt -
echo 57 ADD tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/57.txt -
echo 58 ADD udp peer 22222222222222222222 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 22222222222222222222 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/58.txt -
echo 59 ADD v6 tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/59.txt -
echo 60 ADD v6 udp peer 11111111111111111111 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 11111111111111111111 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/60.txt -
echo 61 ADD tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/61.txt -
echo 62 ADD udp peer 44444444444444444444 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 44444444444444444444 11112222333344445555 11111111111111111111 11112222333344445555 | diff functional_tests/62.txt -
echo 63 ADD v6 tcp peer 55555555555555555555 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=55555555555555555555&info_hash=11112222333344445555&event=started&compact=0" | hexdump -C | diff functional_tests/63.txt -
echo 64 ADD v6 udp peer 66666666666666666666 hash 11112222333344445555 scrape 11111111111111111111 11112222333344445555
./client-udp.o 2 66666666666666666666 11112222333344445555 11111111111111111111 11112222333344445555 6 | diff functional_tests/64.txt -
echo 65 STOP tcp peer 11111111111111111111 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=11111111111111111111&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/65.txt -
echo 66 STOP tcp peer 22222222222222222222 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=22222222222222222222&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/66.txt -
echo 67 STOP tcp peer 33333333333333333333 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=33333333333333333333&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/67.txt -
echo 68 STOP tcp peer 44444444444444444444 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=44444444444444444444&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/68.txt -
echo 68-1 STOP v6 tcp peer 77777777777777777777 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=77777777777777777777&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/68-1.txt -
echo 69 STOP tcp peer 55555555555555555555 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=55555555555555555555&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/69.txt -
echo 69-1 STOP v6 tcp peer 77777777777777777777 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=77777777777777777777&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/69-1.txt -
echo 70 STOP tcp peer 66666666666666666666 hash 11112222333344445555
curl -s "http://127.0.0.1:3000/announce?port=12345&peer_id=66666666666666666666&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/70.txt -
echo 71 STOP v6 tcp peer 77777777777777777777 hash 11112222333344445555
curl -s "http://[::1]:3000/announce?port=12345&peer_id=77777777777777777777&info_hash=11112222333344445555&event=stopped&compact=0" | hexdump -C | diff functional_tests/71.txt -