GNU bug report logs - #31788
[PATCH] tests: Honor the return value of 'start-service'.

Previous Next

Package: guix-patches;

Reported by: Clément Lassieur <clement <at> lassieur.org>

Date: Mon, 11 Jun 2018 22:06:02 UTC

Severity: normal

Tags: patch

Done: Clément Lassieur <clement <at> lassieur.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Clément Lassieur <clement <at> lassieur.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 31788 <at> debbugs.gnu.org
Subject: [bug#31788] [PATCH] tests: Honor the return value of 'start-service'.
Date: Tue, 12 Jun 2018 22:50:57 +0200
Ludovic Courtès <ludo <at> gnu.org> writes:

> I’m 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))
>
> ‘start-service’ in this case returns a number (the PID), and I think
> ‘test-assert’ reports a failure when the value is not exactly #t.  Isn’t
> 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.




This bug report was last modified 6 years and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.