GNU bug report logs - #64711
[PATCH 00/45] Fix builds and skip failing tests for the Hurd.

Previous Next

Package: guix-patches;

Reported by: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Date: Tue, 18 Jul 2023 14:39:02 UTC

Severity: normal

Tags: patch

Done: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #224 received at 64711 <at> debbugs.gnu.org (full text, mbox):

From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Raghav Gururajan <rg <at> raghavgururajan.name>, ludo <at> gnu.org,
 64711 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: Re: [bug#64711] [PATCH 37/43] gnu: glib: Disable tests for the Hurd.
Date: Thu, 20 Jul 2023 10:19:43 +0200
[Message part 1 (text/plain, inline)]
Maxim Cournoyer writes:

Hello!

> Janneke Nieuwenhuizen <janneke <at> gnu.org> writes:
>
>> Liliana Marie Prikler writes:
>>
>>> Am Dienstag, dem 18.07.2023 um 16:40 +0200 schrieb Janneke
>>> Nieuwenhuizen:
>>>> * gnu/packages/glib.scm (glib)[arguments]: When building for the
>>>> Hurd,
>>>> set #:tests? to #false.
>>
>> [..]
>>>> +      #:tests? (not (target-hurd?))
>>
>>>> compiled
>>
>>> Instead of disabling tests altogether, can we just disable those that
>>> fail on the Hurd?
>>
>> We probably can, and I have tried to do so in most cases.  However,
>> identifying those tests can be quite time consuming.  I'm not sure how
>> many tests failed here, and note that some tests will hang or crash the
>> Hurd, so if we decide to do this, I would appreciate some help :-)
>>
>> Ludo on the other hand, argued against having more than ~20 (IIRC) test
>> exceptions and using #:tests? #f instead.
>>
>> My idea was to get guix to build natively, and guix pull to work.  Once
>> we get those to work, we can possibly look forward to more contributors
>> to this.
>
> I agree with Liliana that it's nicer to disable just these tests that
> fail, but in light of what you wrote, your approach seems reasonable.

Yes, I agree that if we want to make Hurd better and enabble us to
create a bug report it sure helps if we have more information.

Yesterday I decided to have another look into this.  I have identified
20 tests that TIMEOUT after 600s, and 37 FAIL and instead of setting
#:tests? to #false, I have added them to the `disable-failing-tests'
phase when building on the Hurd.  See attached patch.

Greetings,
Janneke

[0001-gnu-glib-Disable-hanging-and-failing-tests-for-the-H.patch (text/x-patch, inline)]
From e65647119e4791580ef50869d35be29d4010c6bb Mon Sep 17 00:00:00 2001
Message-Id: <e65647119e4791580ef50869d35be29d4010c6bb.1689841075.git.janneke <at> gnu.org>
From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Date: Tue, 13 Jun 2023 10:58:03 +0200
Subject: [PATCH] gnu: glib: Disable hanging and failing tests for the Hurd.

* gnu/packages/glib.scm (glib)[arguments]: When building for the Hurd,
in phase `disable-failing-tests', neutralize 20 hanging tests, and 37 more
failing tests.
---
 gnu/packages/glib.scm | 104 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 103 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index e988e8dc87..a0b85b15d1 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -14,7 +14,7 @@
 ;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius <at> gnu.org>
 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo <at> nixo.xyz>
 ;;; Copyright © 2020 Florian Pelz <pelzflorian <at> pelzflorian.de>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
+;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2020 Arthur Margerit <ruhtra.mar <at> gmail.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos <at> telenet.be>
 ;;; Copyright © 2022 Petr Hodina <phodina <at> protonmail.com>
@@ -285,6 +285,108 @@ (define glib
                           (string-append "//" all "\n"))
                          (("^  g_assert_cmpfloat \\(elapsed, ==.*" all)
                           (string-append "//" all "\n"))))
+                     '())
+              #$@(if (system-hurd?)
+                     '((with-directory-excursion "gio/tests"
+                         ;; TIMEOUT after 600s
+                         (substitute* '("actions.c"
+                                        "dbus-appinfo.c"
+                                        "debugcontroller.c"
+                                        "gdbus-bz627724.c"
+                                        "gdbus-connection-slow.c"
+                                        "gdbus-exit-on-close.c"
+                                        "gdbus-export.c"
+                                        "gdbus-introspection.c"
+                                        "gdbus-method-invocation.c"
+                                        "gdbus-non-socket.c"
+                                        "gdbus-proxy-threads.c"
+                                        "gdbus-proxy-unique-name.c"
+                                        "gdbus-proxy-well-known-name.c"
+                                        "gdbus-proxy.c"
+                                        "gdbus-test-codegen.c"
+                                        "gmenumodel.c"
+                                        "gnotification.c"
+                                        "stream-rw_all.c")
+                           (("return (g_test_run|session_bus_run)" all call)
+                            (string-append "return 0;// " call))
+                           ((" (ret|rtv|result) = (g_test_run|session_bus_run)"
+                             all var call)
+                            (string-append " " var " = 0;// " call))
+                           (("[ \t]*g_test_add_func.*;") ""))
+
+                         ;; commenting-out g_assert, g_test_add_func, g_test_run
+                         ;; does not help; special-case short-circuit.
+                         (substitute* "gdbus-connection-loss.c" ;; TODO?
+                           (("  gchar \\*path;.*" all)
+                            (string-append all "  return 0;\n")))
+
+                         ;; FAIL
+                         (substitute* '("appmonitor.c"
+                                        "async-splice-output-stream.c"
+                                        "autoptr.c"
+                                        "contexts.c"       
+                                        "converter-stream.c"
+                                        "file.c"
+                                        "g-file-info.c"
+                                        "g-file.c"
+                                        "g-icon.c"
+                                        "gapplication.c"
+                                        "gdbus-connection-flush.c"
+                                        "gdbus-connection.c"
+                                        "gdbus-names.c"    
+                                        "gdbus-server-auth.c"
+                                        "gsocketclient-slow.c"
+                                        "gsubprocess.c"
+                                        "io-stream.c"
+                                        "live-g-file.c"
+                                        "memory-monitor.c" 
+                                        "mimeapps.c"
+                                        "network-monitor-race.c"
+                                        "network-monitor.c"
+                                        "pollable.c"
+                                        "power-profile-monitor.c"
+                                        "readwrite.c"
+                                        "resources.c"
+                                        "socket-service.c"
+                                        "socket.c"
+                                        "tls-bindings.c"
+                                        "tls-certificate.c"
+                                        "tls-database.c"
+                                        "trash.c"
+                                        "vfs.c")
+                           (("return (g_test_run|session_bus_run)" all call)
+                            (string-append "return 0;// " call))
+                           ((" (ret|rtv|result) = (g_test_run|session_bus_run)"
+                             all var call)
+                            (string-append " " var " = 0;// " call))
+                           (("[ \t]*g_test_add_func.*;") ""))
+
+                         ;; commenting-out g_test_add_func, g_test_run does
+                         ;; not help; special-case short-circuit.
+                         (substitute* "gsettings.c"
+                           (("#ifdef TEST_LOCALE_PATH" all)
+                            (string-append "  return 0;\n" all)))
+
+                         ;; commenting-out g_test_add_func, ;; g_test_run does
+                         ;; not help; special-case short-circuit.
+                         (substitute* "proxy-test.c"
+                           (("  gint result.*;" all)
+                            (string-append all "  return 0;\n")))
+
+                         ;; commenting-out g_test_add_func, g_test_run
+                         ;; does not help; special-case short-circuit.
+                         (substitute* "volumemonitor.c"
+                           (("  gboolean ret;" all)
+                            (string-append all "  return 0;\n"))))
+
+                       (with-directory-excursion "glib/tests"
+                         ;; TIMEOUT after 600s
+                         (substitute* "thread-pool.c"
+                           (("[ \t]*g_test_add_func.*;") ""))
+
+                         ;; FAIL
+                         (substitute* "fileutils.c"
+                           (("[ \t]*g_test_add_func.*;") ""))))
                      '())))
           ;; Python references are not being patched in patch-phase of build,
           ;; despite using python-wrapper as input. So we patch them manually.

base-commit: c5a189d2abdbfe4c8dfeef764e3be055948b5c91
-- 
2.40.1

[Message part 3 (text/plain, inline)]
-- 
Janneke Nieuwenhuizen <janneke <at> gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

This bug report was last modified 1 year and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.