The change that was introduced in 6ae4a76 leads to test errors in environments where networking is not available (e.g. in GNU Guix build environment):
// Invalid in TCP or RTU mode...
modbus_t *invalid_ctx = modbus_new_tcp("1.2.3.4", 1502);
modbus_set_response_timeout(ctx, 0, 1);
rc = modbus_connect(invalid_ctx);
printf("8/8 Connection timeout: ");
ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, "");
modbus_free(invalid_ctx);
Assertion fails due to errno being equal to 101 (ENETUNREACH) instead of 110 (ETIMEDOUT)
Currently I solved this problem by removing the code I mentioned above with a patch, but maybe we should add an option that disables such tests?
The change that was introduced in 6ae4a76 leads to test errors in environments where networking is not available (e.g. in GNU Guix build environment):
Assertion fails due to
errnobeing equal to 101 (ENETUNREACH) instead of 110 (ETIMEDOUT)Currently I solved this problem by removing the code I mentioned above with a patch, but maybe we should add an option that disables such tests?