From patchwork Thu Sep 26 10:09:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 31501 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 09D3627BBEB; Thu, 26 Sep 2024 11:12:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 9D30327BBE9 for ; Thu, 26 Sep 2024 11:12:52 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stlTI-0002xa-2k; Thu, 26 Sep 2024 06:11:40 -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 1stlTE-0002wo-P2 for guix-patches@gnu.org; Thu, 26 Sep 2024 06:11:36 -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 1stlTE-0007PH-Ev for guix-patches@gnu.org; Thu, 26 Sep 2024 06:11:36 -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=ovim1EBaCAE1MVZajqRxcRakZdmW0ZG41AR3OZD7f5g=; b=eKZT5xbwHiUcOajFjRek00PpBtwCnUvpFmQivk1H8x/wFMaEtxcdzse/w/pUA8o/fNDnAO5XZc7wWZ1CIUEB1i6JU8Mx7RPvxLuWNQRx3oT9lCZUmWs6QFO9mh2cMtRzrNiB9YxRKBnCkg2dKShq7LL1CE0XCEAhSX60dHxTnSzNRYkDimvn/o2yI0qAyIkuB0uz1gXqkKhgr5YBVn7TuKmTknp7kfqkNnKTgf2zpX5M0FD42Yq6B6qtzxnSTaejJ2+PRGzhEjvZY10gbXODPA5TAEd9F47r3dxubS4aYMHTjARiYtj4cTdzHIz+xXP9IquRa3ykJzUVJBsx6Odt5Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1stlTf-0003U5-D2 for guix-patches@gnu.org; Thu, 26 Sep 2024 06:12:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73202] [PATCH v3 03/14] gnu: tests: reconfigure: Remove bootloader install test. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Sep 2024 10:12:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73202 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73202@debbugs.gnu.org Cc: Lilah Tascheter Received: via spool by 73202-submit@debbugs.gnu.org id=B73202.172734548413201 (code B ref 73202); Thu, 26 Sep 2024 10:12:03 +0000 Received: (at 73202) by debbugs.gnu.org; 26 Sep 2024 10:11:24 +0000 Received: from localhost ([127.0.0.1]:55475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stlT0-0003Qa-9A for submit@debbugs.gnu.org; Thu, 26 Sep 2024 06:11:23 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:39475 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stlSv-0003PA-He for 73202@debbugs.gnu.org; Thu, 26 Sep 2024 06:11:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1727345437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ovim1EBaCAE1MVZajqRxcRakZdmW0ZG41AR3OZD7f5g=; b=euJ+NUU0YStGlgJ6WjnA+kHeJFqK0Fwm9iTGEjCLEXdEAr2zb0nDm4pGY2sr65qkzu16uU /RyBnbPl9IC97/hsOh/b+ub6lidYH5s0GeCb5rKNZafQ7gJ5XWcmDGla9EmhcFN4CHNb/Q fWWeiMK5utEHTVkcFTZqyWHnjByT942zdah+2NEuL7nzBgd/uuF8iNxDxpuU501Pih7P7K 6mib50llwrSHIBCBPpA4eWcvOvdhRlROd6ubC+OYM9nrh6/Oc/MEja7a31py88SsNKUE/L CbFCAydrhjVYp+L0rI2yHZD1pty3ZZg3UcxlJlnyYUkef6dynCBvYHlZnF3blg== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id eaaee76b (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Thu, 26 Sep 2024 10:10:37 +0000 (UTC) Date: Thu, 26 Sep 2024 12:09:00 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: <74c789e74594d538308d33633ed8540283dcde49.1727345067.git.herman@rimm.ee> References: <74c789e74594d538308d33633ed8540283dcde49.1727345067.git.herman@rimm.ee> 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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm 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 From: Lilah Tascheter * gnu/tests/reconfigure.scm (%test-install-bootloader): Delete variable. (run-install-bootloader-test): Delete procedure. Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739 --- gnu/tests/reconfigure.scm | 86 +-------------------------------------- 1 file changed, 1 insertion(+), 85 deletions(-) diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm index bcc7645fa3..8aa5311171 100644 --- a/gnu/tests/reconfigure.scm +++ b/gnu/tests/reconfigure.scm @@ -30,8 +30,7 @@ (define-module (gnu tests reconfigure) #:use-module (guix scripts system reconfigure) #:use-module (guix store) #:export (%test-switch-to-system - %test-upgrade-services - %test-install-bootloader)) + %test-upgrade-services)) ;;; Commentary: ;;; @@ -178,83 +177,6 @@ (define* (run-upgrade-services-test) (disable (upgrade-services-program '() '() '(dummy) '()))) (test enable disable)))) -(define* (run-install-bootloader-test) - "Run a test of an OS running INSTALL-BOOTLOADER-PROGRAM, which installs a -bootloader's configuration file." - (define os - (marionette-operating-system - (simple-operating-system) - #:imported-modules '((gnu services herd) - (guix combinators)))) - - (define vm (virtual-machine - (operating-system os) - (volatile? #f))) - - (define (test script) - (with-imported-modules '((gnu build marionette)) - #~(begin - (use-modules (gnu build marionette) - (ice-9 regex) - (srfi srfi-1) - (srfi srfi-64)) - - (define marionette - (make-marionette (list #$vm))) - - ;; Return the system generation paths that have GRUB menu entries. - (define (generations-in-grub-cfg marionette) - (let ((grub-cfg (marionette-eval - '(begin - (use-modules (rnrs io ports)) - (call-with-input-file "/boot/grub/grub.cfg" - get-string-all)) - marionette))) - (map (lambda (parameter) - (second (string-split (match:substring parameter) #\=))) - (list-matches "system=[^ ]*" grub-cfg)))) - - (test-runner-current (system-test-runner #$output)) - (test-begin "install-bootloader") - - (test-assert "no prior menu entry for system generation" - (not (member #$os (generations-in-grub-cfg marionette)))) - - (test-assert "script successfully evaluated" - (marionette-eval - '(primitive-load #$script) - marionette)) - - (test-assert "menu entry created for system generation" - (member #$os (generations-in-grub-cfg marionette))) - - (test-end)))) - - (let* ((bootloader ((compose bootloader-configuration-bootloader - operating-system-bootloader) - os)) - ;; The typical use-case for 'install-bootloader-program' is to read - ;; the boot parameters for the existing menu entries on the system, - ;; parse them with 'boot-parameters->menu-entry', and pass the - ;; results to 'operating-system-bootcfg'. However, to obtain boot - ;; parameters, we would need to start the marionette, which we should - ;; ideally avoid doing outside of the 'test' G-Expression. Thus, we - ;; generate a bootloader configuration for the script as if there - ;; were no existing menu entries. In the grand scheme of things, this - ;; matters little -- these tests should not make assertions about the - ;; behavior of 'operating-system-bootcfg'. - (bootcfg (operating-system-bootcfg os '())) - (bootcfg-file (bootloader-configuration-file bootloader))) - (gexp->derivation - "install-bootloader" - ;; Due to the read-only nature of the virtual machines used in the system - ;; test suite, the bootloader installer script is omitted. 'grub-install' - ;; would attempt to write directly to the virtual disk if the - ;; installation script were run. - (test - (install-bootloader-program #f #f #f bootcfg bootcfg-file '(#f) "/"))))) - - (define %test-switch-to-system (system-test (name "switch-to-system") @@ -267,9 +189,3 @@ (define %test-upgrade-services (description "Upgrade the Shepherd by unloading obsolete services and loading new services.") (value (run-upgrade-services-test)))) - -(define %test-install-bootloader - (system-test - (name "install-bootloader") - (description "Install a bootloader and its configuration file.") - (value (run-install-bootloader-test))))