GNU bug report logs - #30744
[PATCH 1/2] services: dovecot: Copy dovecot.conf to /etc/dovecot.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Wed, 7 Mar 2018 21:32:02 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 30744 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 30744 <at> debbugs.gnu.org
Subject: Re: [bug#30744] [PATCH] tests: mail: Add test for dovecot.
Date: Thu, 08 Mar 2018 11:24:45 +0300
[Message part 1 (text/plain, inline)]
Hello Clément,

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

> Oleg Pykhalov <go.wigust <at> gmail.com> writes:
>
>> * gnu/tests/mail.scm (%dovecot-os, %test-dovecot): New variables.
>> (run-dovecot-test): New procedure.
>> ---
>>  gnu/tests/mail.scm | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 112 insertions(+), 1 deletion(-)
>
> Thank you for these patches!

Thank you for review!

[…]

>> +          (sleep 1) ; give the service time to start talking
>
> Here, it would probably be safer to wait for the PID file to arrive.
> You could use 'wait-for-file' for this, there are examples in other
> tests.  Dovecot's PID file is /var/run/dovecot/master.pid.

OK.

>> +          (test-eq "accept an email"
>> +            #t
>
> Could you use 'test-assert' here?

OK.

[…]

>> +                ;; Get a message ID
>> +                (string->number
>> +                 (match (scandir "/home/alice/Maildir/TESTBOX/new/")
>> +                   ((_ _ message)
>
> Could you write "." ".." here instead of _ _?  It makes it easier to
> understand the code.

Seems it's not possible for ".":
--8<---------------cut here---------------start------------->8---
natsu <at> magnolia ~/src/guix$ ./pre-inst-env make check-system TESTS="dovecot"
Compiling Scheme modules...
  LOAD     gnu/tests/mail.scm
ERROR: In procedure read:
In procedure scm_i_lreadparen: gnu/tests/mail.scm:378:28: missing close paren
make: *** [Makefile:5227: make-go] Error 1
--8<---------------cut here---------------end--------------->8---

WDYT about replacing "." (or first ‘_’) with ‘cwd’?

I also rename ‘message’ to ‘message-file’ if you don't mind.

So in the end we will have ‘(match … (cwd .. message-file) …)’.

>> +                    (match (string-split message #\.)
>> +                      ((message-id _ _) message-id))))))
>
> Here I think it would be great to compare the arrived message and the
> sent message to check that they are the same.  If they are the same,
> then the test succeeds.  WDYT?

OK.

I'll attach the patch after this email.

Oleg.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 7 years and 75 days ago.

Previous Next


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