qt-test-serverのインストール

Qtのネットワークモジュールのテストに必要なqt-test-serverをインストールする。

Qtをソースコードからビルドする際,make check実行時にQtのネットワーク関係モジュールのテストでqt-test-serverが必要になる。このサーバーが存在しない場合,make checkが確実に失敗する。

Qtは巨大で,クリティカルなライブラリーなので,できることならば,付属のテストは全て合格しておきたい。そのため,qt-test-serverをインストールし,Qtのネットワーク関係モジュールのテストの成功を目指した。

結果としては,多くのテストには成功したもののQNetworkReplayのテストを合格できなかった。それでも成果はあったので,記録として手順を記す。

情報

ネットワークテストに関しては,以下のページに情報がまとまっている。

Qt のネットワークテスト用のサーバーは,「qtqa/sysadmin.git」のリポジトリーで管理されていた。従来の方法では,puppetという構成管理ツールを使って,サーバーの設定を行うようだ。

しかし,既にやり方が古くなり,設置が簡単ではなかったので,最近はDockerを使った新しい設置方法が用意されているようだ。ただし,新しい方法もまだ完全には旧サーバーでのテストに対応しきれていない。

また,Dockerは管理者権限が必要そうなので,今回はDockerを使わない従来のやり方を挑戦する。

手順

qtqa/sysadmin.gitリポジトリーの「README.network_test_server.txt」の手順に従ってサーバーを用意する。URLやファイル名などが若干異なっているので注意する。

なお,確認は2019-07-05ののコミット時点のqtqa/sysadminリポジトリーを使った。

こちらのリポジトリーのbootstrapディレクトリーにOSごとの初期化スクリプトが格納されている。Ubuntuは10.04 (ubuntu1104_bootstrap.sh) と11.10のスクリプト (ubuntu1110_bootstrap.sh) が用意されている。

ただし,これらのbootstrap.sh内でapt-getでpuppetのインストールを試みているが,これらのOS (Ubuntu 10.04と11.10) ではバージョンが古すぎるせいか,APTでpuppetがインストールできなかった。そのため,Ubuntu 12.04を使う。VirtualBoxでUbuntu 12.04のVMを用意して,qt-test-serverを用意する。

ネットワーク接続は,VirutualBoxの設定 ([Settings]>[Network])からブリッジ接続 (Bridged Adapter) を選択した。

ホスト名

VMにUbuntu 12.04 (クライアント) をインストールする際に,ホスト名の入力時に,qt-test-serverを指定する。または,インストール後に,/etc/hostnameにqt-test-serverを記入する。手順ではユーザー名にqtが推奨されているが,こちらは何でも大丈夫だ。

クライアントの/etc/hostname
qt-test-server

また,/etc/hostsにもqt-test-serverを以下のように記載する。

クライアントの/etc/hosts
# HEADER: This file was autogenerated at Mon Jul 15 01:00:49 +0900 2019
# HEADER: by puppet.  While it can still be managed manually, it
# HEADER: is definitely not recommended.
127.0.0.1       localhost
127.0.1.1       qt-test-server

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost   ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1       localhost.localdomain   localhost

クライアントのホスト名を設定したら,ホスト名で参照できるように,ホストマシンにもqt-test-serverのIPアドレスとホスト名を記入する。クライアントのIPアドレスは,ifconfigのeth0の [inet addr:] を指定すればよい。

ホストの/etc/hosts
127.0.0.1       localhost
127.0.1.1       TP-E440
192.168.42.174  qt-test-server qt-test-server.qt-test-net

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

なお,詳細不明だが,ホストの/etc/hostsに記入した192.168.42.174 qt-test-server qt-test-server.qt-test-netが,クライアントの/etc/hostsの末尾に勝手に追記されるようだ。

bootstrap.shの実行

ホスト名の設定後,クライアントのUbuntu 12.04にログインし,以下のコマンドでqtqa/syadmin.gitリポジトリーから,bootstrap.shをダウンロードして実行する。READMEのURL (git://qt.gitorious.org/qtqa/sysadmin.git) は古いため,最新のリポジトリーのURL (git://code.qt.io/qtqa/sysadmin.git) に変更しているので注意する。

wget https://code.qt.io/cgit/qtqa/sysadmin.git/plain/bootstrap/ubuntu1110_bootstrap.sh &&
sudo sh ./ubuntu1110_bootstrap.sh git://code.qt.io/qtqa/sysadmin.git <<-EOT
git://code.qt.io 4 EOT

このスクリプトでは,APTでgitとpuppetをインストールし,/var/qtqaにsysadmin.gitリポジトリーをクローンして,最後に/var/qtqa/sysadmin/puppet/sync_and_run.plを実行している。実行ログは/var/log/syslogに出力される。以下のコマンドでログを確認しておくとよいだろう。

tail -f /var/log/syslog

ただし,sync_and_run.plはスクリプトの情報が古いため確実にエラーとなる。bootstrap.sh実行後に,修正して再度実行する。

bootstrap.sh内のnodecfg.plの実行中に,7箇所の入力を要求される。上記スクリプトのインストールコマンドではヒアドキュメントで事前に必要な情報を入力している。参考までに,質問内容を以下に掲載しておく。

nodecfg.pl --interactiveの問い合わせ内容
Configuring this node...
+ /var/qtqa/sysadmin/puppet/nodecfg.pl -interactive
Configuring interactively.

This script will generate the following configuration file:

  /var/qtqa/sysadmin/puppet/nodecfg/10-config.yaml

The usage of this script is optional; it is intended to give a quick start
to configuring a machine for the most common use-cases.
It's fine to instead create the configuration by hand, or copy a file from
another machine, or skip this for now and come back later.

Press CTRL+C to abort this interactive process at any time.

Configuring global parameters

Location for CI machines.
The location variable is used to customize certain puppet configurations.

The location is typically something like: "Oslo", "Brisbane" or "Digia". 


  location [] ? 

Base URL of Qt's git repositories (git://qt.gitorious.org/). 
This will be used as the 'qtgitreadonly' alias for git 
operations while testing. 

The base URL will have Qt module names appended; for example: 
 "git://git.example.com/" => "git://git.example.com/qt/qtbase" 


  qtgitreadonly [git://qt.gitorious.org/] ? git://code.qt.io

Base HTTP URL where large files are hosted (tarballs etc) 
These files are all publicly available but you'll have to host them 
in your own mirror. 

The base HTTP URL can be for example: "http://replace-me.example.com/input". 


  input [] ? 

E-mail address where scripts run on this client node can send 
notifications in case of errors. 

The address can be for example: "nodes-in-ci@mail.com". 


  email [] ? 

SMTP server address which this client node can use to send e-mails. 

The address can be for example: "smtp.mail.com". 


  smtp [] ? 


Select which of the following best describes the purpose of this host:

  (1) bb_tester - BlackBery CI tester, performing Qt compilation and autotests
  (2) ci_server - Qt Project CI system server (Jenkins <-> Gerrit integration)
  (3) ci_tester - Qt Project CI tester, performing Qt compilation and autotests
  (4) network_test_server - Network test server, used for some QtNetwork autotests (qt-test-server.qt-test-net)
  (5) packaging_server - Qt Project packaging server
  (6) packaging_tester - Qt Project Packaging tester, performing Qt compilation and autotests

? 4

Configuring a node of class 'network_test_server'


Configuration completed:

  classes:
    network_test_server:
  
  
  parameters:
    email: ""
    input: ""
    location: ""
    qtgitreadonly: git://code.qt.io
    smtp: ""

Save (y/n) [y] ? 
Configuration saved to /var/qtqa/sysadmin/puppet/nodecfg/10-config.yaml.
To reconfigure, run: /var/qtqa/sysadmin/puppet/nodecfg.pl -interactive
+ echo Running puppet...
Running puppet...
+ /var/qtqa/sysadmin/puppet/sync_and_run.pl
Already up-to-date.
puppetapply--logdestsyslog--confdir/var/qtqa/sysadmin/puppet/var/qtqa/sysadmin/puppet/manifests/site.pp+ set +x
All done :-)

sync_and_run.plの修正

sync_and_run.plの実行により,必要なサーバー類をダウンロードして設定を行っている。ただし,リポジトリーの設定ファイルの情報が古く,パッケージのダウンロードに失敗する。

具体的には,コマンドの実行時に以下のエラーが出る。

puppetapply--logdestsyslog--confdir/var/qtqa/sysadmin/puppet/var/qtqa/sysadmin/puppet/manifests/site.ppFunction 'err' does not return a value at /var/qtqa/sysadmin/puppet/modules/network_test_server/manifests/linux/danted.pp:11 on node qt-test-server

その他,/var/log/syslogに以下のエラーが出る。

Jul 15 10:39:08 qt-test-server puppet-apply[8642]: (/Stage[main]/Network_test_server::Linux::Danted/Exec[fetch old dante-server]/returns) change from notrun to 0 failed: /usr/bin/wget -O /tmp/dante-server_1.1.14-2_amd64.deb http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/d/dante/dante-server_1.1.14-2_amd64.deb returned 8 instead of one of [0] at /var/qtqa/sysadmin/puppet/modules/network_test_server/manifests/linux/danted.pp:18
Jul 15 10:52:37 qt-test-server puppet-apply[10905]: (/Stage[main]/Network_test_server::Linux::Frox/Package[frox]/ensure) change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install frox' returned 100: Reading package lists...#012Building dependency tree...#012Reading state information...#012E: Unable to locate package frox

そのため,設定ファイルを修正する。修正内容は以下2点となる。

  1. mkpasswdコマンドはwhoisパッケージに含まれるため,パッケージ名を変更。
  2. dante-serverとfroxのパッケージ (.deb) のURLやアーキテクチャーが古かったので,修正。

以下のコマンドでパッチを当てることで,上記修正が完了となる。なお,VirtualBoxからの操作だと,コピーペーストできないので,sshで接続して実行するか,ローカルで修正したファイルをscpコマンドで転送して上書きするとよいだろう。

cd /var/qtqa/sysadmin
sudo patch -Np 1 <<-"EOP"
diff --git a/puppet/modules/network_test_server/manifests/linux.pp b/puppet/modules/network_test_server/manifests/linux.pp index 79a8419..78d7f1e 100644 --- a/puppet/modules/network_test_server/manifests/linux.pp +++ b/puppet/modules/network_test_server/manifests/linux.pp @@ -21,7 +21,7 @@ class network_test_server::linux { ensure => present, home => "/dev/null", password => mkpasswd('AtbhQrjz', 'password'), - require => Package["mkpasswd"], + require => Package["whois"], shell => "/bin/false", ; } @@ -39,7 +39,7 @@ class network_test_server::linux { package { - "mkpasswd": ensure => present; + "whois": ensure => present; } file { diff --git a/puppet/modules/network_test_server/manifests/linux/danted.pp b/puppet/modules/network_test_server/manifests/linux/danted.pp index b9aa037..aabda4b 100644 --- a/puppet/modules/network_test_server/manifests/linux/danted.pp +++ b/puppet/modules/network_test_server/manifests/linux/danted.pp @@ -8,12 +8,13 @@ class network_test_server::linux::danted { $dante_deb = $architecture ? { i386 => 'dante-server_1.1.14-2_i386.deb', x86_64 => 'dante-server_1.1.14-2_ia64.deb', + amd64 => 'dante-server_1.1.18-2.1_amd64.deb', default => err("architecture $architecture is not supported!"), } exec { "fetch old dante-server": creates => "/tmp/$dante_deb", - command => "/usr/bin/wget -O /tmp/$dante_deb http://snapshot.debian.org/archive/debian/20050312T000000Z/pool/main/d/dante/$dante_deb", + command => "/usr/bin/wget -O /tmp/$dante_deb http://snapshot.debian.org/archive/debian/20071201T000000Z/pool/main/d/dante/$dante_deb", } package { "dante-server": diff --git a/puppet/modules/network_test_server/manifests/linux/frox.pp b/puppet/modules/network_test_server/manifests/linux/frox.pp index 12564a9..707ce96 100644 --- a/puppet/modules/network_test_server/manifests/linux/frox.pp +++ b/puppet/modules/network_test_server/manifests/linux/frox.pp @@ -1,7 +1,35 @@ class network_test_server::linux::frox { - package { - "frox": ensure => present; + if $::operatingsystem == "Ubuntu" { + # FIXME: tests were written against this ancient frox, + # and they now fail against current versions. + # For compatibility with the pre-puppet test server, we'll use this + # old version too, but the tests should really be fixed. + $frox_deb = $architecture ? { + i386 => 'frox_1.1.14-2_i386.deb', + x86_64 => 'frox_1.1.14-2_ia64.deb', + amd64 => 'frox_0.7.18-3_amd64.deb', + default => err("architecture $architecture is not supported!"), + } + + exec { "fetch old frox": + creates => "/tmp/$frox_deb", + command => "/usr/bin/wget -O /tmp/$frox_deb http://snapshot.debian.org/archive/debian/20071201T000000Z/pool/main/f/frox/$frox_deb", + } + + package { "frox": + provider => dpkg, + ensure => latest, + source => "/tmp/$frox_deb", + # require => [ Exec["fetch old frox"], File["/etc/init.d/danted-authenticating"] ], + } + } + else { + # Note: OS other than Ubuntu are also likely to hit the above issue. + # Fix it as needed. + package { "frox": + ensure => present, + } } service { diff --git a/puppet/modules/network_test_server/manifests/linux/vsftpd.pp b/puppet/modules/network_test_server/manifests/linux/vsftpd.pp index 6632f1a..2b91407 100644 --- a/puppet/modules/network_test_server/manifests/linux/vsftpd.pp +++ b/puppet/modules/network_test_server/manifests/linux/vsftpd.pp @@ -22,7 +22,7 @@ class network_test_server::linux::vsftpd { "ftptest": ensure => present, home => "/home/qt-test-server/ftp", - require => [ Package["mkpasswd"], Package["vsftpd"] ], + require => [ Package["whois"], Package["vsftpd"] ], password => mkpasswd('OfmgZrrC', 'password'), ; }
EOP

上記コマンドで設定ファイルを修正後,以下のコマンドを実行して,必要なサーバー類をインストールする。

sudo /var/qtqa/sysadmin/puppet/sync_and_run.pl

実行後に/var/log/syslogにエラーが出ていないことを確認しておく。

コマンドの実行が完了したら,sudo rebootでマシンを再起動する。これでqt-test-serverのインストールは完了となる。

なお,READMEによれば,crontabにも勝手に登録してくれるらしいのだが,されていなかった。ただし,マシンの起動時に勝手にサーバーも起動されているので大丈夫だろう。

万が一,サーバーが起動していなかったら,sync_and_run.plを実行しておけばよい。

make checkの確認

サーバーを用意できたので,Qt5本体のネットワーク関係のテストが通ることを確認する。~/.local/src/qt5にリポジトリーをダウンロードしたQt 5.12.4で確認した。

networkselftest

READMEではnetworkselftestが100 %成功することを確認するようにあるので,こちらを確認する。

以下のコマンドでテストを実行する。

cd ~/.local/src/qt5/qtbase/tests/auto/other/networkselftest
make check

8件のテストが失敗していた。

/home/senooken/.local/src/qt5/qtbase/tests/auto/other/networkselftest/target_wrapper.sh  ./tst_networkselftest 
********* Start testing of tst_NetworkSelfTest *********
Config: Using QtTest library 5.12.4, Qt 5.12.4 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 7.4.0)

FAIL! : tst_NetworkSelfTest::remotePortsOpen(http-proxy-auth-ntlm) Error connecting to server on port 3130: Connection refused FAIL! : tst_NetworkSelfTest::remotePortsOpen(socks5-proxy) Error connecting to server on port 1080: Connection refused FAIL! : tst_NetworkSelfTest::ftpServer() 'received == it->data' returned FALSE. (Did not receive expected data in step 7: data received was: FAIL! : tst_NetworkSelfTest::ftpProxyServer() 'received == it->data' returned FALSE. (Did not receive expected data in step 7: data received was: FAIL! : tst_NetworkSelfTest::httpProxy() 'received == it->data' returned FALSE. (Did not receive expected data in step 24: data received was: FAIL! : tst_NetworkSelfTest::httpProxyNtlmAuth() 'socket.waitForConnected(10000)' returned FALSE. (Failed to connect to server in step 0: Connection refused) FAIL! : tst_NetworkSelfTest::socks5Proxy() 'socket.waitForConnected(10000)' returned FALSE. (Failed to connect to server in step 0: Connection refused) FAIL! : tst_NetworkSelfTest::socks5ProxyAuth() 'received == it->data' returned FALSE. (Did not receive expected data in step 17: data received was:
Totals: 38 passed, 8 failed, 1 skipped, 0 blacklisted, 231ms ********* Finished testing of tst_NetworkSelfTest *********

ただ,失敗した原因がわからない。

ネットワークモジュール

networkselftestは失敗したものの原因がわからない。しかたないので本体のネットワークモジュールの結果も確認する。

cd ~/.local/src/qt5/qtbase/tests/auto/network
make check

qt-test-serverを設置していない場合,QHttpNetworkConnectionのテストが以下のように失敗していた。これが通るようになった。

make[6]: Entering directory '/home/senooken/.local/src/qt5/qtbase/tests/auto/network/access/qhttpnetworkconnection'
/home/senooken/.local/src/qt5/qtbase/tests/auto/network/access/qhttpnetworkconnection/target_wrapper.sh  ./tst_qhttpnetworkconnection 
********* Start testing of tst_QHttpNetworkConnection *********
Config: Using QtTest library 5.12.4, Qt 5.12.4 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 7.4.0)
QWARN  : tst_QHttpNetworkConnection::initTestCase() Could not lookup "qt-test-server.qt-test-net"
QWARN  : tst_QHttpNetworkConnection::initTestCase() Please configure the test environment!
QWARN  : tst_QHttpNetworkConnection::initTestCase() See /etc/hosts or network-settings.h
FAIL!  : tst_QHttpNetworkConnection::initTestCase() 'QtNetworkSettings::verifyTestNetworkSettings()' returned FALSE. ()
   Loc: [tst_qhttpnetworkconnection.cpp(104)]
PASS   : tst_QHttpNetworkConnection::cleanupTestCase()
Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 12ms
********* Finished testing of tst_QHttpNetworkConnection *********
make[6]: *** [Makefile:639: check] Error 1
make[6]: Leaving directory '/home/senooken/.local/src/qt5/qtbase/tests/auto/network/access/qhttpnetworkconnection'

qt-test-serverの設置の効果はあったようだ。しかし,QNetWorkReplyでのみテストが92件失敗している。失敗した項目のログを以下に列挙する。

cd .. && /home/senooken/.local/src/qt5/qtbase/tests/auto/network/access/qnetworkreply/test/target_wrapper.sh  ./tst_qnetworkreply 
********* Start testing of tst_QNetworkReply *********
Config: Using QtTest library 5.12.4, Qt 5.12.4 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 7.4.0)

FAIL! : tst_QNetworkReply::getFromFtp(rfc3252.txt) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::getFromFtp(bigfile) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::getFromFtpAfterError() Compared values are not the same FAIL! : tst_QNetworkReply::getErrors(ftp-file-not-readable) Compared values are not the same FAIL! : tst_QNetworkReply::getErrors(ftp-exist) Compared values are not the same FAIL! : tst_QNetworkReply::headFromHttp(rfc+socks) Request failed: Connection to proxy refused FAIL! : tst_QNetworkReply::headFromHttp(bigfile+socks) Request failed: Connection to proxy refused FAIL! : tst_QNetworkReply::headFromHttp(index+socks) Request failed: Connection to proxy refused FAIL! : tst_QNetworkReply::headFromHttp(with-authentication+socks) Request failed: Connection to proxy refused FAIL! : tst_QNetworkReply::headFromHttp(cgi+socks) Request failed: Connection to proxy refused FAIL! : tst_QNetworkReply::putToFtp(empty) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::putToFtp(generic) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::putToFtp(small) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::putToFtp(with-nul) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::putToFtp(4k+1) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::putToFtp(128k+1) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::putToFtp(2MB+1) Request failed: Logging in to qt-test-server.qt-test-net failed: authentication required FAIL! : tst_QNetworkReply::putToHttps(empty) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttps(generic) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttps(small) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttps(with-nul) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttps(4k+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttps(128k+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttps(2MB+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttpsSynchronous(empty) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttpsSynchronous(generic) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttpsSynchronous(small) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttpsSynchronous(with-nul) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttpsSynchronous(4k+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttpsSynchronous(128k+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::putToHttpsSynchronous(2MB+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttps(empty) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttps(generic) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttps(small) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttps(with-nul) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttps(4k+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttps(128k+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttps(2MB+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsSynchronous(empty) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsSynchronous(generic) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsSynchronous(small) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsSynchronous(with-nul) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsSynchronous(4k+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsSynchronous(128k+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsSynchronous(2MB+1) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(empty) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(empty-related) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(empty-alternative) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(text) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(text-custom) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(text-text) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(text-text-text) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(image) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(text-image-image) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(3-images) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::postToHttpsMultipart(image-as-content) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::ioGetFromFtp(bigfile) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("ftp://qt-test-server.qt-test-net/qtest/bigfile") failed: # QNetworkReply::AuthenticationRequiredError "Logging in to qt-test-server.qt-test-net failed: authentication required" ) FAIL! : tst_QNetworkReply::ioGetFromFtp(rfc3252.txt) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("ftp://qt-test-server.qt-test-net/qtest/rfc3252.txt") failed: # QNetworkReply::AuthenticationRequiredError "Logging in to qt-test-server.qt-test-net failed: authentication required" ) FAIL! : tst_QNetworkReply::ioGetFromFtpWithReuse() Compared values are not the same FAIL! : tst_QNetworkReply::ioGetFromHttpWithSocksProxy() 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/rfc3252.txt") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioGetWithManyProxies(ftp-on-ftp) Compared values are not the same FAIL! : tst_QNetworkReply::ioGetWithManyProxies(ftp-on-http+ftp) Compared values are not the same FAIL! : tst_QNetworkReply::ioPutToFtpFromFile(empty) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("ftp://qt-test-server.qt-test-net/qtest/upload/qnetworkaccess-ioPutToFtpFromFile-empty-55457191-14326-3131046887") failed: # QNetworkReply::AuthenticationRequiredError "Logging in to qt-test-server.qt-test-net failed: authentication required" ) FAIL! : tst_QNetworkReply::ioPutToFtpFromFile(real-file) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("ftp://qt-test-server.qt-test-net/qtest/upload/qnetworkaccess-ioPutToFtpFromFile-real-file-55457191-14326-3131046887") failed: # QNetworkReply::AuthenticationRequiredError "Logging in to qt-test-server.qt-test-net failed: authentication required" ) FAIL! : tst_QNetworkReply::ioPutToFtpFromFile(resource) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("ftp://qt-test-server.qt-test-net/qtest/upload/qnetworkaccess-ioPutToFtpFromFile-resource-55457191-14326-3131046887") failed: # QNetworkReply::AuthenticationRequiredError "Logging in to qt-test-server.qt-test-net failed: authentication required" ) FAIL! : tst_QNetworkReply::ioPutToFtpFromFile(search-path) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("ftp://qt-test-server.qt-test-net/qtest/upload/qnetworkaccess-ioPutToFtpFromFile-search-path-55457191-14326-3131046887") failed: # QNetworkReply::AuthenticationRequiredError "Logging in to qt-test-server.qt-test-net failed: authentication required" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(empty+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(generic+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(small+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(with-nul+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(4k+1+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(128k+1+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(empty+auth+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/protected/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(generic+auth+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/protected/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(small+auth+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/protected/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(with-nul+auth+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/protected/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(4k+1+auth+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/protected/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ioPostToHttpFromSocket(128k+1+auth+socks) 'waitForFinish(reply) == Success' returned FALSE. (QUrl("http://qt-test-server.qt-test-net/qtest/protected/cgi-bin/md5sum.cgi") failed: # QNetworkReply::UnknownNetworkError "Connection to proxy refused" ) FAIL! : tst_QNetworkReply::ignoreSslErrorsList(allErrorsInExpectedList1) Compared values are not the same FAIL! : tst_QNetworkReply::ignoreSslErrorsList(allErrorsInExpectedList2) Compared values are not the same FAIL! : tst_QNetworkReply::ignoreSslErrorsListWithSlot(allErrorsInExpectedList1) Compared values are not the same FAIL! : tst_QNetworkReply::ignoreSslErrorsListWithSlot(allErrorsInExpectedList2) Compared values are not the same FAIL! : tst_QNetworkReply::sslConfiguration(set-root-cert) Compared values are not the same FAIL! : tst_QNetworkReply::sslConfiguration(secure) Compared values are not the same FAIL! : tst_QNetworkReply::synchronousRequest(https) Request failed: SSL handshake failed FAIL! : tst_QNetworkReply::authenticationCacheAfterCancel(http+socks) Compared values are not the same FAIL! : tst_QNetworkReply::authenticationCacheAfterCancel(https+socks) Compared values are not the same FAIL! : tst_QNetworkReply::closeDuringDownload(ftp) 'readyReadSpy.wait(10000)' returned FALSE. () FAIL! : tst_QNetworkReply::backgroundRequest(ftp, fg, normal) Compared values are not the same FAIL! : tst_QNetworkReply::backgroundRequest(ftp, bg, normal) Compared values are not the same FAIL! : tst_QNetworkReply::backgroundRequest(ftp, fg, nobg) Compared values are not the same FAIL! : tst_QNetworkReply::backgroundRequestInterruption(ftp, fg, nobg) '(spy.count() > 0)' returned FALSE. ()
Totals: 552 passed, 92 failed, 28 skipped, 35 blacklisted, 207440ms ********* Finished testing of tst_QNetworkReply *********

FTPやSSLの認証周りで失敗しているように見える。qt-test-serverのsyslogをみるとこんなのがたくさん出ていた。

Jul 15 11:37:59 qt-test-server named[1007]: error (no valid KEY) resolving './DNSKEY/IN': 193.0.14.129#53

しかし,結局原因はわからなかった。

結論

Qt本体のソースコードからのビルド時のmake checkでqt-test-serverが必要だったので,サーバーを設置した。

サーバー設置により,今まで失敗していたテストが通るようになったものの,QNetworkReplyのテストは結局通らなかった。

サーバーの設置が不十分なのかもしれない。qtqa/sysadminリポジトリーはあまりメインテナンスされておらず,Dockerを使った新しいサーバーの設置方法も存在している。Dockerはあまり詳しくなかったので,従来のやり方で挑戦したのがいけなかったのかもしれない。

これが現在の自分の知識の範囲だ。これ以上取り組んでも今は効果が出ないので,この件はここまで取り組んだ情報を記して一旦保留する。今後Dockerやネットワーク関係の知識が増えたら再挑戦したい。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です