From a6c2a0e087160f23b0df2f0cd2d9d310da1a9c2b Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Fri, 2 Aug 2024 09:00:33 -0700 Subject: [PATCH 1/2] make port more random --- tests/socket_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/socket_test.c b/tests/socket_test.c index f08c89689..8f438fc35 100644 --- a/tests/socket_test.c +++ b/tests/socket_test.c @@ -460,7 +460,7 @@ static int s_test_socket_with_bind_to_interface(struct aws_allocator *allocator, options.domain = AWS_SOCKET_IPV4; ASSERT_SUCCESS(s_test_socket(allocator, &options, &endpoint)); - struct aws_socket_endpoint endpoint_ipv6 = {.address = "::1", .port = 1024}; + struct aws_socket_endpoint endpoint_ipv6 = {.address = "::1", .port = 8128}; options.type = AWS_SOCKET_STREAM; options.domain = AWS_SOCKET_IPV6; if (s_test_socket(allocator, &options, &endpoint_ipv6)) { From e95b4da0886cb7a9f8f1859975da0d583b5b8e5d Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Fri, 2 Aug 2024 15:31:37 -0700 Subject: [PATCH 2/2] fix the previous port as well --- tests/socket_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/socket_test.c b/tests/socket_test.c index 8f438fc35..ecc47c2b2 100644 --- a/tests/socket_test.c +++ b/tests/socket_test.c @@ -447,7 +447,7 @@ static int s_test_socket_with_bind_to_interface(struct aws_allocator *allocator, #else strncpy(options.network_interface_name, "lo", AWS_NETWORK_INTERFACE_NAME_MAX); #endif - struct aws_socket_endpoint endpoint = {.address = "127.0.0.1", .port = 8127}; + struct aws_socket_endpoint endpoint = {.address = "127.0.0.1", .port = 8128}; if (s_test_socket(allocator, &options, &endpoint)) { #if !defined(AWS_OS_APPLE) && !defined(AWS_OS_LINUX) if (aws_last_error() == AWS_ERROR_PLATFORM_NOT_SUPPORTED) { @@ -460,7 +460,7 @@ static int s_test_socket_with_bind_to_interface(struct aws_allocator *allocator, options.domain = AWS_SOCKET_IPV4; ASSERT_SUCCESS(s_test_socket(allocator, &options, &endpoint)); - struct aws_socket_endpoint endpoint_ipv6 = {.address = "::1", .port = 8128}; + struct aws_socket_endpoint endpoint_ipv6 = {.address = "::1", .port = 8129}; options.type = AWS_SOCKET_STREAM; options.domain = AWS_SOCKET_IPV6; if (s_test_socket(allocator, &options, &endpoint_ipv6)) {