summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRyan Chu <ryan.chu@qt.io>2019-03-21 14:37:45 +0100
committerRyan Chu <ryan.chu@qt.io>2019-05-15 06:10:01 +0000
commit835d83b134c9cf2ff9553c5dbc65901ea3b33f05 (patch)
tree339b5124bf4438f22a770e707085945c32b1315c /tests
parenta7ed7c1230a16d4451b860e0b5f434f28235b3e5 (diff)
Fix the timing issue of QFtp tests when using Docker servers
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>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/testserver/ftp-proxy/ftp-proxy.sh4
-rw-r--r--tests/testserver/vsftpd/testdata/vsftpd.conf4
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/testserver/ftp-proxy/ftp-proxy.sh b/tests/testserver/ftp-proxy/ftp-proxy.sh
index 087a7b7bcc..e5b9631bbb 100755
--- a/tests/testserver/ftp-proxy/ftp-proxy.sh
+++ b/tests/testserver/ftp-proxy/ftp-proxy.sh
@@ -34,7 +34,9 @@ set -ex
# package ftp-proxy
# install configurations and test data
-sed -i 's/# AllowMagicUser\tno/AllowMagicUser\tyes/' /etc/proxy-suite/ftp-proxy.conf
+sed -i -e 's/# AllowMagicUser\tno/AllowMagicUser\tyes/' \
+ -e 's/# ForkLimit\t\t40/ForkLimit\t\t2000/' \
+ /etc/proxy-suite/ftp-proxy.conf
# enable service with installed configurations
ftp-proxy -d
diff --git a/tests/testserver/vsftpd/testdata/vsftpd.conf b/tests/testserver/vsftpd/testdata/vsftpd.conf
index 6bdb186c9f..e67cccefcc 100644
--- a/tests/testserver/vsftpd/testdata/vsftpd.conf
+++ b/tests/testserver/vsftpd/testdata/vsftpd.conf
@@ -101,6 +101,10 @@ userlist_enable=YES
listen=YES
tcp_wrappers=YES
+# An internal setting used for testing the relative benefit of using the
+# sendfile() system call on your platform.
+use_sendfile=NO
+
# Enabling SFTP
#ssl_enable=YES
#allow_anon_ssl=YES