diff options
author | AlexSm <alex@ydb.tech> | 2024-01-18 11:28:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 11:28:56 +0100 |
commit | 9d0a3761b3201e0d9db879a7adf91876ebdb0564 (patch) | |
tree | 541d11ac878c18efd7ebca81e35112aa0fef995b /util/network/socket_ut.cpp | |
parent | 404ef8886ecc9736bc58ade6da2fbd83b486a408 (diff) | |
download | ydb-9d0a3761b3201e0d9db879a7adf91876ebdb0564.tar.gz |
Library import 8 (#1074)
* Library import 8
* Add contrib/libs/cxxsupp/libcxx/include/__verbose_abort
Diffstat (limited to 'util/network/socket_ut.cpp')
-rw-r--r-- | util/network/socket_ut.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/util/network/socket_ut.cpp b/util/network/socket_ut.cpp index 4ae8f7d41e..b49ca639cc 100644 --- a/util/network/socket_ut.cpp +++ b/util/network/socket_ut.cpp @@ -25,7 +25,6 @@ class TSockTest: public TTestBase { UNIT_TEST(TestNetworkResolutionErrorMessage); UNIT_TEST(TestBrokenPipe); UNIT_TEST(TestClose); - UNIT_TEST(TestReusePortAvailCheck); UNIT_TEST_SUITE_END(); public: @@ -36,7 +35,6 @@ public: void TestNetworkResolutionErrorMessage(); void TestBrokenPipe(); void TestClose(); - void TestReusePortAvailCheck(); }; UNIT_TEST_SUITE_REGISTRATION(TSockTest); @@ -185,33 +183,6 @@ void TSockTest::TestClose() { UNIT_ASSERT_EQUAL(static_cast<SOCKET>(receiver), INVALID_SOCKET); } -void TSockTest::TestReusePortAvailCheck() { -#if defined _linux_ - utsname sysInfo; - Y_ABORT_UNLESS(!uname(&sysInfo), "Error while call uname: %s", LastSystemErrorText()); - TStringBuf release(sysInfo.release); - release = release.substr(0, release.find_first_not_of(".0123456789")); - int v1 = FromString<int>(release.NextTok('.')); - int v2 = FromString<int>(release.NextTok('.')); - int v3 = FromString<int>(release.NextTok('.')); - int linuxVersionCode = KERNEL_VERSION(v1, v2, v3); - if (linuxVersionCode >= KERNEL_VERSION(3, 9, 1)) { - // new kernels support SO_REUSEPORT - UNIT_ASSERT(true == IsReusePortAvailable()); - UNIT_ASSERT(true == IsReusePortAvailable()); - } else { - // older kernels may or may not support SO_REUSEPORT - // just check that it doesn't crash or throw - (void)IsReusePortAvailable(); - (void)IsReusePortAvailable(); - } -#else - // check that it doesn't crash or throw - (void)IsReusePortAvailable(); - (void)IsReusePortAvailable(); -#endif -} - class TPollTest: public TTestBase { UNIT_TEST_SUITE(TPollTest); UNIT_TEST(TestPollInOut); |