Autopkgtest failure with HTTP proxy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libwww-mechanize-shell-perl (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hello,
Autopktest is failing for libwww-
Since it is a reverse dependency of libwww-perl, the latter is blocked on proposed migration (jammy).
https:/
The tests that fail are meant to execute HTTP queries to the loopback interface, for instance:
# get http://[::1]:49619/
[...]
not ok 1 - Request without credentials gives 401
# Failed test 'Request without credentials gives 401'
# at t/13-command-au.t line 39.
# got: '503'
# expected: '401'
# Page location : http://[::1]:49619/
# get http://[::1]:49619/
not ok 2 - Wrong password still results in a 401
The issue seems to be caused by the HTTP proxy that is passed in the environment when running autopkgtest. Although we define a no_proxy variable that includes some of the addresses/hostnames of the loopback interface, it does not contain the IPv6 loopback address i.e., ::1 being used here.
no_proxy=
Debian does not have the issue. They seem to run autopkgtest without a proxy.
Some of the tests from the upstream include the following directive, which unsets the HTTP proxy variables when running the tests:
delete @ENV{qw(HTTP_PROXY http_proxy CGI_HTTP_PROXY)};
The tests that fail don't have this directive. I suggest to add the directive for all tests that query a local HTTP server.
Thanks,
Olivier
Attaching debdiff.
The patch unsets the HTTP-proxy related variables for tests that use local HTTP server.
Test procedure run on my end mechanize- shell-perl jammy mechanize- shell-perl- 0.59/ \ built-binaries \ localhost: 1234 \ perl-build- deps FAIL non-zero exit status 1
Without the patch:
$ pull-lp-source --distro ubuntu --pull source libwww-
$ autopkgtest libwww-
--no-
--apt-pocket proposed \
--apt-upgrade \
--env=http_proxy=http://
-- schroot jammy-amd64
> autodep8-
With the patch: mechanize- shell-perl jammy mechanize- shell-perl- 0.59/ mechanize- shell-perl- 0.59/ \ built-binaries \ localhost: 1234 \ perl-build- deps PASS
$ pull-lp-source --distro ubuntu --pull source libwww-
$ debdiff-apply < 1-0.59-1.1.debdiff libwww-
$ autopkgtest libwww-
--no-
--apt-pocket proposed \
--apt-upgrade \
--env=http_proxy=http://
-- schroot jammy-amd64
> autodep8-
Thanks,
Olivier