-
Notifications
You must be signed in to change notification settings - Fork 257
Adding a new network header with associated unit tests #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a new network header with associated unit tests #506
Conversation
@dunhor FYI: I started over with a new topic branch --> new PR. And now I'm no longer getting clang-format problems, and the winrt COM tests are passing :) |
Sorry for the delayed response; been busy with a bunch of other things at the moment. Regarding clang-format, I took a brief look at your other PR and it looks like you ran clang-format on all files & committed the result. This can have some unintended side effects because different versions of clang-format will format code differently. It's a little unfortunate, but it's not something we have much control over. To help alleviate pains here, we do two things. First, we prefer to use the version of clang-format that ships with Visual Studio for consistency across developers. The second is that the CI machines leverage Regarding the COM tests, it's been failing for a while, but typically passes after one (or two) re-runs. It's on my TODO list for when I get the time to dig into it. Hopefully this can be fixed with something as simple as a detour to make it more deterministic. |
Thanks for the explanation! Yes, this time I just did a git clang-format for edited files. |
@dunhor : well, those COM tests decided to start failing after I clang-formatted network.h. :( Any thoughts on how to move this PR forward? can I just force that test to try again? |
I think you should disable them to unblock yourself. Those tests have been far more trouble than they are worth. The original com_timeout PR had me spend about 5-10x as long writing the tests as I did the non-test code. And despite that they still aren't reliable enough. The code they are testing is relatively small and has already been validated so I think that would be ok. Also, I'm unsure if it is interesting that the two failures are x64+Release. x86 isn't failing; Debug is not failing. |
Thanks! |
Looks like clang no longer wants to compile this: FAILED: tests/app/CMakeFiles/witest.app.dir/__/FileSystemTests.cpp.obj |
I think it's related to this: The warning -Wdeprecated-literal-operator is now on by default, as this is something that WG21 has shown interest in removing from the language. The result is that anyone who is compiling with -Werror should see this diagnostic. To fix this diagnostic, simply removing the space character from between the operator"" and the user defined literal name will make the source no longer deprecated. This is consistent with CWG2521 https://cplusplus.github.io/CWG/issues/2521.html_. |
Yep - that should be it. |
And we get another clang compiler issue: FAILED: tests/app/CMakeFiles/witest.app.dir/__/ResourceTests.cpp.obj |
This apparently is also in the clang release notes: Modified Compiler Flags The -fveclib option has been updated to enable -fno-math-errno for -fveclib=ArmPL and -fveclib=SLEEF. This gives Clang more opportunities to utilize these vector libraries. The behavior for all other vector function libraries remains unchanged. The -Wnontrivial-memcall warning has been added to warn about passing non-trivially-copyable destination parameter to memcpy, memset and similar functions for which it is a documented undefined behavior. It is implied by -Wnontrivial-memaccess |
…r warning nontrivial-memcall.
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Yay, it worked |
/AzurePipelines run |
Commenter does not have sufficient privileges for PR 506 in repo microsoft/wil |
@dunhor : can you run this command to kick off the CI pipeline? I tried and it said, "Commenter does not have sufficient privileges for PR 506 in repo microsoft/wil" |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Thanks Jon. FYI - I'm seriously contemplating moving to GitHub actions so we don't have this commenting requirement (for however long that lasts) |
Thanks guys. Turns out "git add *" + git clang-format --style file" didn't format these files. "scripts\format-changes.cmd upstream/master" didn't format these files. But scripts\run-clang-format.cmd seems to have formatted them. Would you mind restarting the CI pipeline? All other stages looked to have succeeded. |
If I ever get my act together with CMake, we can add a target that is "format check on every build." "Coming soon" |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There should be a comment in the main readme regarding this. The TL;DR is that different versions of That said, as long as you've formatted the code, that's all we really care about. If the CI fails because of inconsistent versions of As an aside, one thing I've been wanting to do is throw something like a As a super aside, it's been on my wishlist for a while to add a command we can run that will format the code and commit the result. I just haven't had the time to look into it yet. |
…'tor to declaratively follow the rule-of-5
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run [edit: heh, I tried] |
Commenter does not have sufficient privileges for PR 506 in repo microsoft/wil |
Command 'run
[edit:' is not supported by Azure Pipelines.
See additional documentation. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Adding a new network header with associated unit tests.