Return valid code from test fixture on failure.
The sshd test fixture was returning -1 if an error occurred, but negative error codes aren't technically valid (google it). Bash on Windows converted them to 0 which made setup failure look as though all tests were passing.
Этот коммит содержится в:
родитель
1fa5fe6059
Коммит
d73e0ec260
@ -80,7 +80,7 @@ int main(int argc, char *argv[])
|
||||
if (connect(sock, (struct sockaddr*)(&sin),
|
||||
sizeof(struct sockaddr_in)) != 0) {
|
||||
fprintf(stderr, "failed to connect!\n");
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Create a session instance and start it up
|
||||
@ -89,7 +89,7 @@ int main(int argc, char *argv[])
|
||||
session = libssh2_session_init();
|
||||
if (libssh2_session_startup(session, sock)) {
|
||||
fprintf(stderr, "Failure establishing SSH session\n");
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* At this point we havn't authenticated,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user