summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test.c2
-rw-r--r--src/test/test_util.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/test/test.c b/src/test/test.c
index 5f0b47000c..4f19f36eab 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -72,7 +72,7 @@ int have_failed = 0;
* our files during testing. */
static char temp_dir[256];
#ifdef _WIN32
-#define pid_t unsigned
+#define pid_t int
#endif
static pid_t temp_dir_setup_in_pid = 0;
diff --git a/src/test/test_util.c b/src/test/test_util.c
index bf33344039..4b628ea54d 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -2274,8 +2274,13 @@ run_util_spawn_background(const char *argv[], const char *expected_out,
test_assert(process_handle != NULL);
test_eq(expected_status, process_handle->status);
+#ifdef _WIN32
+ test_assert(process_handle->stdout_pipe != INVALID_HANDLE_VALUE);
+ test_assert(process_handle->stderr_pipe != INVALID_HANDLE_VALUE);
+#else
test_assert(process_handle->stdout_pipe > 0);
test_assert(process_handle->stderr_pipe > 0);
+#endif
/* Check stdout */
pos = tor_read_all_from_process_stdout(process_handle, stdout_buf,