Compare commits

...

18 Commits

Author SHA1 Message Date
Snaipe 8343eef646 Added sleeping in child pump 2016-06-22 18:02:53 +02:00
Snaipe a4d1f1d63f nanomsg: Added locking for xrep hash table 2016-06-05 21:52:32 +02:00
Snaipe bacbfb401f appveyor: Disable CredSSP 2016-06-04 19:16:06 +02:00
Snaipe 28658a9b66 Revert "Revert "appveyor: turn on RDP""
This reverts commit b775765581.
2016-06-04 19:06:12 +02:00
Snaipe 9462d1a97f protocol: Added infinite lingering 2016-05-23 15:19:14 +02:00
Snaipe cdcea14156 Revert "protocol: Added polling for ACK"
This reverts commit 0c0fade8088ecb9d11f366c5921d0c0f1a0c3815.
2016-05-23 15:19:14 +02:00
Snaipe 90d2fe4d08 protocol: Added polling for ACK 2016-05-23 15:19:14 +02:00
Snaipe 45ffde4714 protocol: Use TCP by default 2016-05-23 15:19:14 +02:00
Snaipe 97eaadcc3c protocol: Connect to criterion.sock only 2016-05-23 15:19:14 +02:00
Snaipe 40db697600 protocol: Fixed wrong ACK wait loop 2016-05-23 15:19:14 +02:00
Snaipe 9fb27d0c41 Revert "Revert "Revert "appveyor: test nanomsg before building criterion"""
This reverts commit cd486e00a8ed2fce3f3923cd8ec7bbaa33c09861.
2016-05-23 15:19:14 +02:00
Snaipe b775765581 Revert "appveyor: turn on RDP"
This reverts commit 72eba5045796624aafcac2998af243ba08077e39.
2016-05-23 15:19:14 +02:00
Snaipe 33d4d3c9f1 protocol: Loop on FSM errors 2016-05-23 15:19:14 +02:00
Snaipe 7c8c38d983 appveyor: Enforce c89 & warnings for nanomsg build 2016-05-23 15:19:14 +02:00
Snaipe a791ab34b9 Revert "Revert "appveyor: test nanomsg before building criterion""
This reverts commit d4b73473c0097dfdb447a795bac8815a183e4b03.
2016-05-23 15:19:14 +02:00
Snaipe 92f9838c78 Revert "appveyor: test nanomsg before building criterion"
This reverts commit 0e2c66ca39e1abc2292ad63ab82f4ef966abe871.
2016-05-23 15:19:14 +02:00
Snaipe ac7d4e1292 appveyor: turn on RDP 2016-05-23 15:19:14 +02:00
Snaipe 7437d4a887 appveyor: test nanomsg before building criterion 2016-05-23 15:19:14 +02:00
5 changed files with 25 additions and 29 deletions

View File

@ -8,6 +8,8 @@ init:
- set MSYSTEM=MINGW64
- pacman --noconfirm --needed -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
- set "PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\build;%APPVEYOR_BUILD_FOLDER%\build\Debug;%APPVEYOR_BUILD_FOLDER%\build\external\bin;%APPVEYOR_BUILD_FOLDER%\build\external\lib"
- reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
environment:
COVERALLS_REPO_TOKEN:
@ -90,6 +92,9 @@ test_script:
$host.setshouldexit(1)
}
on_finish:
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#after_test:
# - 'make coveralls'

@ -1 +1 @@
Subproject commit 8e0095aa750f300003afb27cb408df3f9b6b2364
Subproject commit 6c69690f119cceea47b85dc34ca88ea82893f597

View File

@ -263,6 +263,8 @@ static void CALLBACK handle_child_terminated(PVOID lpParameter,
? WEXITSTATUS(status)
: WTERMSIG(status);
Sleep(100);
criterion_protocol_msg msg = criterion_message(death,
.result = result,
.has_status = true,

View File

@ -30,7 +30,7 @@
#include "compat/process.h"
#include "core/worker.h"
#define URL "ipc://%scriterion_%llu.sock"
#define URL "tcp://127.0.0.1:4224"
#define errno_ignore(Stmt) do { int err = errno; Stmt; errno = err; } while (0)
@ -40,18 +40,9 @@ int bind_server(void) {
if (sock < 0)
return -1;
#ifdef VANILLA_WIN32
char *prefix = "";
#else
char *prefix = "/tmp/";
#endif
nn_setsockopt(sock, NN_SOL_SOCKET, NN_LINGER, &(int) {-1}, sizeof (int));
char url[256];
int rc = snprintf(url, sizeof (url), URL, prefix, get_process_id());
if (rc == 256)
cr_panic("IPC url too long");
if (nn_bind(sock, url) < 0)
if (nn_bind(sock, URL) < 0)
goto error;
return sock;
@ -69,18 +60,9 @@ int connect_client(void) {
if (sock < 0)
return -1;
#ifdef VANILLA_WIN32
char *prefix = "";
#else
char *prefix = "/tmp/";
#endif
nn_setsockopt(sock, NN_SOL_SOCKET, NN_LINGER, &(int) {-1}, sizeof (int));
char url[256];
int rc = snprintf(url, sizeof (url), URL, prefix, get_runner_process_id());
if (rc == 256)
cr_panic("IPC url too long");
if (nn_connect (sock, url) < 0)
if (nn_connect (sock, URL) < 0)
goto error;
return sock;

View File

@ -91,12 +91,19 @@ void cr_send_to_runner(const criterion_protocol_msg *message) {
}
unsigned char *buf = NULL;
int read = nn_recv(g_client_socket, &buf, NN_MSG, 0);
int read = 0;
if (read <= 0) {
criterion_perror("Could not read ack: %s.\n", nn_strerror(errno));
abort();
}
do {
read = nn_recv(g_client_socket, &buf, NN_MSG, 0);
if (read <= 0) {
if (read == -1 && errno == EFSM)
continue;
criterion_perror("Could not read ack: %s.\n", nn_strerror(errno));
abort();
}
break;
} while (true);
criterion_protocol_ack ack;
pb_istream_t stream = pb_istream_from_buffer(buf, read);