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

Re: How to get debian ci test passed for proxy application



Dear Antonio,

Thanks for your informative email!
With the upload last night, I confirm now the issue got solved [0].

[0] https://ci.debian.net/data/autopkgtest/unstable/amd64/s/shadowsocks-libev/20171212_175154/log.gz

On Tue, Dec 5, 2017 at 3:14 AM, Antonio Terceiro <terceiro@debian.org> wrote:
>
> You do not need anything Restrictions: to be able to start a daemon or
> listen on a local TCP port.

Thanks for your confirmation!
Now I removed the Restrictions for isolation-*.

> | $ ./tests/test.sh
> | running test:  python tests/test.py -c tests/aes.json
> |  2017-12-04 16:07:02 INFO: UDP relay enabled
> |  2017-12-04 16:07:02 INFO: initializing ciphers... aes-256-cfb
> |  2017-12-04 16:07:02 ERROR: bind: Address already in use
> |  2017-12-04 16:07:02 ERROR: bind() error
> |  2017-12-04 16:07:02 INFO: initializing ciphers... aes-256-cfb
> |  2017-12-04 16:07:02 INFO: listening at 127.0.0.1:1081
> |  2017-12-04 16:07:02 INFO: initializing ciphers... aes-256-cfb
> |  2017-12-04 16:07:02 INFO: UDP relay enabled
> |  2017-12-04 16:07:02 INFO: listening at 127.0.0.1:1082
>
>                                                     ^^^^
>
> | *   Trying 127.0.0.1...
> | * TCP_NODELAY set
> |   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
> |                                  Dload  Upload   Total   Spent    Left  Speed
> |   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* SOCKS5 communication to www.google.com:80
> |  2017-12-04 16:07:04 INFO: connect to www.google.com:80
> | * SOCKS5 request granted.
> | * Connected to 127.0.0.1 (127.0.0.1) port 1081 (#0)
>                                             ^^^^
> | > GET / HTTP/1.1
> | > Host: www.google.com
> | > User-Agent: curl/7.57.0
> | > Accept: */*
> | >
> |  2017-12-04 16:07:04 ERROR: remote_recv_cb_recv: Connection reset by peer
> | * Empty reply from server
> |   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
> | * Connection #0 to host 127.0.0.1 left intact
> | curl: (52) Empty reply from server
> |  2017-12-04 16:07:04 INFO: closed gracefully
> | test failed:  python tests/test.py -c tests/aes.json
>
> Why this happens? Because on autopkgtest, you assume the package is already
> *installed*. I assume the the daemon provided by the binary package is already
> listening to port 1081, so the test server starts on 1082.

Thanks for your hint!
Yes, previous failure on debci was because of installation of the
package, with the default config, so with the default port to open.

However the test opens both 1081 and 1082, which is expected.
The root cause is the application opens more than 1 port, and 8388 is
both listed in default config [1] and test config.
So here's the conflict.
After I add a patch [2] to change the port for the test from 8388 to
8389, now the test can be passed on debci [0].

[1] https://anonscm.debian.org/cgit/collab-maint/shadowsocks-libev.git/tree/debian/config.json
[2] https://anonscm.debian.org/cgit/collab-maint/shadowsocks-libev.git/tree/debian/patches/0001-Change-the-port-to-listen-from-8388-to-8389.patch

I'm happy that one more package is starting to enjoy the benefit of
continuous integration practice in debian.
It's really appreciated there's debci framework in debian.
Thanks for your work!

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1


Reply to: