From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euF5G-00073t-CD for guix-patches@gnu.org; Fri, 09 Mar 2018 05:17:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euF5C-00059C-C0 for guix-patches@gnu.org; Fri, 09 Mar 2018 05:17:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:43857) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euF5C-000590-7H for guix-patches@gnu.org; Fri, 09 Mar 2018 05:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1euF5B-0005pX-Nb for guix-patches@gnu.org; Fri, 09 Mar 2018 05:17:01 -0500 Subject: [bug#30744] [PATCH] tests: mail: Add test for dovecot. Resent-Message-ID: References: <87po4fug8i.fsf@gmail.com> <20180308082855.7113-1-go.wigust@gmail.com> <87tvtqaoqg.fsf@lassieur.org> <87sh99lhmt.fsf@gmail.com> From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <87sh99lhmt.fsf@gmail.com> Date: Fri, 09 Mar 2018 11:16:19 +0100 Message-ID: <87woylimfg.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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: Oleg Pykhalov Cc: 30744@debbugs.gnu.org Oleg Pykhalov writes: > Hello Clément, > > Clément Lassieur writes: > >> Oleg Pykhalov writes: > > […] > >>> + ;; Give the service time to start talking. >>> + (wait-for-file "/var/run/dovecot/master.pid" marionette) >> >> Could you put it in a test context (test-assert with file-exists? for >> example, see tests/messaging.scm)? > > OK. > > I replaced ‘(wait-for-file …)’ and a comment with: > --8<---------------cut here---------------start------------->8--- > ;; Check Dovecot service's PID. > (test-assert "service process id" > (let ((pid > (number->string (wait-for-file "/var/run/dovecot/master.pid" > marionette)))) > (marionette-eval `(file-exists? (string-append "/proc/" ,pid)) > marionette))) > --8<---------------cut here---------------end--------------->8--- Cool, thank you! > […] > >>> + (match (scandir TESTBOX/new) >>> + ((cwd .. message-file) >> >> You need to use double quotes, like ("." ".." message-file) I believe. > > It works. Thank you! > > […] > > I think it's ready for a push to ‘origin/master’. WDYT? Sure, you can push to master :-)