mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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
This commit is contained in:
parent
da09013802
commit
92e3cb2e65
3 changed files with 45 additions and 4 deletions
35
gnu/packages/patches/libmodbus-disable-networking-test.patch
Normal file
35
gnu/packages/patches/libmodbus-disable-networking-test.patch
Normal file
|
@ -0,0 +1,35 @@
|
|||
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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue