[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sponsorship request: python-ping3



Hi,

On 17 Oct 2023 at 22:42:27, Carles Pina i Estany wrote:

[...]

> >  2. Regarding testing, this package is a bit a mess. First you probably
> >     realized that you can't run tests at buildtime because a raw socket
> >     requires root privilege. I see you designed custom autopkgtest to
> 
> yep...
> 
> [...]
> 
> >     From there you have two options: the first one is to drop the
> >     Testsuite: field and keep the two tests you designed and call it a
> >     day, or you drop it and write a third test stanza in
> >     debian/tests/control with a shell script you'd also have to write
> >     that moves the tests to the tmp dir autopkgtest creates, puts
> >     localhost in /etc/hosts and then run tests. In that case you need
> >     to add pytest to the dependencies of this test stanza.
> 
> Sounds doable no problem, I'll try it this evening and see how it goes.

From doable to "I'm 99% sure that not possible". I cannot send pings
from autopkgtest in salsa with any software.

Side note: I remembered that when using "needs-internet": HTTP GET
requests (even using hostnames) works. This is my first package for
Debian, but I've used autopkgtest with needs-internet to run a sphinx
"linkcheck" and it was working correctly.

I've checked that no ICMP replies even using the standard ping binary
from iputils-ping:
-----
Test-Command: set +e ; ping -c 4 8.8.8.8 ; ping -c 4 example.com ; curl -s -I https://en.wikipedia.org ; curl -s -L https://en.wikipedia.org | head -5
Depends: python3-ping3, iputils-ping, curl
Restrictions: needs-root, needs-internet
Features: test-name=test-real-ping
-----
That's in:
https://salsa.debian.org/carlespina/python-ping3/-/blob/autopkgtest-connectivity/debian/tests/control

The output:
https://salsa.debian.org/carlespina/python-ping3/-/jobs/4822521#L213

4 packets transmitted, 0 received, 100% packet loss, time 3059ms
4 packets transmitted, 0 received, 100% packet loss, time 3079ms

Even more: I think that curl -I (--head) (HTTP HEAD) might not work? but
curl HTTP GET works. I'm not sure about the curl -I but I don't think it
is relevant for this discussion. Somewhere, I think, I had read
something that it implied that autopkgtest needs-internet was using a
proxy? I cannot find it anyway and ICMP seems that cannot be used.

So, for now, I've:
-Used wrap-and-soft (excellent!).
-Removed "set -e" in one of my Test-Commands: it's the default in
 autopkgtest (I discovered with the "pings..." and then documenation)
-Fixed a cosmetic line in d/tests/control (s/features/Features)
-Removed "Testsuite: autopkgtest-pkg-pybuild" from d/control because
 ICMP is not available anyway
-Ran dch -r to update the date
-"dput --force mentors python-ping3_4.0.4-1_amd64.changes"

I've also discovered that there are a few unit tests in upstream that do
not work. Some have an easy fix, I will do a MR of the fixes that I've
done for some of them (separately, in GitHub, not tonight).

> Your call.
> 
> Tell me when you're fine with your work and I'll upload.

To me, it can be uploaded :-)

Let me know if I need or can do anything else.

Thank you!

-- 
Carles Pina i Estany
https://carles.pina.cat

Attachment: signature.asc
Description: PGP signature


Reply to: