From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#18935: gexp->derivation test failure Date: Tue, 04 Nov 2014 21:20:08 +0100 Message-ID: <8761euafbb.fsf@gnu.org> References: <87h9yg704p.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlkaI-00064i-Tq for bug-guix@gnu.org; Tue, 04 Nov 2014 15:20:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlkaB-00019V-ID for bug-guix@gnu.org; Tue, 04 Nov 2014 15:20:10 -0500 Received: from debbugs.gnu.org ([140.186.70.43]:52010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlkaB-00019D-G0 for bug-guix@gnu.org; Tue, 04 Nov 2014 15:20:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XlkaA-000428-SV for bug-guix@gnu.org; Tue, 04 Nov 2014 15:20:03 -0500 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87h9yg704p.fsf@netris.org> (Mark H. Weaver's message of "Mon, 03 Nov 2014 10:51:50 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: 18935-done@debbugs.gnu.org Mark H Weaver skribis: > Test begin: > test-name: "gexp->derivation" > source-file: "tests/gexp.scm" > source-line: 227 > source-form: (test-assert "gexp->derivation" (run-with-store %store (ml= et* %store-monad ((file (text-file "foo" "Hello, world!")) (exp -> (gexp (b= egin (mkdir (ungexp output)) (chdir (ungexp output)) (symlink (string-appen= d (ungexp %bootstrap-guile) "/bin/guile") "foo") (symlink (ungexp file) (un= gexp output "2nd"))))) (drv (gexp->derivation "foo" exp)) (out -> (derivati= on->output-path drv)) (out2 -> (derivation->output-path drv "2nd")) (done (= built-derivations (list drv))) (refs ((store-lift references) out)) (refs2 = ((store-lift references) out2)) (guile (package-file %bootstrap-guile "bin/= guile"))) (return (and (string=3D? (readlink (string-append out "/foo")) gu= ile) (string=3D? (readlink out2) file) (equal? refs (list (dirname (dirname= guile)))) (equal? refs2 (list file))))) #:guile-for-build (%guile-for-buil= d))) > Test end: > result-kind: fail > actual-value: #f > actual-error: (srfi-34 #) This can only happen if FILE in that test were deleted after its creation and before the =E2=80=98gexp-derivation=E2=80=99... which cannot = even happen since FILE remains live for the duration of the =E2=80=98%store=E2=80=99 se= ssion... except if another daemon instance deletes it! Commit 834ea02 fixes that: it turns out that tests/nar.scm was creating the exact same store item, and then calling the GC to delete it. I=E2=80=99ll update the Guix snapshot in Guix. (In the meantime, chances a= re that you can just restart the build and won=E2=80=99t stumble upon this bug, which was unlikely to occur.) While looking at this code, I fixed a small issue with caches in 000c59b. Thanks, Ludo=E2=80=99.