summaryrefslogtreecommitdiffstats
path: root/tests/testserver/vsftpd
Commit message (Collapse)AuthorAgeFilesLines
* Network self-test: make it work with docker/containersTimur Pocheptsov2020-11-175-0/+5
| | | | | | | Fixes: QTBUG-87740 Pick-to: 5.15 Change-Id: Idfe73708784774188afd40048f81406aa720a554 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix the timing issue of QFtp tests when using Docker serversRyan Chu2019-05-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | Sometimes, it fails in tst_QFtp::proxy or tst_QFtp::activeMode under the stress test. It complains about "Network operation timed out" on vsftpd.test-net.qt.local. When this issue happens in tst_QFtp::proxy, it shows "USER-ERR reject: 172.18.0.5 (ForkLimit 40)" in the log of ftp-proxy. By default, the ftp-proxy only supports 40 incoming client connections per minute. To make the ftp-proxy more powerful, this change extends the limits from 40 to 2000. When this issue happens in tst_QFtp:activeMode, vsftpd shows 426 Failure writing network stream error. It is a known issue of vsftpd. A quick fix is turning use_sendfile off. Change-Id: Iad50469654041bf30f92ef00805034f0d4aa9c3f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Rework QFtp test and resolve the unresolved itemsRyan Chu2019-05-151-0/+4
| | | | | | | | | | | | The proxy_data() defined in tst_qftp.cpp expects five items (bigfile, nonASCII, rfc3252, rfc3252.txt, and upload) in the server folder (ftp/qtest). The file rfc3252 and nonASCII folder were missing. Change-Id: I995d6e254875ade22a1def53187077f1cc8d4c98 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Docker-based test servers for network-related Qt autotests on WindowsRyan Chu2019-01-231-0/+2
| | | | | | | | | | | | | There is no docker bridge on Windows. Docker document recommends using port mapping to connect to a container. The problem is that it causes a port conflict if the user is running a service that binds the same port on the host. This change applies the same solution of macOS to deploy the docker environment into VirtualBox and use the host network option. Task-number: QTQAINFRA-2294 Change-Id: Iedcb8daa39373f02adb59f02eae2775f02870c54 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix the timing issue of vsftpd during boot (probably invalid config)Ryan Chu2019-01-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This appears to be a timing issue of vsftpd's initial script (/etc/init.d/vsftpd). When starting the vsftpd service, the script uses a while loop to make sure that the vsftpd process has been created with the expected PID. The problem is that it should sleep if it can't grep the same PID via ps command. while [ ${n} -le 5 ] do _PID="$(if [ -e ...vsftpd.pid ]; then cat ...vsftpd.pid; fi)" if ! ps -C vsftpd | grep -qs "${_PID}" then break fi sleep 1 n=$(( $n + 1 )) done if ! ps -C vsftpd | grep -qs "${_PID}" then log_warning_msg "vsftpd failed - probably invalid config." exit 1 fi However, synchronization based on time is not working in general. This change will rewrite the while loop to an infinite loop and remove the exclamation symbol (!) from the if condition. Upgrading the version of vsftpd is not helpful here because vsftpd_3.0.3-11 (Ubuntu 18.10) didn't resolve it yet. Change-Id: I07382709c33bd9bab61fcea76ab7deca5f630084 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Docker-based test servers for network-related Qt autotests on macOSRyan Chu2018-10-181-1/+1
| | | | | | | | | | | | | There is no docker bridge on macOS. Docker document recommends using port mapping to connect to a container; but it causes a port conflict if the user is running a service that binds the same port on the host. An alternative solution is to deploy the docker environment into VirtualBox and use the host network option. Task-number: QTQAINFRA-2293 Change-Id: I05dc65c5f8b4be7a1b1874a4ec7c034cc68679ca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Docker-based test servers for network-related Qt autotestsRyan Chu2018-07-054-0/+199
The existing network test server has some limitations. Most notably, it is not accessible by every Qt developer. Also, some services don't allow simultaneous access, which causes flaky test results. Instead of centralizing all the services to one physical machine, the idea is to build up several dedicated servers inside separate Docker containers. 1. Create testserver.pri and integrate it into the make check command of Qt Test. 2. Define QT_TEST_SERVER flag for changing test parameters at compile time. Task-number: QTQAINFRA-1686 Change-Id: I0422ddb97eb8c11b4818771454851d19671253b1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io> Reviewed-by: Ryan Chu <ryan.chu@qt.io>