1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-14 02:50:45 +02:00
guix/gnu/packages/patches/libmodbus-disable-networking-test.patch
Artyom V. Poptsov 92e3cb2e65
gnu: libmodbus: Update to 3.1.11.
* gnu/packages/engineering.scm (libmodbus): Update to 3.1.11.  Add a missing
newline after the package definition.
[source]: Add a patch which disables a test that requires networking.
* gnu/packages/patches/libmodbus-disable-networking-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: I657c0aac3435ec20da6e15d31484effdb7c2dc0b
2025-03-23 10:02:13 +03:00

35 lines
1.3 KiB
Diff

From 4fc47d8711650a1385bea0652e522af2c85129bc Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sun, 23 Mar 2025 09:44:34 +0300
Subject: [PATCH] tests/unit-test-client: Disable a test requiring networking
* tests/unit-test-client.c (main): Disable the test that requires networking
as it fails with "Network is unreachable" (errno: 101) in environments where
networking is not available (e.g. GNU Guix.) See
<https://github.com/stephane/libmodbus/issues/802>.
---
tests/unit-test-client.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/tests/unit-test-client.c b/tests/unit-test-client.c
index a1813b1..58eaf5f 100644
--- a/tests/unit-test-client.c
+++ b/tests/unit-test-client.c
@@ -671,14 +671,6 @@ int main(int argc, char *argv[])
printf("7/8 Disable byte timeout: ");
ASSERT_TRUE(rc == 1, "");
- // 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);
-
/* Restore original response timeout */
modbus_set_response_timeout(ctx, old_response_to_sec, old_response_to_usec);
--
2.48.1