From patchwork Sat Mar 22 11:36:45 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: 40587 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 DFFB527BBEA; Sat, 22 Mar 2025 11:38:36 +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=ham 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 99DFC27BBE2 for ; Sat, 22 Mar 2025 11:38:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tvxBR-0002Ik-O1; Sat, 22 Mar 2025 07:38:33 -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 1tvxB0-0001lR-1G for guix-patches@gnu.org; Sat, 22 Mar 2025 07:38:06 -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 1tvxAz-00006m-KY for guix-patches@gnu.org; Sat, 22 Mar 2025 07:38:05 -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=cYB+jk1oufSgYwaGh0U/ftutN9+wgou4qiZuCbitTmMYhV8GmRfuXZ0/HYHPNLeoFe5rr3Ag3FOy9oEdlfcjFHwbzAlqjYm4cgXYhiOci3JutkpCdA9geff+mgyDJs1qRNUMv/yD82tEaC7f89j0CVnIl9w8lXDhjyX5YJF7NYMpetmAjIlhQW2eU5bdfVpIyBpHjijy3utb1Aw1hz9QLJk1BJts8hyOvMdzoeYu1RF7y2s8zYkMylPN6zW6jVD9mKMHQwkoiNZXM4f0AmecNe0GaxULP2VLfPDuepB9W0ezuvKCZnH9oPMqmXYNODKbksUiqfLscJXG/UrKEyBEfA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tvxAz-0002Z8-Ff for guix-patches@gnu.org; Sat, 22 Mar 2025 07:38:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77041] [PATCH v2 08/16] tests: Make =?utf-8?q?=E2=80=98operati?= =?utf-8?q?ng-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, 22 Mar 2025 11:38:05 +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.17426434669714 (code B ref 77041); Sat, 22 Mar 2025 11:38:05 +0000 Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:46 +0000 Received: from localhost ([127.0.0.1]:41187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvxAf-0002WW-DP for submit@debbugs.gnu.org; Sat, 22 Mar 2025 07:37:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44770) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvxAT-0002Ub-2H for 77041@debbugs.gnu.org; Sat, 22 Mar 2025 07:37:33 -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 1tvxAM-0008UD-1t; Sat, 22 Mar 2025 07:37:27 -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=fdATpzERg3aPfMP15dJo HgCk4xd/uTH6ikrwRsLo8D65LfPYe/wQn15d7DNV3g+HuNjJIUR0hFJLC024PGo/J0oRr4FtDdOdu dIU5maZ3htAiVgC01kN7bywSQU+8WJ1cjaIwqq47DD8O9N/QKyfGhkXprDAFiuZOxucOMUCtmt0Pd nLsD8e95fweH2rGTp+BwDHjCsqLPkMsN//pQ6dGbxprhIMO76xYLC8fnv5aGl7NOzMILgjH5vBGEX P2c56OaNuD7vlTMez4ORmtuUrayTdfM3x/t9so+SLzQLUi4lnr4+wEt8l0n9ZZheUqarWr2GthRBz zxq8xbTvNaGKRg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 22 Mar 2025 12:36:45 +0100 Message-ID: <0dbd5aaedd936891d115aae44dcbd4152f4a9546.1742642743.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