Skip to content
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

Windows unittest does not pass (IXSocketTest) #11

Closed
bsergean opened this issue Jan 15, 2019 · 16 comments
Closed

Windows unittest does not pass (IXSocketTest) #11

bsergean opened this issue Jan 15, 2019 · 16 comments
Labels
help wanted Extra attention is needed

Comments

@bsergean
Copy link
Collaborator

I tried to fix that myself quite a bit but I don't have a windows box so it's a bit hard to fix. I've used appveyor to make sure that all the code builds and run on Windows though.

@bsergean bsergean added the help wanted Extra attention is needed label Jan 15, 2019
@bsergean
Copy link
Collaborator Author

@Dimon4eg / I'll write notes here about what was broken on Windows, if you are interested in fixing this.

One thing that is broken but isn't mandatory, is the Interrupt system that works with pipes, since pipe don't work the same way on Windows, and that we can't get a file descriptor that we can call 'select' on. But the interrupt system is ok for just closing the socket, as Windows will wake up from select when this happen.

The problem I had was that the most basic test (SocketTest ?) would not work.
Maybe I'd start with the ws_connect interactive program and get it to work, and have it run against a node.js or python server first.

@bsergean
Copy link
Collaborator Author

Something else that is required is to have a zlib .dll in the current folder where the executable runs, or something like that. I have one that works in the third_party folder.

@Dimon4eg
Copy link
Contributor

@bsergean why do we use zlib as dynamic and not as static lib?

@bsergean
Copy link
Collaborator Author

No good reason. The only .lib I found on the internet were just the windows stub thing that works with a dll. If we can compile zlib ourself of find an existing standalone zlib then yes for sure we should use a static lib for zlib.

@bsergean
Copy link
Collaborator Author

Note that I'm trying to make the AppVeyor Windows build to work again (a least the most basic parts). It isn't hooked to the MachineZone/IXWebSocket for permission reason (need to work this out), but it is linked to my fork (bsergean).

@Dimon4eg
Copy link
Contributor

Okay

@bsergean
Copy link
Collaborator Author

I'm having very basic problems, just running CMake. I should revert to the old python script I had ages ago which was working on Windows.

@Dimon4eg
Copy link
Contributor

What problems do you have with CMake?

@bsergean
Copy link
Collaborator Author

Here's the error. It looks like cmake isn't executed. That folder should be there also.

[vcvarsall.bat] Environment initialized for: 'x64'
python test/run.py
NMAKE :  U1052: file 'C:\projects\ixwebsocket\test\build\Windows' not found
Stop.
Running 
cmake -H.          -BC:\projects\ixwebsocket\test\build\Windows     -DCMAKE_BUILD_TYPE=Debug     -DUSE_TLS=1     -DCMAKE_EXPORT_COMPILE_COMMANDS=ON     -G"NMake Makefiles"
Unittest timed out
Running nmake -C C:\projects\ixwebsocket\test\build\Windows 
Unittest timed out
cmd nmake -C C:\projects\ixwebsocket\test\build\Windows  failed with error code 2
Traceback (most recent call last):
  File "test/run.py", line 518, in <module>
  File "test/run.py", line 514, in main
  File "test/run.py", line 377, in run
  File "test/run.py", line 85, in runCommand
AssertionError
Command exited with code 1

@bsergean
Copy link
Collaborator Author

Debugging without a physical machine is really painful / tedious btw. I should get a win box or a least a VM.

@Dimon4eg
Copy link
Contributor

I have not tried test/run.py.
Just building using CMake.

NMAKE : U1052: file 'C:\projects\ixwebsocket\test\build\Windows' not found
You have problem with folders

@bsergean
Copy link
Collaborator Author

Hey @Dimon4eg one thing you should know if you are running into problems with the windows port, is that on Windows 'socket connect' failures behaves differently, and set the exception fds in select when the connection fails.

I don't know how much sockets are working for you on Windows at this point. Also we might need a different python test script because it looks like out of tree builds don't work on Windows.

I'm curious about what is working for you on Windows. I might get a windows laptop from a co-worker and will be able to help one day hopefully.

@Dimon4eg
Copy link
Contributor

Yes, on Windows it doesn't work currently.
Currently I've no time to go deep and fix it.

@bsergean
Copy link
Collaborator Author

Ok. Same with me I'm quite busy those days. Thanks at least for getting the build to work.

@Dimon4eg
Copy link
Contributor

Dimon4eg commented May 7, 2019

Many tests pass now on Windows except these two:

  • IXWebSocketPingTimeoutTest
  • cmd_websocket_chat

@bsergean
Copy link
Collaborator Author

Closing this ticket, we can reopen 'per unittest' tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants