Package: tinyssh Version: 20230101-1 Severity: minor Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu lunar ubuntu-patch X-Debbugs-Cc: sl...@ubuntu.com
Hello Jan, on slower testbeds (like ppc64el or s390x) we can sometimes observer flaky test failures, especially of "03exitcodes" and "04ftpd", that fail with a "Host key verification failed." message, e.g.: https://ci.debian.net/data/autopkgtest/testing/s390x/t/tinyssh/32945714/log.gz This is due to the test launching "tcpserver", which launches "tinysshd" and that one launches a subcommand (e.g. "ftpd") in the background. On slower testbeds (mostly s390x and ppc64el ) this chain of commands leads to flaky failures, due to the subcommand not being ready, when the test commands started execution. I fix that by introducing a small delay ("sleep 1") after launching "tcpserver", as done in the corresponding Python based testcase ("02handshake"). In Ubuntu, the attached patch was applied to achieve the following: * d/tests: Avoid flaky failures on slow testbeds Thanks for considering the patch. -- Lukas -- System Information: Debian Release: bookworm/sid APT prefers jammy-updates APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), (100, 'jammy-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.19.0-38-generic (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru tinyssh-20230101/debian/tests/03exitcodes tinyssh-20230101/debian/tests/03exitcodes --- tinyssh-20230101/debian/tests/03exitcodes 2023-01-01 09:33:58.000000000 +0100 +++ tinyssh-20230101/debian/tests/03exitcodes 2023-04-17 15:09:51.000000000 +0200 @@ -22,6 +22,9 @@ tinysshd-makekey -q sshkeydir tcpserver -HRDl0 127.0.0.1 10000 tinysshd -- sshkeydir 2>tinysshd.log & tcpserverpid=$! +# Give some extra time for tcpserver to start, +# to avoid flaky test failures on slower testbeds +sleep 1 cleanup() { ex=$? diff -Nru tinyssh-20230101/debian/tests/04sftp tinyssh-20230101/debian/tests/04sftp --- tinyssh-20230101/debian/tests/04sftp 2023-01-01 09:33:58.000000000 +0100 +++ tinyssh-20230101/debian/tests/04sftp 2023-04-17 15:09:51.000000000 +0200 @@ -22,6 +22,9 @@ tinysshd-makekey -q sshkeydir tcpserver -HRDl0 127.0.0.1 10000 tinysshd -x sftp=/usr/lib/openssh/sftp-server -- sshkeydir 2>tinysshd.log & tcpserverpid=$! +# Give some extra time for tcpserver to start, +# to avoid flaky test failures on slower testbeds +sleep 1 cleanup() { ex=$? diff -Nru tinyssh-20230101/debian/tests/05authorizedkeys tinyssh-20230101/debian/tests/05authorizedkeys --- tinyssh-20230101/debian/tests/05authorizedkeys 2023-01-01 09:33:58.000000000 +0100 +++ tinyssh-20230101/debian/tests/05authorizedkeys 2023-04-17 15:09:51.000000000 +0200 @@ -21,6 +21,9 @@ tinysshd-makekey -q sshkeydir tcpserver -HRDl0 127.0.0.1 10000 tinysshd -- sshkeydir 2>tinysshd.log & tcpserverpid=$! +# Give some extra time for tcpserver to start, +# to avoid flaky test failures on slower testbeds +sleep 1 cleanup() { ex=$? diff -Nru tinyssh-20230101/debian/tests/06transfer tinyssh-20230101/debian/tests/06transfer --- tinyssh-20230101/debian/tests/06transfer 2023-01-01 09:33:58.000000000 +0100 +++ tinyssh-20230101/debian/tests/06transfer 2023-04-17 15:09:51.000000000 +0200 @@ -22,6 +22,9 @@ tinysshd-makekey -q sshkeydir tcpserver -HRDl0 127.0.0.1 10000 tinysshd -- sshkeydir 2>tinysshd.log & tcpserverpid=$! +# Give some extra time for tcpserver to start, +# to avoid flaky test failures on slower testbeds +sleep 1 cleanup() { ex=$? diff -Nru tinyssh-20230101/debian/tests/07kex tinyssh-20230101/debian/tests/07kex --- tinyssh-20230101/debian/tests/07kex 2023-01-01 09:33:58.000000000 +0100 +++ tinyssh-20230101/debian/tests/07kex 2023-04-17 15:09:51.000000000 +0200 @@ -21,6 +21,9 @@ tinysshd-makekey -q sshkeydir tcpserver -HRDl0 127.0.0.1 10000 tinysshd -- sshkeydir 2>tinysshd.log & tcpserverpid=$! +# Give some extra time for tcpserver to start, +# to avoid flaky test failures on slower testbeds +sleep 1 cleanup() { ex=$?