El 18/10/23 a las 00:56, Carles Pina i Estany escribió: > > 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
... AFAIU, there are network restrictions on salsa. Reaching HTTPS in the outside world should work. But I am not sure about ICMP. FWIW, this is probably overengineering, but it is also possible to use namespaces to avoid reaching INET, pinging from one namespace to the other. As example: https://salsa.debian.org/debian/isc-dhcp/-/blob/master/debian/tests/client-server Cheers! -- Santiago
signature.asc
Description: PGP signature