[Windows] Moves nullDevicePath to Platform header#12781
[Windows] Moves nullDevicePath to Platform header#12781mattklein123 merged 11 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
include/envoy/common/platform.h
Outdated
| #define SOCKET_ERROR_INVAL WSAEINVAL | ||
| #define SOCKET_ERROR_ADDR_IN_USE WSAEADDRINUSE | ||
|
|
||
| static constexpr std::string_view platform_null_device_path{"NUL"}; |
There was a problem hiding this comment.
No need static (constexpr implies). This file is not namespaced, add namespace?
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
|
Note this issue in server_test at 197 and again at 216; I doubt there is a strong reason that fileExists() could not accept string_view |
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
I did not change the implementation because (i) all the function signatures in the |
Thanks, now I recall tripping over this same puzzle before. I agree, explicitly creating temporary std::string(s) in test/server/server_test.cc should button up this commit, LGTM. |
wrowe
left a comment
There was a problem hiding this comment.
Pending CI passing, this looks ready for merge.
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
|
Please fix format. /wait |
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
mattklein123
left a comment
There was a problem hiding this comment.
Small comment, thank you.
/wait
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
|
what is the issue with I also tried to include it with |
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
|
Can you make sure the bazel build rule for the header includes a dep on string_view? /wait |
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos sonanopo@microsoft.com
Moves
TestEnvironment::nullDevicePath()toplatform.hso it can be used in production code as well.The reason for that is that in Windows we cant have a watcher on
NUL. This causes integration tests to crash and it would also crash in prod as well.Additional Description:
Tests have been verified that they are not flaky with 100+ runs without failures.
Risk Level: Low
Testing: Already tests
Docs Changes: N/A (Windows support is not released)
Release Notes: N/A (Windows support is not released)