mb2hal test: switch test interface to tcp #2455
Conversation
|
Hi @hansu , thanks for working on this. I don't think this debug level tweak will work for the |
|
Oh yes you are right. I thought only the id in mb2hal's debug log is the problematic one. But that id is also shown in |
|
Reacting to #2456 (comment), I changed the interface for the test configuration to tcp instead of tty as the test host does not seem to have a tty. |
|
The two options for libmodbus are TCP and RTU (which is serial). Though the lack of a serial modbus device to talk to causes lots of errors to be printed, I don't think that's the cause of the test failures. See #2458. |
|
I still get segfaults with this branch, after just a few seconds of running this on Stretch with a vanilla kernel: Here's a typical backtrace: This is the shutdown race condition that #2458 addresses. Note that thread 2 is in Meanwhile, thread 1 is running |
But isn't the change worth reducing those error prints? |
|
Hmm, maybe... Do you know if it actually tries to send any TCP packets? It would probably not be a good idea to have the tests sending packets to whatever nearby machine has that IP address. Maybe you could set the target address to the localhost (127.0.0.1), and maybe you could even have a mock modbus device listening there. |
Yes I would say so.
Yes maybe
Would be a nice complete test, but maybe a bit overdone considering this is only one of many components... |
See #2274 (comment)