From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSpFv-0008LF-FF for guix-patches@gnu.org; Tue, 12 Jun 2018 15:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSpFu-0003uW-MC for guix-patches@gnu.org; Tue, 12 Jun 2018 15:47:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:37476) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSpFu-0003uN-Gy for guix-patches@gnu.org; Tue, 12 Jun 2018 15:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fSpFu-0002Un-5b for guix-patches@gnu.org; Tue, 12 Jun 2018 15:47: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> Date: Tue, 12 Jun 2018 21:46:06 +0200 In-Reply-To: <20180611220508.17320-1-clement@lassieur.org> ("=?UTF-8?Q?Cl=C3=A9ment?= Lassieur"'s message of "Tue, 12 Jun 2018 00:05:08 +0200") Message-ID: <87r2lbokjl.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 Hi Cl=C3=A9ment, Cl=C3=A9ment Lassieur skribis: > Since commit dc7b3e56337ee9d8dcd8fe7d5cab71ef536d024f, 'start-service' re= turns > the Shepherd's representation of the service as a sexp, and '#f' if the > service fails to start. Also, it doesn't throw an exception when the ser= vice > fails to start, so relying on an exception instead of relying on its retu= rn > value is a false positive. Looking at =E2=80=98invoke-action=E2=80=99 (used by =E2=80=98start-service= =E2=80=99) in (gnu services herd), it seems that an exception is raised upon error: (('reply ('version 0 x ...) ('result y) ('error error) ('messages messages)) (for-each display-message messages) (raise-shepherd-error error) #f) There=E2=80=99s one case where an exception isn=E2=80=99t raised, and that= =E2=80=99s when shepherd returns something completely bogus: (x ;; invalid reply #f) Am I missing something? Thanks, Ludo=E2=80=99.