summaryrefslogtreecommitdiffstats
path: root/test/functional/util
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-21 17:04:05 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-21 17:04:05 +0000
commit6f72e868f5217c0cb7373546a1d6337d5f1494f3 (patch)
tree786f4e0c795603853e4c70ad62dae6953223be4a /test/functional/util
parentb6b05333337350a9ad9936f1443048e7bd3a56fc (diff)
downloadrspamd-6f72e868f5217c0cb7373546a1d6337d5f1494f3.tar.gz
rspamd-6f72e868f5217c0cb7373546a1d6337d5f1494f3.zip
[Test] Add tests for lua_udp
Diffstat (limited to 'test/functional/util')
-rwxr-xr-x[-rw-r--r--]test/functional/util/dummy_udp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/util/dummy_udp.py b/test/functional/util/dummy_udp.py
index 9946b50f3..4d904e3b1 100644..100755
--- a/test/functional/util/dummy_udp.py
+++ b/test/functional/util/dummy_udp.py
@@ -1,7 +1,11 @@
+#!/usr/bin/env python
+
import socket
import sys
+import dummy_killer
UDP_IP = "127.0.0.1"
+PID = "/tmp/dummy_udp.pid"
if __name__ == "__main__":
alen = len(sys.argv)
@@ -12,6 +16,7 @@ if __name__ == "__main__":
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, port))
+ dummy_killer.write_pid(PID)
while True:
data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes