mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 19:20:27 +09:00
tests: Under valgrind wait for server cleanup longer
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
@@ -53,6 +53,10 @@
|
|||||||
#include "libssh/misc.h"
|
#include "libssh/misc.h"
|
||||||
#include "libssh/token.h"
|
#include "libssh/token.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_VALGRIND_VALGRIND_H
|
||||||
|
#include <valgrind/valgrind.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TORTURE_SSHD_SRV_IPV4 "127.0.0.10"
|
#define TORTURE_SSHD_SRV_IPV4 "127.0.0.10"
|
||||||
/* socket wrapper IPv6 prefix fd00::5357:5fxx */
|
/* socket wrapper IPv6 prefix fd00::5357:5fxx */
|
||||||
#define TORTURE_SSHD_SRV_IPV6 "fd00::5357:5f0a"
|
#define TORTURE_SSHD_SRV_IPV6 "fd00::5357:5f0a"
|
||||||
@@ -244,6 +248,13 @@ int torture_terminate_process(const char *pidfile)
|
|||||||
|
|
||||||
/* 10 ms */
|
/* 10 ms */
|
||||||
usleep(10 * 1000);
|
usleep(10 * 1000);
|
||||||
|
#ifdef HAVE_VALGRIND_VALGRIND_H
|
||||||
|
if (RUNNING_ON_VALGRIND) {
|
||||||
|
SSH_LOG(SSH_LOG_INFO, "Running within Valgrind, wait one more "
|
||||||
|
"second for the server to clean up.");
|
||||||
|
usleep(1000 * 1000);
|
||||||
|
}
|
||||||
|
#endif /* HAVE_VALGRIND_VALGRIND_H */
|
||||||
|
|
||||||
rc = kill(pid, 0);
|
rc = kill(pid, 0);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user