Debian Codegraph @

test/net.scm

raw ◀ ▶
1 Debian patch touch this file
1 ;;
2 ;; testing net
3 ;;
4
5 (use gauche.test)
6
7 (test-start "net")
8
9 (use gauche.net)
10 (test-module 'gauche.net
11 :allow-undefined '(sys-getaddrinfo <sys-addrinfo>
12 AI_PASSIVE PF_INET6))
13
14 ;;-----------------------------------------------------------------
15 (test-section "socket address")
16
17 (test* "sockaddr_un" #t
18 (let1 addr (make <sockaddr-un> :path "/tmp/xxx")
19 (and (eq? (sockaddr-family addr) 'unix)
20 (equal? (sockaddr-name addr) "/tmp/xxx")
21 #t)))
22
23 (test* "sockaddr_in" #t
24 (let1 addr (make <sockaddr-in> :host "127.0.0.1" :port 80)
25 (and (eq? (sockaddr-family addr) 'inet)
26 (equal? (sockaddr-name addr) "127.0.0.1:80")
27 (= (sockaddr-addr addr) #x7f000001)
28 (= (sockaddr-port addr) 80)
29 #t)))
30
31 (test* "sockaddr_in" #t
32 (let1 addr (make <sockaddr-in> :host "localhost" :port 23)
33 (and (eq? (sockaddr-family addr) 'inet)
34 (equal? (sockaddr-name addr) "127.0.0.1:23")
35 #t)))
36
37 (test* "sockaddr_in" #t
38 (let1 addr (make <sockaddr-in> :host #x7f000001 :port 23)
39 (and (eq? (sockaddr-family addr) 'inet)
40 (equal? (sockaddr-name addr) "127.0.0.1:23")
41 #t)))
42
43 (test* "sockaddr_in" #t
44 (let1 addr (make <sockaddr-in> :host '#u8(127 0 0 1) :port 23)
45 (and (eq? (sockaddr-family addr) 'inet)
46 (equal? (sockaddr-name addr) "127.0.0.1:23")
47 #t)))
48
49 (test* "sockaddr_in" #t
50 (let1 addr (make <sockaddr-in> :host :any :port 7777)
51 (and (eq? (sockaddr-family addr) 'inet)
52 (equal? (sockaddr-name addr) "0.0.0.0:7777")
53 #t)))
54
55 (test* "sockaddr_in" #t
56 (let1 addr (make <sockaddr-in> :host :broadcast)
57 (and (eq? (sockaddr-family addr) 'inet)
58 (equal? (sockaddr-name addr) "255.255.255.255:0")
59 #t)))
60
61 (let ([un1 (make <sockaddr-un> :path "/tmp/a")]
62 [un2 (make <sockaddr-un> :path "/tmp/aa")]
63 [un3 (make <sockaddr-un> :path "/tmp/a")]
64 [in1 (make <sockaddr-in> :host "127.0.0.1" :port 2030)]
65 [in2 (make <sockaddr-in> :host "127.0.0.2" :port 2030)]
66 [in3 (make <sockaddr-in> :host "127.0.0.1" :port 2031)]
67 [in4 (make <sockaddr-in> :host "127.0.0.1" :port 2030)])
68 (let-syntax ([t (syntax-rules ()
69 [(_ exp a b)
70 (test* (format "sockaddr equal? ~s" '(equal? a b))
71 exp (equal? a b))])])
72 (t #f un1 un2)
73 (t #t un1 un3)
74 (t #f in1 in2)
75 (t #f in1 in3)
76 (t #t in1 in4)
77 (t #f un1 in1)))
78
79 (cond-expand
80 [gauche.net.ipv6
81 (test* "sockaddr_in6" #t
82 (let1 addr (make <sockaddr-in6> :host "2001:200::8002:203:47ff:fea5:3085" :port 23)
83 (and (eq? (sockaddr-family addr) 'inet6)
84 (#/\[2001:200:0?:8002:203:47ff:fea5:3085\]:23/ (sockaddr-name addr))
85 (= (sockaddr-addr addr) #x2001020000008002020347fffea53085)
86 (= (sockaddr-port addr) 23)
87 #t)))
88 (test* "sockaddr_in6" "[::1]:0"
89 (sockaddr-name (make <sockaddr-in6> :host 1)))
90 (test* "sockaddr_in6" "[1:2:3:4:5:6:7:8]:0"
91 (sockaddr-name (make <sockaddr-in6> :host '#u8(0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8))))
92
93 (let ([4n1 (make <sockaddr-in6> :host 1 :port 80)]
94 [4n2 (make <sockaddr-in6> :host 1 :port 81)]
95 [4n3 (make <sockaddr-in6> :host "1:2::8" :port 80)]
96 [4n4 (make <sockaddr-in6> :host 1 :port 80)])
97 (let-syntax ([t (syntax-rules ()
98 [(_ exp a b)
99 (test* (format "sockaddr equal? ~s" '(equal? a b))
100 exp (equal? a b))])])
101 (t #f 4n1 4n2)
102 (t #f 4n1 4n3)
103 (t #t 4n1 4n4)))]
104 [else])
105
106 (let ()
107 (define (addr-test desc input exp-val exp-vers)
108 (let1 uvresult (make-u8vector 16 0)
109 (and exp-vers
110 (let loop ([val exp-val]
111 [dig (if (= exp-vers AF_INET) 3 15)])
112 (when (>= dig 0)
113 (u8vector-set! uvresult dig (logand val #xff))
114 (loop (ash val -8) (- dig 1)))))
115 (test* #"inet-string->address (~desc)" `(,exp-val ,exp-vers)
116 (values->list (inet-string->address input)))
117 (test* #"inet-string->address! (~desc)" `(,uvresult ,exp-vers)
118 (let* ([buf (make-u8vector 16 0)]
119 [ver (inet-string->address! input buf)])
120 (list buf ver)))))
121
122 (addr-test "v4-1" "127.0.0.1" #x7f000001 AF_INET)
123 (addr-test "v4-2" "192.168.1.2" #xc0a80102 AF_INET)
124 (addr-test "v4-3" "255.255.252.0" #xfffffc00 AF_INET)
125 ;(addr-test "v4-err1" "192.168.1" #f #f) ;; NB: this is allowed in IPv4 spec, although prohibited in inet_pton. Cygwin's inet_pton does recognize this.
126 (addr-test "v4-err2" "192.168.1.2.3" #f #f)
127 (addr-test "v4-err3" "172.256.4.2" #f #f)
128
129 (cond-expand
130 [gauche.net.ipv6
131 (addr-test "v6-1" "1:2:3:4:fffc:fffd:fffe:ffff"
132 #x0001000200030004fffcfffdfffeffff AF_INET6)
133 (addr-test "v6-2" "::1"
134 #x00000000000000000000000000000001 AF_INET6)
135 (addr-test "v6-3" "::0.1.0.2"
136 #x00000000000000000000000000010002 AF_INET6)
137 (addr-test "v6-4" "0:1:2:3:4:5:6:7"
138 #x00000001000200030004000500060007 AF_INET6)
139 (addr-test "v6-5" "ffe0::"
140 #xffe00000000000000000000000000000 AF_INET6)
141 (addr-test "v6-6" "ffe0:1::"
142 #xffe00001000000000000000000000000 AF_INET6)
143 (addr-test "v6-7" "ffe0::234:567"
144 #xffe00000000000000000000002340567 AF_INET6)
145 (addr-test "v6-8" "::192.168.1.2"
146 #x000000000000000000000000c0a80102 AF_INET6)
147 (addr-test "v6-9" "1::2:0:0:192.168.1.2"
148 #x000100000000000200000000c0a80102 AF_INET6)
149 (addr-test "v6-err1" ":1:2:3:4:5:6:7:8" #f #f)
150 (addr-test "v6-err2" "ffe0::234::567" #f #f)
151 ;; These two should be an error, but cygwin's inet_pton allows them.
152 (cond-expand
153 [(not gauche.os.cygwin)
154 (addr-test "v6-err3" "::1:2:3:4:5:6:7:8" #f #f)
155 (addr-test "v6-err4" "ffe0::234:567:" #f #f)]
156 [else])]
157 [else])
158 )
159
160 (let ()
161 (define (addr-test desc input vers expected)
162 (let* ([size (cond [(= vers AF_INET) 4] [(= vers AF_INET6) 16])]
163 [uv (make-u8vector size 0)])
164 (do ([k (- size 1) (- k 1)]
165 [val input (ash val -8)])
166 [(< k 0)]
167 (u8vector-set! uv k (logand val #xff)))
168 (test* #"inet-address->string (~desc, int)" expected
169 (inet-address->string input vers)
170 (^[xs y] (member y xs)))
171 (test* #"inet-address->string (~desc, uv)" expected
172 (inet-address->string uv vers)
173 (^[xs y] (member y xs)))))
174
175 (addr-test "v4-1" #x7f000001 AF_INET '("127.0.0.1"))
176 (addr-test "v4-2" #xc0a80102 AF_INET '("192.168.1.2"))
177 (addr-test "v4-3" #xfffffc00 AF_INET '("255.255.252.0"))
178
179 (cond-expand
180 [gauche.net.ipv6
181 (addr-test "v6-1" #x0001000200030004fffcfffdfffeffff AF_INET6
182 '("1:2:3:4:fffc:fffd:fffe:ffff"))
183 (addr-test "v6-2" #x00000000000000000000000000000001 AF_INET6
184 '("::1"))
185 (addr-test "v6-3" #x00000000000000000000000000010002 AF_INET6
186 '("::0.1.0.2" "::1:2"))
187 (addr-test "v6-4" #x00080001000200030004000500060007 AF_INET6
188 '("8:1:2:3:4:5:6:7"))
189 (addr-test "v6-5" #xffe00000000000000000000000000000 AF_INET6
190 '("ffe0::"))
191 (addr-test "v6-6" #xffe00001000000000000000000000000 AF_INET6
192 '("ffe0:1::"))
193 (addr-test "v6-7" #xffe00000000000000000000002340567 AF_INET6
194 '("ffe0::234:567"))
195 (addr-test "v6-8" #xffe00000000002230001000200030004 AF_INET6
196 '("ffe0::223:1:2:3:4"))
197 (addr-test "v6-9" #xffe00000000002230000000000030004 AF_INET6
198 '("ffe0::223:0:0:3:4"))
199 (addr-test "v6-10" #xffe00000000002230000000000000004 AF_INET6
200 '("ffe0:0:0:223::4"))
201 (addr-test "v6-11" #xffe00000000000000001000000000004 AF_INET6
202 '("ffe0::1:0:0:4"))
203 ]
204 [else])
205 )
206
207
208 ;;-----------------------------------------------------------------
209 (test-section "netdb")
210
211 (test* "gethostbyname" #t
212 (let1 host (sys-gethostbyname "localhost")
213 (and host
214 (or (equal? (slot-ref host 'name) "localhost")
215 (member "localhost" (slot-ref host 'aliases))
216 ;; cygwin and mingw usually doesn't define "localhost", and
217 ;; returns hostname.
218 (cond-expand
219 [(or gauche.os.cygwin gauche.os.windows) #t]
220 [else #f]))
221 (member "127.0.0.1" (slot-ref host 'addresses))
222 #t)))
223
224 (test* "gethostbyaddr" #t
225 (let1 host (sys-gethostbyaddr "127.0.0.1" AF_INET)
226 (and host
227 (or (equal? (slot-ref host 'name) "localhost")
228 (member "localhost" (slot-ref host 'aliases))
229 ;; cygwin and mingw usually doesn't define "localhost", and
230 ;; returns hostname. For now we skip this test.
231 (cond-expand
232 [(or gauche.os.cygwin gauche.os.windows) #t]
233 [else #f]))
234 (member "127.0.0.1" (slot-ref host 'addresses))
235 #t)))
236
237 (test* "getprotobyname" '(("icmp" 1) ("tcp" 6) ("udp" 17))
238 (let ([tcp (sys-getprotobyname "tcp")]
239 [udp (sys-getprotobyname "udp")]
240 [icmp (sys-getprotobyname "icmp")])
241 (map (^[proto] (list (slot-ref proto 'name)
242 (slot-ref proto 'proto)))
243 (list icmp tcp udp))))
244
245 (test* "getprotobynumber" '(#t #t #t)
246 (map (^[proto name] (or (member name (slot-ref proto 'aliases))
247 (equal? name (slot-ref proto 'name))))
248 (map sys-getprotobynumber '(1 6 17))
249 '("icmp" "tcp" "udp")))
250
251 (test* "getservbyname" '(("telnet" 23 "tcp") ("ftp" 21 "tcp"))
252 (map (^[name proto]
253 (let1 x (sys-getservbyname name proto)
254 (and x (map (^s (slot-ref x s)) '(name port proto)))))
255 '("telnet" "ftp")
256 '("tcp" "tcp")))
257
258 (test* "getservbyport" '(("telnet" 23 "tcp") ("ftp" 21 "tcp"))
259 (map (^[port proto]
260 (let1 x (sys-getservbyport port proto)
261 (and x (map (^s (slot-ref x s)) '(name port proto)))))
262 '(23 21)
263 '("tcp" "tcp")))
264
265 ;;-----------------------------------------------------------------
266 (test-section "Packet utility")
267
268 ;; checksum example taken from RFC1071
269 (test* "inet-checksum" (logand (lognot #xddf2) #xffff)
270 (inet-checksum '#u8(#x00 #x01 #xf2 #x03 #xf4 #xf5 #xf6 #xf7) 8))
271 (test* "inet-checksum" (logand (lognot #xf201) #xffff)
272 (inet-checksum '#u8(#x00 #x01 #xf2) 3))
273
274 ;;-----------------------------------------------------------------
275 (test-section "socket")
276
277 ;; Increase this to test robustness for big packets. However,
278 ;; the current tests assuming one whole packet should be sent before
279 ;; reading it from the peer; otherwise it'll hang.
280 (define *chunk-size* 1024)
281
282 ;; port number to test inet socket connection. Gauche needs some
283 ;; mechanism to check if the port is in use or not.
284 (define *inet-port* 6726)
285
286 (sys-unlink "sock.o") ; unix socket
287
288 (cond-expand
289 [gauche.os.windows #f]
290 [else
291 (define server-sock #f)
292 (define accept-sock #f)
293
294 (define (do-accept)
295 (set! accept-sock (socket-accept server-sock)))
296
297 (define (do-echo close?)
298 (let1 line (read-line (socket-input-port accept-sock))
299 (format (socket-output-port accept-sock)
300 "GOT:~a\n" line)
301 (flush (socket-output-port accept-sock)))
302 (when close?
303 (socket-shutdown accept-sock SHUT_RDWR)
304 (socket-close accept-sock)))
305
306 (test* "unix server socket" #f
307 (begin
308 (set! server-sock (make-server-socket 'unix "sock.o"))
309 (let1 stat (sys-stat "sock.o")
310 (not (memq (sys-stat->file-type stat) '(socket fifo))))))
311
312 (test* "unix client socket" '("GOT:abc" "GOT:xyz")
313 (call-with-client-socket (make-client-socket 'unix "sock.o")
314 (^[in out]
315 (do-accept)
316 (display "abc\n" out) (flush out)
317 (do-echo #f)
318 (let1 abc (read-line in)
319 (display "xyz\n" out) (flush out)
320 (do-echo #t)
321 (list abc (read-line in))))))
322
323 (test* "unix client socket" #t
324 (call-with-client-socket (make-client-socket 'unix "sock.o")
325 (^[in out]
326 (do-accept)
327 (display (make-string *chunk-size* #\a) out)
328 (newline out)
329 (flush out)
330 (do-echo #t)
331 (string=? (read-line in)
332 (string-append "GOT:" (make-string *chunk-size* #\a))))))
333
334 (test* "unix client socket" #t
335 (call-with-client-socket
336 (make-client-socket (make <sockaddr-un> :path "sock.o"))
337 (^[in out]
338 (do-accept)
339 (display (make-string *chunk-size* #\a) out)
340 (newline out)
341 (flush out)
342 (do-echo #t)
343 (string=? (read-line in)
344 (string-append "GOT:"(make-string *chunk-size* #\a))))))
345
346 (socket-close server-sock)
347 ])
348
349 (sys-unlink "sock.o")
350
351 ;; We may have more than one server socket (e.g. one for v4 and one for v6)
352 (let ([server-socks #f]
353 [accept-sock #f])
354
355 (define (do-accept)
356 (let ([rfds (list->sys-fdset (map socket-fd server-socks))])
357 (receive (nfds rs ws xs) (sys-select rfds #f #f)
358 (set! accept-sock
359 (socket-accept (find (^s (sys-fdset-ref rs (socket-fd s)))
360 server-socks))))))
361
362 (define (do-echo close?)
363 (let1 line (read-line (socket-input-port accept-sock))
364 (format (socket-output-port accept-sock)
365 "GOT:~a\n" line)
366 (flush (socket-output-port accept-sock)))
367 (when close?
368 (socket-shutdown accept-sock SHUT_RDWR)
369 (socket-close accept-sock)))
370
371 (test* "inet server socket" #t
372 (begin
373 (set! server-socks
•374 (make-server-sockets "localhost" *inet-port* :reuse-addr? #t))
375 (length>=? server-socks 1)))
376
377 (test* "inet client socket" '("GOT:abc" "GOT:xyz")
378 (call-with-client-socket (make-client-socket 'inet
379 "localhost" *inet-port*)
380 (^[in out]
381 (do-accept)
382 (display "abc\n" out) (flush out)
383 (do-echo #f)
384 (let1 abc (read-line in)
385 (display "xyz\n" out) (flush out)
386 (do-echo #t)
387 (list abc (read-line in))))))
388
389 (test* "inet client socket (host,port)" #t
390 (call-with-client-socket (make-client-socket "localhost" *inet-port*)
391 (^[in out]
392 (do-accept)
393 (display (make-string *chunk-size* #\a) out)
394 (newline out)
395 (flush out)
396 (do-echo #t)
397 (string=? (read-line in)
398 (string-append "GOT:" (make-string *chunk-size* #\a))))))
399
400 (test* "inet client socket (sockaddr)" #t
401 (call-with-client-socket (make-client-socket
402 (make <sockaddr-in>
403 :host "localhost" :port *inet-port*))
404 (^[in out]
405 (do-accept)
406 (display (make-string *chunk-size* #\a) out)
407 (newline out)
408 (flush out)
409 (do-echo #t)
410 (string=? (read-line in)
411 (string-append "GOT:" (make-string *chunk-size* #\a))))))
412
413 (for-each socket-close server-socks)
414 )
415
416 (cond-expand
417 [gauche.net.ipv6
418 (let ([server-sock (guard [e (else #f)]
419 (make-server-socket (make <sockaddr-in6>
420 :host :any :port *inet-port*)
421 :reuse-addr? #t))]
422 [accept-sock #f])
423
424 ;; On IPv6 system, the loopback may have different name than "localhost".
425 ;; We apply some heuristics here.
426 (define (get-ipv6-sock)
427 (any (^[name]
428 (guard (e [else #f])
429 (make-client-socket
430 (make <sockaddr-in6> :host name :port *inet-port*))))
431 '("localhost" "ip6-localhost" "ipv6-localhost" "::1")))
432
433 (define (do-accept)
434 (set! accept-sock (socket-accept server-sock)))
435
436 (define (do-echo close?)
437 (let1 line (read-line (socket-input-port accept-sock))
438 (format (socket-output-port accept-sock)
439 "GOT:~a\n" line)
440 (flush (socket-output-port accept-sock)))
441 (when close?
442 (socket-shutdown accept-sock SHUT_RDWR)
443 (socket-close accept-sock)))
444
445 ;; ipv6 may be turned off by runtime flag. we skip in that case.
446 (when server-sock
447 (test* "inet client socket (ipv6)" #t
448 (if-let1 sock (get-ipv6-sock)
449 (call-with-client-socket sock
450 (^[in out]
451 (do-accept)
452 (display (make-string *chunk-size* #\a) out)
453 (newline out)
454 (flush out)
455 (do-echo #t)
456 (string=? (read-line in)
457 (string-append "GOT:"
458 (make-string *chunk-size* #\a)))))
459 #t)) ;; ipv6 not available
460 (socket-shutdown server-sock)
461 (socket-close server-sock)))
462 ]
463 [else])
464
465 (test* "socket w/ port error handling" (test-error)
466 (let1 s (make-client-socket 'inet "localhost" *inet-port*)
467 (close-socket s)
468 (socket-input-port s)))
469
470 (test* "socket w/ port error handling" (test-error)
471 (let1 s (make-client-socket 'inet "localhost" *inet-port*)
472 (close-socket s)
473 (socket-output-port s)))
474
475 (test* "getsockname/getpeername" #t
476 (let* ([addr (make <sockaddr-in> :host :loopback :port 0)]
477 [serv (make-server-socket addr :reuse-addr? #t)]
478 [clnt (make-client-socket
479 (make <sockaddr-in>
480 :host :loopback
481 :port (sockaddr-port (socket-address serv))))])
482 (begin0 (every (^[addr]
483 (and (= (sockaddr-addr addr) #x7f000001)
484 (= (sockaddr-port addr)
485 (sockaddr-port (socket-address serv)))))
486 (list (socket-getsockname serv)
487 (socket-getpeername clnt)))
488 (socket-close clnt)
489 (socket-close serv))))
490
491
492 ;; UDP
493
494 (let ([server-sock (make-socket PF_INET SOCK_DGRAM)]
495 [server-addr (make <sockaddr-in> :host :any :port *inet-port*)])
496
497 (socket-setsockopt server-sock SOL_SOCKET SO_REUSEADDR 1)
498 (socket-bind server-sock server-addr)
499
500 (test* "udp client socket" "GOT:abc"
501 (let ([sock (make-socket PF_INET SOCK_DGRAM)]
502 [addr (make <sockaddr-in> :host :loopback :port *inet-port*)])
503 (socket-connect sock addr)
504 (socket-send sock "abc")
505 (receive (msg from) (socket-recvfrom server-sock 1024)
506 (socket-sendto server-sock (string-append "GOT:" msg) from))
507 (begin0 (string-incomplete->complete (socket-recv sock 1024))
508 (socket-close sock)
509 (socket-close server-sock))))
510 )
511
512 (define (with-sr-udp proc)
513 (let ([s-sock (make-socket PF_INET SOCK_DGRAM)]
514 [r-sock (make-socket PF_INET SOCK_DGRAM)]
515 [s-addr (make <sockaddr-in> :host :loopback :port *inet-port*)]
516 [r-addr (make <sockaddr-in> :host :any :port *inet-port*)])
517 (socket-setsockopt r-sock SOL_SOCKET SO_REUSEADDR 1)
518 (socket-bind r-sock r-addr)
519 (unwind-protect
520 (proc s-sock s-addr r-sock r-addr)
521 (begin (socket-close r-sock)
522 (socket-close s-sock)))))
523
524 (with-sr-udp
525 (^[s-sock s-addr r-sock r-addr]
526 (let ([from (make <sockaddr-in>)]
527 [data (make-u8vector 1024 #x3c)]
528 [buf (make-u8vector 1024 #xa5)])
529 (test* "udp uvector API" '(#t #t)
530 (begin
531 (socket-sendto s-sock data s-addr)
532 (receive (size f-addr) (socket-recvfrom! r-sock buf (list from))
533 (list (eq? f-addr from)
534 (equal? buf data))))))))
535
536 (cond-expand
537 [gauche.os.windows
538 ;; buildmsg is not supported on MinGW
539 ]
540 [else
541 (with-sr-udp
542 (^[s-sock s-addr r-sock r-addr]
543 (let* ([from (make <sockaddr-in>)]
544 [s-data (make-string 255 #\a)]
545 [v-data (make-u8vector 255 48)]
546 [data `#(,s-data ,v-data)]
547 [sbuf (make-u8vector 1024)]
548 [rbuf (make-u8vector 1024 0)])
549
550 (define (xtest sbuf)
551 (socket-sendmsg s-sock (socket-buildmsg s-addr data '() 0 sbuf))
552 (receive (size f-addr) (socket-recvfrom! r-sock rbuf (list from))
553 (list (eq? f-addr from)
554 (let1 expect (make-u8vector (+ (string-length s-data)
555 (uvector-length v-data)))
556 (dotimes [n (string-length s-data)]
557 (u8vector-set! expect n (char->integer (string-ref s-data n))))
558 (dotimes [n (uvector-length v-data)]
559 (u8vector-set! expect (+ n (string-length s-data))
560 (u8vector-ref v-data n)))
561 (every (^i (= (u8vector-ref rbuf i)
562 (u8vector-ref expect i)))
563 (iota size))))))
564
565 (test* "udp sendmsg w/sendbuf" '(#t #t) (xtest sbuf))
566 (test* "udp sendmsg w/o sendbuf" '(#t #t) (xtest #f)))))
567 ])
568
569 ;;-----------------------------------------------------------------------
570 ;; SRFI-106
571 (test-section "SRFI-106")
572 (use srfi.106)
573 (test-module 'srfi.106)
574
575 (test-end)