]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-program-client unit test: Let OS assign the listener port
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 10 Apr 2017 08:51:51 +0000 (11:51 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 10 Apr 2017 08:51:51 +0000 (11:51 +0300)
src/lib-program-client/test-program-client-net.c

index 7b21619e85b6ae208069265ae312c3a28804af1a..893e4ee988652311f1a2c600c60aa448a6b24475 100644 (file)
@@ -261,7 +261,7 @@ void test_program_setup(void) {
 
        /* create listener */
        struct ip_addr ip;
-       test_globals.port = rand() % 64510 + 1024;
+       test_globals.port = 0;
        test_assert(net_addr2ip("127.0.0.1", &ip) == 0);
 
        test_globals.listen_fd = net_listen(&ip, &test_globals.port, 1);