(test-assert "luanti server is responding on configured port"
(marionette-eval
'(begin
(use-modules (gnu services herd)
(ice-9 match)
(rnrs bytevectors)
(rnrs bytevectors gnu))
(define sock (socket PF_INET SOCK_DGRAM 0))
(define addr (make-socket-address AF_INET INADDR_LOOPBACK
30000 ))
(define probe #vu8(#x4f #x45 #x74 #x03 #x00 #x00 #x00 #x01))
(define buf (make-bytevector 1000))
(sendto sock probe addr)
(match (select (list sock) '() '() 2) (((sock) _ _)
(pk 'ready)
(match (recvfrom! sock buf)
((byte-count . _)
(and (>= byte-count 15)
(pk 'peer-id (bytevector-slice buf 12 2))))))))
marionette))