From 5ead4e1e69c87806dbb4db5cab4ef75fa727a5eb Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Tue, 23 Jun 2020 00:27:03 +0300 Subject: [PATCH] ntoskrnl/tests: Use the same sin port as ws2_32 tests. Signed-off-by: Paul Gofman Signed-off-by: Alexandre Julliard --- dlls/ntoskrnl.exe/tests/driver.h | 2 ++ dlls/ntoskrnl.exe/tests/driver4.c | 2 +- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/ntoskrnl.exe/tests/driver.h b/dlls/ntoskrnl.exe/tests/driver.h index 4b70046b8e2..3bfc4bd80ac 100644 --- a/dlls/ntoskrnl.exe/tests/driver.h +++ b/dlls/ntoskrnl.exe/tests/driver.h @@ -55,3 +55,5 @@ static inline char *drv_strrchr( const char *str, char ch ) do { if (*str == ch) ret = (char *)(ULONG_PTR)str; } while (*str++); return ret; } + +#define SERVER_LISTEN_PORT 9374 diff --git a/dlls/ntoskrnl.exe/tests/driver4.c b/dlls/ntoskrnl.exe/tests/driver4.c index fedd5f25c2c..e11879e9e5b 100644 --- a/dlls/ntoskrnl.exe/tests/driver4.c +++ b/dlls/ntoskrnl.exe/tests/driver4.c @@ -243,7 +243,7 @@ static void test_wsk_listen_socket(void) memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; - addr.sin_port = htons(12345); + addr.sin_port = htons(SERVER_LISTEN_PORT); IoReuseIrp(wsk_irp, STATUS_UNSUCCESSFUL); IoSetCompletionRoutine(wsk_irp, irp_completion_routine, &irp_complete_event, TRUE, TRUE, TRUE); diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index c53f97e9d19..5555095bd22 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -532,7 +532,7 @@ static DWORD WINAPI wsk_test_thread(void *parameter) memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; - addr.sin_port = htons(12345); + addr.sin_port = htons(SERVER_LISTEN_PORT); addr.sin_addr.s_addr = htonl(0x7f000001); ret = connect(s, (struct sockaddr *)&addr, sizeof(addr));