From patchwork Sat Mar 15 21:37:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 40222 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9088D27BBE9; Sat, 15 Mar 2025 21:39:39 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4EF2827BBE2 for ; Sat, 15 Mar 2025 21:39:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ttZDo-0004vO-CU; Sat, 15 Mar 2025 17:39:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ttZDl-0004uD-7s for guix-patches@gnu.org; Sat, 15 Mar 2025 17:39:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ttZDk-0002mg-T3 for guix-patches@gnu.org; Sat, 15 Mar 2025 17:39:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=J86d6wlJyiG/xFreO7hCsXLBQMr+goEI4lMG2ZhkdWs=; b=feQgiyYQOjhqlX/jDxhTA83yVLH5JhTMwrTGjQsXXpsnCh5SNE8KSEuZlx1uifjQvhkUdsNfB2sBsErB/+NtAiBj0EI8UqsM6Uzd2o1oLBUl7Yyw3apjir1APSZq2nt8MUURBNM7q6nvEXvs7/7vE7o9SfsaINGIU4k8DobLlKnaAhXQppqE/MPUUJ3PTcJGQXzQyYKIeiV4HeZlRZUqVZdyffUob3CyoqGMJnK2SLZ5dPPq/6VqWLbDLWp/UUaoorXtBaW4VOvV6HEG6g38yKX63wkRJZehL0RiPC5LzAOUN83o6ng2bFxjF3tahfurJadg64d2zaW3MW5C0tM8MA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ttZDk-0004VP-HT for guix-patches@gnu.org; Sat, 15 Mar 2025 17:39:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77041] [PATCH 08/16] tests: Make =?utf-8?q?=E2=80=98operating-?= =?utf-8?q?system-with-console-syslog=E2=80=99?= public. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 15 Mar 2025 21:39:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77041 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77041@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 77041-submit@debbugs.gnu.org id=B77041.174207472117125 (code B ref 77041); Sat, 15 Mar 2025 21:39:04 +0000 Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:41 +0000 Received: from localhost ([127.0.0.1]:43857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ttZDM-0004S5-RC for submit@debbugs.gnu.org; Sat, 15 Mar 2025 17:38:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55768) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ttZCr-0004Nb-8q for 77041@debbugs.gnu.org; Sat, 15 Mar 2025 17:38:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ttZCl-0002hZ-0E; Sat, 15 Mar 2025 17:38:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=J86d6wlJyiG/xFreO7hCsXLBQMr+goEI4lMG2ZhkdWs=; b=BDnAPrh+CeL7DutLNHnc h7YTN0V3C86uNtJt2eUu4jX6c3NAFbknPhvO9n0ByUWGt0fPTjYF8ETHRrYh7Su3GoxFMhlBoX5Kg ZGg56q8oj/LBK0kNkaprz0a4t0RrD42YWW+PP0UDtLtCs7QVtR/xSii2BX3EFetdatOjmD6gHx2Gh NN/opgh9xpSVff+34JKEoUucd83J1gr15p2qnOkiYeYL3C3BnluBy1Hq4RtIhdjZDWlnn1z1/AV2X Sc/OjNqxRfu2ZmlSVR1j/qloyBRbp2MsvIpojOWGb4cUFC8efyY/y1LZ9OZO3YyhdIK7CLn2o74Yo 9T80kys+Iak7bQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 15 Mar 2025 22:37:14 +0100 Message-ID: <18ee01c05e82b666726f3709cad6fabafff9ae98.1742073920.git.ludo@gnu.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/tests/install.scm (operating-system-with-console-syslog): Move to… * gnu/tests.scm (operating-system-with-console-syslog): … here. New procedure. Change-Id: I015e24525140365d09f22127d366107fdc9ca902 --- gnu/tests.scm | 21 +++++++++++++++++++++ gnu/tests/install.scm | 20 -------------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/gnu/tests.scm b/gnu/tests.scm index 84298de448..abb7076208 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -53,6 +53,7 @@ (define-module (gnu tests) %simple-os simple-operating-system + operating-system-with-console-syslog system-test system-test? @@ -268,6 +269,26 @@ (define-syntax-rule (simple-operating-system user-services ...) (services (cons* user-services ... %base-services)))) +(define (operating-system-with-console-syslog os) + "Return OS with a system log service that writes to /dev/console." + (operating-system + (inherit os) + (services + (modify-services (operating-system-user-services os) + (shepherd-system-log-service-type + config + => + (system-log-configuration + (inherit config) + (message-destination + #~(lambda (message) + (let ((destinations ((default-message-destination-procedure) + message))) + (if (<= (system-log-message-priority message) + (system-log-priority info)) + (cons "/dev/console" destinations) + destinations)))))))))) + ;;; ;;; Tests. diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index a837637b18..8293296339 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -1784,26 +1784,6 @@ (define %test-xfs-root-os ;;; Installation through the graphical interface. ;;; -(define (operating-system-with-console-syslog os) - "Return OS with a syslog service that writes to /dev/console." - (operating-system - (inherit os) - (services - (modify-services (operating-system-user-services os) - (shepherd-system-log-service-type - config - => - (system-log-configuration - (inherit config) - (message-destination - #~(lambda (message) - (let ((destinations ((default-message-destination-procedure) - message))) - (if (<= (system-log-message-priority message) - (system-log-priority info)) - (cons "/dev/console" destinations) - destinations)))))))))) - (define %root-password "foo") (define* (gui-test-program marionette