Success! # TOTAL: 1 # PASS: 1 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0
I've attached the logs again, just in case. Thanks for looking into this! On Mon, Aug 24, 2015, at 18:07, Ludovic Courtès wrote: > Leo Famulari <l...@famulari.name> skribis: > > > On Thu, Aug 20, 2015, at 06:02, Ludovic Courtès wrote: > > [...] > > >> I suspect the ‘nlink’ count on directories work differently on btrfs, or > >> something like that. > > [...] > > > %%%% Starting test nar (Writing full log to "nar.log") > > > > ;;; (stat-output "./test-nar-7151" 1) > > tests/nar.scm:203: FAIL write-file + restore-file > > > > ;;; (stat-output "./test-nar-7151" 1) > > tests/nar.scm:220: FAIL write-file + restore-file with symlinks > > Indeed, that confirms what I thought. > > This looks like buggy or at least borderline behavior from Btrfs. > However, it seems that this ‘nlink’ test can be sidestepped altogether. > > Could you apply this last patch and run: > > make check TESTS=tests/nar.scm > > again? > > If it works for you, I’ll just apply it. > > Thanks! > > Ludo’. > > Email had 1 attachment: > + Attachment2 > 1k (text/x-patch)
%%%% Starting test nar Group begin: nar Test begin: test-name: "write-file supports non-file output ports" source-file: "tests/nar.scm" source-line: 165 source-form: (test-assert "write-file supports non-file output ports" (let ((input (string-append (dirname (search-path %load-path "guix.scm")) "/guix")) (output (%make-void-port "w"))) (write-file input output) #t)) Test end: result-kind: pass actual-value: #t Test begin: test-name: "write-file puts file in C locale collation order" source-file: "tests/nar.scm" source-line: 172 source-form: (test-equal "write-file puts file in C locale collation order" (base32 "0sfn5r63k88w9ls4hivnvscg82bqg8a0w7955l6xlk4g96jnb2z3") (let ((input (string-append %test-dir ".input"))) (dynamic-wind (lambda () (define (touch file) (call-with-output-file (string-append input "/" file) (const #t))) (mkdir input) (touch "B") (touch "Z") (touch "a") (symlink "B" (string-append input "/z"))) (lambda () (let-values (((port get-hash) (open-sha256-port))) (write-file input port) (get-hash))) (lambda () (rm-rf input))))) Test end: result-kind: pass actual-value: #vu8(227 139 101 165 73 143 76 218 13 45 37 29 14 20 122 120 9 244 152 222 118 71 72 52 77 28 161 57 76 46 214 105) expected-value: #vu8(227 139 101 165 73 143 76 218 13 45 37 29 14 20 122 120 9 244 152 222 118 71 72 52 77 28 161 57 76 46 214 105) Test begin: test-name: "restore-file with incomplete input" source-file: "tests/nar.scm" source-line: 193 source-form: (test-equal "restore-file with incomplete input" (string-append %test-dir "/foo") (let ((port (open-bytevector-input-port #vu8(1 2 3)))) (guard (c ((nar-error? c) (and (eq? port (nar-error-port c)) (nar-error-file c)))) (restore-file port (string-append %test-dir "/foo")) #f))) Test end: result-kind: pass actual-value: "./test-nar-27645/foo" expected-value: "./test-nar-27645/foo" Test begin: test-name: "write-file + restore-file" source-file: "tests/nar.scm" source-line: 202 source-form: (test-assert "write-file + restore-file" (let* ((input (string-append (dirname (search-path %load-path "guix.scm")) "/guix")) (output %test-dir) (nar (string-append output ".nar"))) (dynamic-wind (lambda () #t) (lambda () (call-with-output-file nar (cut write-file input <>)) (call-with-input-file nar (cut restore-file <> output)) (file-tree-equal? input output)) (lambda () (false-if-exception (delete-file nar)) (false-if-exception (rm-rf output)))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "write-file + restore-file with symlinks" source-file: "tests/nar.scm" source-line: 219 source-form: (test-assert "write-file + restore-file with symlinks" (let ((input (string-append %test-dir ".input"))) (mkdir input) (dynamic-wind (const #t) (lambda () (with-file-tree input (directory "root" (("reg") ("exe" 511) ("sym" -> "reg"))) (let* ((output %test-dir) (nar (string-append output ".nar"))) (dynamic-wind (lambda () #t) (lambda () (call-with-output-file nar (cut write-file input <>)) (call-with-input-file nar (cut restore-file <> output)) (file-tree-equal? input output)) (lambda () (false-if-exception (delete-file nar)) (false-if-exception (rm-rf output))))))) (lambda () (rmdir input))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "restore-file-set (signed, valid)" source-file: "tests/nar.scm" source-line: 251 source-form: (test-assert "restore-file-set (signed, valid)" (with-store store (let* ((texts (unfold (cut >= <> 10) (lambda _ (random-text)) #{1+}# 0)) (files (map (cut add-text-to-store store "text" <>) texts)) (dump (call-with-bytevector-output-port (cut export-paths store files <>)))) (delete-paths store files) (and (every (negate file-exists?) files) (let* ((source (open-bytevector-input-port dump)) (imported (restore-file-set source))) (and (equal? imported files) (every (lambda (file) (and (file-exists? file) (valid-path? store file))) files) (equal? texts (map (lambda (file) (call-with-input-file file get-string-all)) files)))))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "restore-file-set (missing signature)" source-file: "tests/nar.scm" source-line: 275 source-form: (test-assert "restore-file-set (missing signature)" (let/ec return (with-store store (let* ((file (add-text-to-store store "foo" (random-text))) (dump (call-with-bytevector-output-port (cute export-paths store (list file) <> #:sign? #f)))) (delete-paths store (list file)) (and (not (file-exists? file)) (let ((source (open-bytevector-input-port dump))) (guard (c ((nar-signature-error? c) (let ((message (condition-message c)) (port (nar-error-port c))) (return (and (string-match "lacks.*signature" message) (string=? file (nar-error-file c)) (eq? source port)))))) (restore-file-set source)) #f)))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "restore-file-set (corrupt)" source-file: "tests/nar.scm" source-line: 295 source-form: (test-assert "restore-file-set (corrupt)" (let/ec return (with-store store (let* ((file (add-text-to-store store "foo" (random-text))) (dump (call-with-bytevector-output-port (cute export-paths store (list file) <>)))) (delete-paths store (list file)) (let* ((index 120) (byte (bytevector-u8-ref dump index))) (bytevector-u8-set! dump index (logxor 255 byte))) (and (not (file-exists? file)) (let ((source (open-bytevector-input-port dump))) (guard (c ((nar-invalid-hash-error? c) (let ((message (condition-message c)) (port (nar-error-port c))) (return (and (string-contains message "hash") (string=? file (nar-error-file c)) (eq? source port)))))) (restore-file-set source)) #f)))))) Test end: result-kind: pass actual-value: #t Group end: nar # of expected passes 8
accepted connection from pid 27645, user leo random seed for tests: 1440533627 ;;; note: source file ./srfi/srfi-64.scm ;;; newer than compiled /gnu/store/4xqmz0zzkv1n09fqqckql2p8xv30hn1k-guile-2.0.11/lib/guile/2.0/ccache/srfi/srfi-64.go exporting path `/home/leo/work/guix/test-tmp/store/jax64vzybc0fihd1ial8c3pxfzpajjgb-text' exporting path `/home/leo/work/guix/test-tmp/store/xmp9h8gch8h99bdkk84jc3yaj3zyarg1-text' exporting path `/home/leo/work/guix/test-tmp/store/zqggfm0h42n27pgl2dbag4qak3925382-text' exporting path `/home/leo/work/guix/test-tmp/store/9ffbad3x4q7ahfywqi43zacsznckbi2c-text' exporting path `/home/leo/work/guix/test-tmp/store/w40l6fbgyx64rrpprp8h39s1sdrimr13-text' exporting path `/home/leo/work/guix/test-tmp/store/xamxgi30kn7w31imjxsczrp4943jp12f-text' exporting path `/home/leo/work/guix/test-tmp/store/ra03idj61qiihncdvhl7l0fsl0y46akh-text' exporting path `/home/leo/work/guix/test-tmp/store/wp6gjy73173v3w0qn8wajbphwlgr9qs1-text' exporting path `/home/leo/work/guix/test-tmp/store/bx5f5zwmhkxg0xp0i0kccmb4dg5j37ak-text' exporting path `/home/leo/work/guix/test-tmp/store/fyinvicz4lh94gl78byygf65afxyl1i6-text' finding garbage collector roots... ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/leo/work/guix/nix/scripts/list-runtime-roots ;;; compiled /home/leo/work/guix/test-tmp/var/27636/cache-27636/guile/ccache/2.0-LE-8-2.0/home/leo/work/guix/nix/scripts/list-runtime-roots.go removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/27636/temproots/27653' deleting `/home/leo/work/guix/test-tmp/store/9ffbad3x4q7ahfywqi43zacsznckbi2c-text' deleting `/home/leo/work/guix/test-tmp/store/bx5f5zwmhkxg0xp0i0kccmb4dg5j37ak-text' deleting `/home/leo/work/guix/test-tmp/store/fyinvicz4lh94gl78byygf65afxyl1i6-text' deleting `/home/leo/work/guix/test-tmp/store/jax64vzybc0fihd1ial8c3pxfzpajjgb-text' deleting `/home/leo/work/guix/test-tmp/store/ra03idj61qiihncdvhl7l0fsl0y46akh-text' deleting `/home/leo/work/guix/test-tmp/store/w40l6fbgyx64rrpprp8h39s1sdrimr13-text' deleting `/home/leo/work/guix/test-tmp/store/wp6gjy73173v3w0qn8wajbphwlgr9qs1-text' deleting `/home/leo/work/guix/test-tmp/store/xamxgi30kn7w31imjxsczrp4943jp12f-text' deleting `/home/leo/work/guix/test-tmp/store/xmp9h8gch8h99bdkk84jc3yaj3zyarg1-text' deleting `/home/leo/work/guix/test-tmp/store/zqggfm0h42n27pgl2dbag4qak3925382-text' deleting `/home/leo/work/guix/test-tmp/store/trash' deleting unused links... note: currently hard linking saves 20.39 MiB accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo importing file or directory '/home/leo/work/guix/test-tmp/store/jax64vzybc0fihd1ial8c3pxfzpajjgb-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/jax64vzybc0fihd1ial8c3pxfzpajjgb-text' importing file or directory '/home/leo/work/guix/test-tmp/store/xmp9h8gch8h99bdkk84jc3yaj3zyarg1-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/xmp9h8gch8h99bdkk84jc3yaj3zyarg1-text' importing file or directory '/home/leo/work/guix/test-tmp/store/zqggfm0h42n27pgl2dbag4qak3925382-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/zqggfm0h42n27pgl2dbag4qak3925382-text' importing file or directory '/home/leo/work/guix/test-tmp/store/9ffbad3x4q7ahfywqi43zacsznckbi2c-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/9ffbad3x4q7ahfywqi43zacsznckbi2c-text' importing file or directory '/home/leo/work/guix/test-tmp/store/w40l6fbgyx64rrpprp8h39s1sdrimr13-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/w40l6fbgyx64rrpprp8h39s1sdrimr13-text' importing file or directory '/home/leo/work/guix/test-tmp/store/xamxgi30kn7w31imjxsczrp4943jp12f-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/xamxgi30kn7w31imjxsczrp4943jp12f-text' importing file or directory '/home/leo/work/guix/test-tmp/store/ra03idj61qiihncdvhl7l0fsl0y46akh-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/ra03idj61qiihncdvhl7l0fsl0y46akh-text' importing file or directory '/home/leo/work/guix/test-tmp/store/wp6gjy73173v3w0qn8wajbphwlgr9qs1-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/wp6gjy73173v3w0qn8wajbphwlgr9qs1-text' importing file or directory '/home/leo/work/guix/test-tmp/store/bx5f5zwmhkxg0xp0i0kccmb4dg5j37ak-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/bx5f5zwmhkxg0xp0i0kccmb4dg5j37ak-text' importing file or directory '/home/leo/work/guix/test-tmp/store/fyinvicz4lh94gl78byygf65afxyl1i6-text'... found valid signature for '/home/leo/work/guix/test-tmp/store/fyinvicz4lh94gl78byygf65afxyl1i6-text' exporting path `/home/leo/work/guix/test-tmp/store/dm89mw9kdywkmc620wglby4ch4wjmjj1-foo' finding garbage collector roots... removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/27636/temproots/27743' deleting `/home/leo/work/guix/test-tmp/store/dm89mw9kdywkmc620wglby4ch4wjmjj1-foo' deleting `/home/leo/work/guix/test-tmp/store/trash' deleting unused links... note: currently hard linking saves 20.39 MiB accepted connection from pid 27645, user leo accepted connection from pid 27645, user leo importing file or directory '/home/leo/work/guix/test-tmp/store/dm89mw9kdywkmc620wglby4ch4wjmjj1-foo'... exporting path `/home/leo/work/guix/test-tmp/store/2ybiyij226pfb1rgb60dxn3pznnypcz5-foo' finding garbage collector roots... removing stale temporary roots file `/home/leo/work/guix/test-tmp/var/27636/temproots/27751' deleting `/home/leo/work/guix/test-tmp/store/2ybiyij226pfb1rgb60dxn3pznnypcz5-foo' deleting `/home/leo/work/guix/test-tmp/store/trash' deleting unused links... note: currently hard linking saves 20.39 MiB accepted connection from pid 27645, user leo importing file or directory '/home/leo/work/guix/test-tmp/store/2ybiyij226pfb1rgb60dxn3pznnypcz5-foo'... %%%% Starting test nar (Writing full log to "nar.log") # of expected passes 8 PASS tests/nar.scm (exit status: 0)