From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSzdX-00018s-Hl for guix-patches@gnu.org; Wed, 13 Jun 2018 02:52:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSzdS-0003Sl-Jq for guix-patches@gnu.org; Wed, 13 Jun 2018 02:52:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:37785) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSzdS-0003Sb-FV for guix-patches@gnu.org; Wed, 13 Jun 2018 02:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fSzdS-0000fh-9D for guix-patches@gnu.org; Wed, 13 Jun 2018 02:52:02 -0400 Subject: [bug#31788] [PATCH] tests: Honor the return value of 'start-service'. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20180611220508.17320-1-clement@lassieur.org> <87r2lbokjl.fsf@gnu.org> <87y3fjhiwj.fsf@lassieur.org> <877en3oi41.fsf@gnu.org> <87tvq7u3ta.fsf@lassieur.org> Date: Wed, 13 Jun 2018 08:51:01 +0200 In-Reply-To: <87tvq7u3ta.fsf@lassieur.org> ("=?UTF-8?Q?Cl=C3=A9ment?= Lassieur"'s message of "Tue, 12 Jun 2018 22:50:57 +0200") Message-ID: <877en3p4bu.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Cc: 31788@debbugs.gnu.org Cl=C3=A9ment Lassieur skribis: > Ludovic Court=C3=A8s writes: > >> I=E2=80=99m not entirely sure about things like this: >> >> - (test-eq "service running" >> - 'running! >> + (test-assert "service running" >> (marionette-eval >> '(begin >> (use-modules (gnu services herd)) >> - (start-service 'mcron) >> - 'running!) >> + (start-service 'mcron)) >> marionette)) >> >> =E2=80=98start-service=E2=80=99 in this case returns a number (the PID),= and I think >> =E2=80=98test-assert=E2=80=99 reports a failure when the value is not ex= actly #t. Isn=E2=80=99t >> it the case? > > srfi-64 says: "The test passes if the result is true", so I believe > test-assert reports a failure only when the value is #f (and maybe on > exceptions), because anything else is true in Scheme. Yeah I know; I had a vague recollection of SRFI-64 behaving funny but that=E2=80=99s no longer the case. So I guess you can go ahead. Thank you! Ludo=E2=80=99.