Skip to content

Commit decee67

Browse files
committed
Use random port in crl test
1 parent 67d6d43 commit decee67

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

testsuite/testsuite.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,21 +277,24 @@ static int test_crl_monitor(void)
277277
char buf[128];
278278
char tmpDir[16];
279279
char rounds[4];
280+
char portNum[8];
280281
const char* serverArgv[] = {
281282
"testsuite",
282283
"-A", "certs/ca-cert.pem",
283284
"--crl-dir", tmpDir,
284285
"-C", rounds,
285286
"--quieter",
286-
"-x"
287+
"-x",
288+
"-p", "0"
287289
};
288290
const char* clientArgv[] = {
289291
"testsuite",
290292
"-C",
291293
"-c", "certs/server-cert.pem",
292294
"-k", "certs/server-key.pem",
293295
"--quieter",
294-
"-H", "exitWithRet"
296+
"-H", "exitWithRet",
297+
"-p", portNum
295298
};
296299
int ret = -1;
297300
int i = -1, j;
@@ -318,6 +321,7 @@ static int test_crl_monitor(void)
318321
InitTcpReady(&ready);
319322
start_thread(server_test, &server_args, &serverThread);
320323
wait_tcp_ready(&server_args);
324+
sprintf(portNum, "%d", server_args.signal->port);
321325

322326
for (i = 0; i < CRL_MONITOR_TEST_ROUNDS; i++) {
323327
int expectFail;

0 commit comments

Comments
 (0)