!40 test: fix running timeout tests

From: @xinghe_1 
Reviewed-by: @zengwefeng 
Signed-off-by: @zengwefeng
This commit is contained in:
openeuler-ci-bot 2022-10-27 08:36:38 +00:00 committed by Gitee
commit 47b64e6d31
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,32 @@
From d2a41e606bbd6074b88be46f7b0fd3cd3f7d5536 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Wed, 26 May 2021 17:06:42 +0200
Subject: tests: Fix running timeout tests on gitlab windows runners
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Conflict: NA
Reference: https://git.libssh.org/projects/libssh.git/patch/tests/unittests/torture_misc.c?id=d2a41e606bbd6074b88be46f7b0fd3cd3f7d5536
---
tests/unittests/torture_misc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'tests/unittests/torture_misc.c')
diff --git a/tests/unittests/torture_misc.c b/tests/unittests/torture_misc.c
index 2d2d6860..c7b99b5d 100644
--- a/tests/unittests/torture_misc.c
+++ b/tests/unittests/torture_misc.c
@@ -209,7 +209,8 @@ static void torture_timeout_elapsed(void **state){
struct ssh_timestamp ts;
(void) state;
ssh_timestamp_init(&ts);
- usleep(50000);
+ usleep(30000);
+
assert_true(ssh_timeout_elapsed(&ts,25));
assert_false(ssh_timeout_elapsed(&ts,30000));
assert_false(ssh_timeout_elapsed(&ts,75));
--
cgit v1.2.3

View File

@ -1,6 +1,6 @@
Name: libssh
Version: 0.9.4
Release: 6
Release: 7
Summary: A library implementing the SSH protocol
License: LGPLv2+
URL: http://www.libssh.org
@ -20,6 +20,7 @@ Patch8: backport-auth-Fix-error-returned-in-ssh_userauth_try_publicke.pa
Patch9: backport-client-Do-not-close-the-socket-if-it-was-set-via-opt.patch
Patch10: backport-libsshpp-Fix-openForward-to-not-set-sourcehost-to-NU.patch
Patch11: backport-sftp-fix-the-length-calculation-of-packet-in-sftp_wr.patch
Patch12: backport-tests-Fix-running-timeout-tests-on-gitlab-windows-ru.patch
BuildRequires: cmake gcc-c++ gnupg2 openssl-devel pkgconfig zlib-devel
BuildRequires: krb5-devel libcmocka-devel openssh-clients openssh-server
@ -104,6 +105,12 @@ popd
%doc ChangeLog README
%changelog
* Tue Oct 25 2022 xinghe <xinghe2@h-partners.com> - 0.9.4-7
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:tests: Fix running timeout tests on gitlab windows runners
* Fri Sep 02 2022 gaihuiying <eaglegai@163.com> - 0.9.4-6
- Type:bugfix
- Id:NA