From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: Add system test for the rpcbind-daemon service. Date: Wed, 14 Dec 2016 00:00:57 +0100 Message-ID: <8760mnl9hy.fsf@gnu.org> References: <1481521490-9289-1-git-send-email-jmd@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGw4F-0001Ve-RU for guix-devel@gnu.org; Tue, 13 Dec 2016 18:01:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGw4C-0000ay-R4 for guix-devel@gnu.org; Tue, 13 Dec 2016 18:01:03 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGw4C-0000au-OE for guix-devel@gnu.org; Tue, 13 Dec 2016 18:01:00 -0500 In-Reply-To: <1481521490-9289-1-git-send-email-jmd@gnu.org> (John Darrington's message of "Mon, 12 Dec 2016 06:44:50 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: John Darrington Cc: guix-devel@gnu.org John Darrington skribis: > * gnu/tests/nfs.scm: New file. > * gnu/local.mk: Add it. Awesome! :-) > +(define %base-os > + (operating-system > + (host-name "olitupmok") > + (timezone "Europe/Berlin") > + (locale "en_US.UTF-8") > + > + (bootloader (grub-configuration (device "/dev/sdX"))) > + (file-systems %base-file-systems) > + (firmware '()) This line is not needed, is it? > + (users %base-user-accounts) > + (services (cons (dhcp-client-service) > + %base-services)))) You can add =E2=80=98rpc-service=E2=80=99 and the =E2=80=98rpcbind=E2=80=99= package right here=E2=80=A6 > +(define (os-with-service service) > + "Return a test operating system that runs SERVICE." > + (operating-system > + (inherit %base-os) > + (packages (cons* > + rpcbind > + %base-packages)) > + (services (cons service > + (operating-system-user-services %base-os))))) =E2=80=A6 and remove this procedure. > + (define test > + (with-imported-modules '((gnu build marionette)) > + #~(begin > + (use-modules (gnu build marionette) > + (srfi srfi-26) > + (srfi srfi-64) > + (ice-9 match)) Looks like srfi-26 and match are unused and can be removed. > + (define marionette > + ;; Enable TCP forwarding of the guest's port 111. > + (make-marionette (list #$command))) Outdated comment, no? > + (test-begin "nfs-daemon") Or =E2=80=9Crpcbind-daemon=E2=80=9D rather? > + ;; Check the socket file and that the service is still runni= ng. > + (test-assert "RPC socket exists" > + (begin > + (wait-for-socket #$socket) > + (marionette-eval I think it should be =E2=80=98and=E2=80=99 instead of =E2=80=98begin=E2=80= =99. > +(define %test-nfs > + (system-test > + (name "nfs") > + (description "Test some things related to NFS.") s/nfs/rpcbind/ ? OK with these changes. Thanks for taking the time to write this test! Ludo=E2=80=99.