projects/guix·blob python-team · refs

35 lines · 1.3 KiB

1From 4fc47d8711650a1385bea0652e522af2c85129bc Mon Sep 17 00:00:00 2001
2From: "Artyom V. Poptsov" <[email protected]>
3Date: Sun, 23 Mar 2025 09:44:34 +0300
4Subject: [PATCH] tests/unit-test-client: Disable a test requiring networking
5
6* tests/unit-test-client.c (main): Disable the test that requires networking
7as it fails with "Network is unreachable" (errno: 101) in environments where
8networking is not available (e.g. GNU Guix.) See
9<https://github.com/stephane/libmodbus/issues/802>.
10---
11 tests/unit-test-client.c | 8 --------
12 1 file changed, 8 deletions(-)
13
14diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c
15index a1813b1..58eaf5f 100644
16--- a/tests/unit-test-client.c
17+++ b/tests/unit-test-client.c
18@@ -671,14 +671,6 @@ int main(int argc, char *argv[])
19 printf("7/8 Disable byte timeout: ");
20 ASSERT_TRUE(rc == 1, "");
21
22- // Invalid in TCP or RTU mode...
23- modbus_t *invalid_ctx = modbus_new_tcp("1.2.3.4", 1502);
24- modbus_set_response_timeout(ctx, 0, 1);
25- rc = modbus_connect(invalid_ctx);
26- printf("8/8 Connection timeout: ");
27- ASSERT_TRUE(rc == -1 && errno == ETIMEDOUT, "");
28- modbus_free(invalid_ctx);
29-
30 /* Restore original response timeout */
31 modbus_set_response_timeout(ctx, old_response_to_sec, old_response_to_usec);
32
33--
342.48.1
35