unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Vagrant Cascadian <vagrant@debian.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 44626@debbugs.gnu.org
Subject: bug#44626: tests/build-utils, tests/guix-system: fail when build path contains "~"
Date: Mon, 16 Nov 2020 19:26:53 -0800	[thread overview]
Message-ID: <87zh3gr7cy.fsf@yucca> (raw)
In-Reply-To: <87pn4dy0od.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 5681 bytes --]

On 2020-11-16, Ludovic Courtès wrote:
> Vagrant Cascadian <vagrant@debian.org> skribis:
>
>> When building from a build path containing a "~", such as:
>>
>>   /build/guix-1WL3Dl/guix-1.2.0~rc1/
>>
>> tests/build-utils.scm and tests/guix-system.sh both fail.
>
> [...]
>
>> FAIL: tests/build-utils
>> =======================
>> ...
>> test-name: wrap-script, simple case
>> location: /<<PKGBUILDDIR>>/tests/build-utils.scm:152
>> source:
>> + (test-equal
>> +   "wrap-script, simple case"
>
> […]
>
>> + make_user_config users wheel
>> + cat
>> + guix system build t-guix-system-6249 -n
>> accepted connection from pid 6454, user vagrant
>> guix system: error: invalid character `~' in name `shepherd-file-system--build-guix-1WL3Dl-guix-1.2.0~rc1-test-tmp-store.scm-builder'
>
> I believe both are fixed by 977eb5d023cfdf8e336f1896480eea9cef5c04e9.

Thanks for the quick fix! That seems to fix tests/guix-system.sh...

Though may introduce a different issue in tests/build-utils.log:

...
test-name: wrap-script, simple case
location: /build/guix-41NMGX/guix-1.2.0~rc1/tests/build-utils.scm:152
source:
+ (test-equal
+   "wrap-script, simple case"
+   (string-append
+     (format
+       #f
+       "#!~a --no-auto-compile\n#!#; Guix wrapper\n#\\-~s\n#\\-~s\n"
+       (which "guile")
+       '(begin
+          (let ((current (getenv "GUIX_FOO")))
+            (setenv
+              "GUIX_FOO"
+              (if current
+                (string-append
+                  "/some/path:/some/other/path"
+                  ":"
+                  current)
+                "/some/path:/some/other/path"))))
+       '(let ((cl (command-line)))
+          (apply execl
+                 "/anything/cabbage-bash-1.2.3/bin/sh"
+                 (car cl)
+                 (cons (car cl) (append '("") cl)))))
+     script-contents)
+   (call-with-temporary-directory
+     (lambda (directory)
+       (let ((script-file-name
+               (string-append directory "/foo")))
+         (call-with-output-file
+           script-file-name
+           (lambda (port) (display script-contents port)))
+         (chmod script-file-name 511)
+         (wrap-script
+           script-file-name
+           `("GUIX_FOO"
+             prefix
+             ("/some/path" "/some/other/path")))
+         (let ((str (call-with-input-file
+                      script-file-name
+                      get-string-all)))
+           (with-directory-excursion
+             directory
+             (delete-file "foo"))
+           str)))))
FORMAT: INTERNAL ERROR IN FORMAT-ERROR!
        destination: #<input-output:
        /tmp/guix-directory.YrSRbV/foo.3efcPU 8>
        format string: "#!/build/guix-41NMGX/guix-1.2.0~rc1/guile
        --no-auto-compile\n#!#; Guix wrapper\n#\\-(begin (let ((current
        (getenv \"GUIX_FOO\"))) (setenv \"GUIX_FOO\" (if current
        (string-append \"/some/path:/some/other/path\" \":\" current)
        \"/some/path:/some/other/path\"))))\n#\\-(let ((cl
        (command-line))) (apply execl
        \"/anything/cabbage-bash-1.2.3/bin/sh\" (car cl) (cons (car cl)
        (append (quote (\"\")) cl))))\n"
        format args: ()
        error args:  (#f "error in format" () #f)
FORMAT: INTERNAL ERROR IN FORMAT-ERROR!
        destination: #<input-output:
        /tmp/guix-directory.YrSRbV/foo.3efcPU 8>
        format string: "#!/build/guix-41NMGX/guix-1.2.0~rc1/guile
        --no-auto-compile\n#!#; Guix wrapper\n#\\-(begin (let ((current
        (getenv \"GUIX_FOO\"))) (setenv \"GUIX_FOO\" (if current
        (string-append \"/some/path:/some/other/path\" \":\" current)
        \"/some/path:/some/other/path\"))))\n#\\-(let ((cl
        (command-line))) (apply execl
        \"/anything/cabbage-bash-1.2.3/bin/sh\" (car cl) (cons (car cl)
        (append (quote (\"\")) cl))))\n"
        format args: ()
        error args:  (#<&wrap-error program:
        "/tmp/guix-directory.YrSRbV/foo" type: misc-error>)
expected-value: "#!/build/guix-41NMGX/guix-1.2.0~rc1/guile
--no-auto-compile\n#!#; Guix wrapper\n#\\-(begin (let ((current (getenv
\"GUIX_FOO\"))) (setenv \"GUIX_FOO\" (if current (string-append
\"/some/path:/some/other/path\" \":\" current)
\"/some/path:/some/other/path\"))))\n#\\-(let ((cl (command-line)))
(apply execl \"/anything/cabbage-bash-1.2.3/bin/sh\" (car cl) (cons (car
cl) (append (quote (\"\"))
cl))))\n#!/anything/cabbage-bash-1.2.3/bin/sh\n\necho hello world"
actual-value: #f
actual-error:
+ (%exception
+   #<&wrap-error program: "/tmp/guix-directory.YrSRbV/foo" type:
misc-error>)
result: FAIL

test-name: wrap-script, with encoding declaration
...
result: PASS

test-name: wrap-script, raises condition
...
result: PASS


FORMAT: error with call: (format #<input-output:
/tmp/guix-directory.YrSRbV/foo.3efcPU 8>
"#!/build/guix-41NMGX/guix-1.2.0~r<===c1/guile --no-auto-compile
#!#; Guix wrapper
#\-(begin (let ((current (getenv "GUIX_FOO"))) (setenv "GUIX_FOO" (if
current (string-append "/some/path:/some/other/path" ":" current)
"/some/path:/some/other/path"))))
#\-(let ((cl (command-line))) (apply execl
"/anything/cabbage-bash-1.2.3/bin/sh" (car cl) (cons (car cl) (append
(quote ("")) cl))))
" ===>)
        missing argument(s)
wrap-script: /tmp/guix-directory.YrSRbV/foo: error: misc-error (#f
"error in format" () #f)


Not sure what test or where in the code that last error is coming
from...

Because I've added so many network-reachable/test-skip patches, it is
*possible* that it is something I've broken...


Thanks!


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2020-11-17  3:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14  1:58 bug#44626: tests/build-utils, tests/guix-system: fail when build path contains "~" Vagrant Cascadian
2020-11-16 11:57 ` Ludovic Courtès
2020-11-17  3:26   ` Vagrant Cascadian [this message]
2020-11-17 14:29     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zh3gr7cy.fsf@yucca \
    --to=vagrant@debian.org \
    --cc=44626@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).