From unknown Thu Sep 11 02:37:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#36953 <36953@debbugs.gnu.org> To: bug#36953 <36953@debbugs.gnu.org> Subject: Status: [PATCH] reconfigure: Improve tests for system activation. Reply-To: bug#36953 <36953@debbugs.gnu.org> Date: Thu, 11 Sep 2025 09:37:37 +0000 retitle 36953 [PATCH] reconfigure: Improve tests for system activation. reassign 36953 guix-patches submitter 36953 zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) severity 36953 normal tag 36953 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 08:46:00 2019 Received: (at submit) by debbugs.gnu.org; 7 Aug 2019 12:46:00 +0000 Received: from localhost ([127.0.0.1]:38158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvLKJ-0000Ky-OF for submit@debbugs.gnu.org; Wed, 07 Aug 2019 08:45:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:45928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvLKI-0000Kr-95 for submit@debbugs.gnu.org; Wed, 07 Aug 2019 08:45:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48184) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvLKH-0007Ky-5g for guix-patches@gnu.org; Wed, 07 Aug 2019 08:45:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvLKF-0003qO-Vf for guix-patches@gnu.org; Wed, 07 Aug 2019 08:45:57 -0400 Received: from mx.sdf.org ([205.166.94.20]:65364) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hvLKF-0003pU-Iz for guix-patches@gnu.org; Wed, 07 Aug 2019 08:45:55 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x77CjrkZ018386 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Wed, 7 Aug 2019 12:45:54 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: guix-patches@gnu.org Subject: [PATCH] reconfigure: Improve tests for system activation. Date: Wed, 07 Aug 2019 08:42:42 -0400 Message-ID: <87r25x4059.fsf@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 205.166.94.20 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * gnu/tests/reconfigure.scm (run-switch-to-system-test): Assert that '/run/current-system' points to the activated system, and that new user accounts specified in the operating system declaration are created. =2D-- gnu/tests/reconfigure.scm | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm index 3a2f0a2e53..fb11e6164e 100644 =2D-- a/gnu/tests/reconfigure.scm +++ b/gnu/tests/reconfigure.scm @@ -19,8 +19,10 @@ (define-module (gnu tests reconfigure) #:use-module (gnu bootloader) #:use-module (gnu services shepherd) =2D #:use-module (gnu system vm) #:use-module (gnu system) + #:use-module (gnu system accounts) + #:use-module (gnu system shadow) + #:use-module (gnu system vm) #:use-module (gnu tests) #:use-module (guix derivations) #:use-module (guix gexp) @@ -43,7 +45,13 @@ generation of the system profile." (define os (marionette-operating-system =2D (simple-operating-system) + (operating-system + (inherit (simple-operating-system)) + (users (cons (user-account + (name "jakob") + (group "users") + (home-directory "/home/jakob")) + %base-user-accounts))) #:imported-modules '((gnu services herd) (guix combinators)))) =20 @@ -84,7 +92,25 @@ generation of the system profile." =20 (test-equal "script created new generation" (length (system-generations marionette)) =2D (1+ (length generations-prior)))) + (1+ (length generations-prior))) + + (test-assert "script activated the new generation" + (and (eqv? 'symlink + (marionette-eval + '(stat:type (lstat "/run/current-system")) + marionette)) + (string=3D #$os + (marionette-eval + '(readlink "/run/current-system") + marionette)))) + + (test-assert "script activated user accounts" + (marionette-eval + '(string-contains (call-with-input-file "/etc/passwd" + (lambda (port) + (get-string-all port))) + "jakob") + marionette))) =20 (test-end) (exit (=3D (test-runner-fail-count (test-runner-current)) 0))))) =2D-=20 2.22.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1Kx0IACgkQ9Qb9Fp2P 2VotMBAAmeGeO4/GRlk+YqPjTUIpqSdmgymQ0JbjshdjGjHR767Bb9bjCvYkFOc7 4C4OHGGaedVk2UxwCs5m68O61dWTwPN4TMWiGKYnlxtt3t6R02xtQw4rUoQ0lJ94 N25NyAXx563jqqcrHvubCCkT97JfVPSCNaRHlxjDMyEVNsfxalwLBvaRmU3zzGzv qICgCjnaldkgrzgWsxYzYi8sB4WRaD3Rid7unxezlzEMEpE/KnY0L+u4YwII7A8Y dfogNNfgcrmlRvyhtLxN+e0mDa/xmeY+HqMlYbJ9rmVkSg5rjqENPviYfAzVzcUu VnRlFT2Pkz9BXMCJlUcUyCrLkuj565v9CR2zv2Cukph+8zl7NIzdeGBfeaZHFZCA 6cePiS/yLaRMxLiCPYYQJCtQeWs6G2cp+bwv7X7FcRhhB9VIQmfCpsL89qcdhMLv 7QLG6xoR+QXSpTbTZL4jl2hfQbqbzEF2CDy84p+gqdOH9pmZb8niW7coYmovhT2X pcUCKAeCy+4g4EXxZl2YJ+NEvXhHFyFZDQYtNOW/yVAZ8S5gS/uWS16E13AhLI5I RM9DtN7maj3mUjt5eR4GdwKo9xliUw3RmMqsNjr7MJepj4Cmyh3GTIALCPo1Mifx TCc4BxGNqZS5UTPXFC1m/Ph5Qd02TkJyRkVophWY3xVG43qhap0= =4wDU -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 15:34:25 2019 Received: (at submit) by debbugs.gnu.org; 7 Aug 2019 19:34:25 +0000 Received: from localhost ([127.0.0.1]:39431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvRhY-0001RC-6F for submit@debbugs.gnu.org; Wed, 07 Aug 2019 15:34:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:50049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvRhW-0001R4-6x for submit@debbugs.gnu.org; Wed, 07 Aug 2019 15:34:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51200) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvRhV-0006wk-Bo for guix-patches@gnu.org; Wed, 07 Aug 2019 15:34:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvRhT-000321-FM for guix-patches@gnu.org; Wed, 07 Aug 2019 15:34:21 -0400 Received: from dustycloud.org ([50.116.34.160]:44856) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hvRhT-0002vy-Bj for guix-patches@gnu.org; Wed, 07 Aug 2019 15:34:19 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id E8C802661E; Wed, 7 Aug 2019 15:34:16 -0400 (EDT) References: <87r25x4059.fsf@sdf.lonestar.org> User-agent: mu4e 1.2.0; emacs 26.2 From: Christopher Lemmer Webber To: guix-patches@gnu.org Subject: Re: [bug#36953] [PATCH] reconfigure: Improve tests for system activation. In-reply-to: <87r25x4059.fsf@sdf.lonestar.org> Date: Wed, 07 Aug 2019 15:34:16 -0400 Message-ID: <871rxwpy6f.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 50.116.34.160 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: 36953-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Jakob L. Kreuze writes: > + (users (cons (user-account > + (name "jakob") > + (group "users") > + (home-directory "/home/jakob")) > + %base-user-accounts))) Welcome to the test machine, jakob ;) Looks great. Merged and pushed. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 16:48:10 2019 Received: (at 36953) by debbugs.gnu.org; 7 Aug 2019 20:48:10 +0000 Received: from localhost ([127.0.0.1]:39545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvSqw-0007ws-6Y for submit@debbugs.gnu.org; Wed, 07 Aug 2019 16:48:10 -0400 Received: from mx.sdf.org ([205.166.94.20]:56809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvSqu-0007wi-5L for 36953@debbugs.gnu.org; Wed, 07 Aug 2019 16:48:08 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x77Km6gP018952 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO); Wed, 7 Aug 2019 20:48:07 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) To: 36953@debbugs.gnu.org Subject: Re: bug#36953: [PATCH] reconfigure: Improve tests for system activation. References: <87r25x4059.fsf@sdf.lonestar.org> <871rxwpy6f.fsf@dustycloud.org> Date: Wed, 07 Aug 2019 16:44:54 -0400 In-Reply-To: <871rxwpy6f.fsf@dustycloud.org> (Christopher Lemmer Webber's message of "Wed, 07 Aug 2019 15:34:16 -0400") Message-ID: <87ef1wln7d.fsf@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36953 Cc: cwebber@dustycloud.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Christopher Lemmer Webber writes: > Jakob L. Kreuze writes: > >> + (users (cons (user-account >> + (name "jakob") >> + (group "users") >> + (home-directory "/home/jakob")) >> + %base-user-accounts))) > > Welcome to the test machine, jakob ;) Heh, I'm pretty bad at coming up with names for examples. Maybe I should take inspiration from you and use Eva Lu Ator or Alyssa P. Hacker next time the need arises ;) > Looks great. Merged and pushed. Thanks! Regards, Jakob --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEa1VJLOiXAjQ2BGSm9Qb9Fp2P2VoFAl1LOEcACgkQ9Qb9Fp2P 2VpAhw//S4DRSG8cKh6jnhxYg3dgZwBAh2bzQ06QBFic/S6rpoVtpgGPEMUIZ8nL TD3jRNFexDlfUfS1ulf0HEAcyhsDuXhH4/InnWIwlvDQxbVxFfhRGJeGkQBmX/cv aeABCMboyUjcRy1JYWUy+uYOfYIJP2MkztYM3X2Ojf359RFOMviMZvLjx3zMCuk8 +Wo9eplcbuiFB+0BXbtQV58xSMTUnDYuwunxB78ssZeuSiMG+X6jLpv83W+EIkAO V80vRMnoHztoMONOIYWN7Y4A+M2VKJQ5QIpUaTX+FFekR3V4ywaRXMlUdezikQ+X J0s8JBGklvggJJDvm9u/kNlyx+YH+EMO8qIK8qjbHjWELCGF0bk9zgf7AUdauLgy RsBxc4+IIiyz2cfJ0kzIjh+kKD8mWZmuSlWRBt7TWg163BzRLfKpTqoiPf/RS0sd jPI1G4oMqHPh8mdWuP2Jn6zRd0k548R+CzRKg+U9IMvmdH73JFGGqd24c2hsV33w wNzLZ1zT9Hr+kmhwwZe3oEkfMWusIiNmfZBcQ6tXyN7/euO4H4odI2xwpw/SEEr1 BJ3+EXTDZ+7+9lbY0j9oBHrkzcDBTmQAK9BGXVEsdZMozGBv0SVD61IwW78ZGIvA 34/cpylxPzHquLVJJeXUB9FzmI1aYUK4bAEkWrJJsDzsKoYV0O0= =Wl1s -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Sep 11 02:37:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 05 Sep 2019 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator