unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Xinglu Chen <public@yoctocell.xyz>
Cc: 50874@debbugs.gnu.org
Subject: [bug#50874] [PATCH] lint: Check if HTTPS version of HTTP URL exists.
Date: Sun, 10 Oct 2021 15:12:43 +0200	[thread overview]
Message-ID: <87y271vx9w.fsf_-_@gnu.org> (raw)
In-Reply-To: <87v926ldvv.fsf@yoctocell.xyz> (Xinglu Chen's message of "Sat, 09 Oct 2021 11:57:08 +0200")

Hi!

Xinglu Chen <public@yoctocell.xyz> skribis:

> On Sat, Oct 02 2021, Ludovic Courtès wrote:
>
>> Hi,
>>
>> Xinglu Chen <public@yoctocell.xyz> skribis:
>>
>>> * guix/lint.scm (check-if-https-uri-exists?): New procedure.
>>> (check-home-page, check-source): Use it.
>>
>> Applied, thanks!
>
> Was it?  I don’t see it in the log.

Actually no.  :-)  I initially applied it, started replying, noticed
there was a problem, and then sent that inconsistent reply.

>>> I don’t really know how to test this while making it future-proof, any
>>> suggestions?
>>
>> I don’t know either, since we don’t have an easy way to spin up an HTTPS
>> server.  I think it’s okay to leave it as is, for lack of a better idea.
>>
>> However, this version of the patch leads to test failures in
>> tests/lint.scm (“Connection refused”).
>
> Thanks for catching this; I will look into it.  Good that you didn’t
> apply it then.  :-)

Here’s what I see (among others):

--8<---------------cut here---------------start------------->8---
test-name: home-page: 200
location: /home/ludo/src/guix/tests/lint.scm:650
source:
+ (test-equal
+   "home-page: 200"
+   '()
+   (with-http-server
+     `((200 ,%long-string))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (home-page (%local-url)))))
+       (check-home-page pkg))))
expected-value: ()
actual-value: #f
actual-error:
+ (system-error
+   connect*
+   "~A"
+   ("Connection refused")
+   (111))
result: FAIL

[…]

test-name: source: 200
location: /home/ludo/src/guix/tests/lint.scm:917
source:
+ (test-equal
+   "source: 200"
+   '()
+   (with-http-server
+     `((200 ,%long-string))
+     (let ((pkg (package
+                  (inherit (dummy-package "x"))
+                  (source
+                    (origin
+                      (method url-fetch)
+                      (uri (%local-url))
+                      (sha256 %null-sha256))))))
+       (check-source pkg))))
expected-value: ()
actual-value: #f
actual-error:
+ (system-error
+   connect*
+   "~A"
+   ("Connection refused")
+   (111))
result: FAIL
--8<---------------cut here---------------end--------------->8---

I believe that’s because, in addition to (%local-url), ‘check-home-page’
& co. now try to connect on port 443 of the same host, and there’s
nothing listening to that port on my machine.

Ludo’.




      parent reply	other threads:[~2021-10-10 13:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 19:09 [bug#50874] [PATCH] lint: Check if HTTPS version of HTTP URL exists Xinglu Chen
2021-10-02 15:15 ` Ludovic Courtès
2021-10-09  9:57   ` Xinglu Chen
2021-10-09 10:11     ` Xinglu Chen
2021-10-10 13:12     ` Ludovic Courtès [this message]

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=87y271vx9w.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=50874@debbugs.gnu.org \
    --cc=public@yoctocell.xyz \
    /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).