[CRIU] [PATCH] zdtm: Use unique port numbers

Cyrill Gorcunov gorcunov at openvz.org
Mon Aug 5 03:01:56 EDT 2013


While in criu we run tests one by one I need
unique port numbers which would not conflict
if tests are started simultaneously (for openvz
to criu converter tests).

Thus make ports being unique.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 test/zdtm/live/static/socket-tcpbuf.c | 2 +-
 test/zdtm/live/static/socket6_udp.c   | 2 +-
 test/zdtm/live/static/socket_aio.c    | 2 +-
 test/zdtm/live/static/socket_listen.c | 2 +-
 test/zdtm/live/static/socket_udp.c    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/zdtm/live/static/socket-tcpbuf.c b/test/zdtm/live/static/socket-tcpbuf.c
index c2f7c43..68c371a 100644
--- a/test/zdtm/live/static/socket-tcpbuf.c
+++ b/test/zdtm/live/static/socket-tcpbuf.c
@@ -20,7 +20,7 @@ const char *test_author = "Andrey Vagin <avagin at parallels.com";
 #include <sys/socket.h>
 #include <netinet/tcp.h>
 
-static int port = 8880;
+static int port = 8881;
 
 #define BUF_SIZE 4096
 #define TCP_MAX_BUF (100 << 20)
diff --git a/test/zdtm/live/static/socket6_udp.c b/test/zdtm/live/static/socket6_udp.c
index c9fd2fa..f8fdb7a 100644
--- a/test/zdtm/live/static/socket6_udp.c
+++ b/test/zdtm/live/static/socket6_udp.c
@@ -15,7 +15,7 @@ const char *test_author = "Cyrill Gorcunov <gorcunov at openvz.org>\n";
 #include <arpa/inet.h>  /* for sockaddr_in and inet_ntoa() */
 #include <wait.h>
 
-static int port = 8880;
+static int port = 8882;
 static char buf[64];
 
 #define MSG1 "msg1"
diff --git a/test/zdtm/live/static/socket_aio.c b/test/zdtm/live/static/socket_aio.c
index b7925f2..bec9e15 100644
--- a/test/zdtm/live/static/socket_aio.c
+++ b/test/zdtm/live/static/socket_aio.c
@@ -19,7 +19,7 @@ const char *test_author = "Andrew Vagin <avagin at parallels.com>";
 #include <wait.h>
 #include <netinet/tcp.h>
 
-static int port = 8880;
+static int port = 8883;
 
 #define BUF_SIZE 1024
 
diff --git a/test/zdtm/live/static/socket_listen.c b/test/zdtm/live/static/socket_listen.c
index 6aef4a6..72bc77e 100644
--- a/test/zdtm/live/static/socket_listen.c
+++ b/test/zdtm/live/static/socket_listen.c
@@ -22,7 +22,7 @@ const char *test_author = "Stanislav Kinsbursky <skinsbursky at openvz.org>";
 #include <wait.h>
 #include <netinet/tcp.h>
 
-static int port = 8880;
+static int port = 8884;
 
 #define BUF_SIZE 1024
 
diff --git a/test/zdtm/live/static/socket_udp.c b/test/zdtm/live/static/socket_udp.c
index 4694fce..2671df1 100644
--- a/test/zdtm/live/static/socket_udp.c
+++ b/test/zdtm/live/static/socket_udp.c
@@ -20,7 +20,7 @@ const char *test_author = "Pavel Emelyanov <xemul at parallels.com<>\n";
 #include <arpa/inet.h>  /* for sockaddr_in and inet_ntoa() */
 #include <wait.h>
 
-static int port = 8880;
+static int port = 8885;
 static char buf[8];
 
 #define MSG1 "msg1"
-- 
1.8.1.4



More information about the CRIU mailing list