diff options
author | Nils Durner <durner@gnunet.org> | 2010-04-17 09:21:29 +0000 |
---|---|---|
committer | Nils Durner <durner@gnunet.org> | 2010-04-17 09:21:29 +0000 |
commit | 740a0bed33427d828fa0daedd331a5411d8b57a7 (patch) | |
tree | 4e93aebba004123163cd4d82fb9cf4525467ef90 /src/util/test_os_start_process.c | |
parent | 204cc16888aa19a59f6363003fbe7f34404ba4f7 (diff) | |
download | gnunet-740a0bed33427d828fa0daedd331a5411d8b57a7.tar.gz gnunet-740a0bed33427d828fa0daedd331a5411d8b57a7.zip |
don't bypass GNUnet IO
Diffstat (limited to 'src/util/test_os_start_process.c')
-rw-r--r-- | src/util/test_os_start_process.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c index 5a47c2f5c..f768e3ccf 100644 --- a/src/util/test_os_start_process.c +++ b/src/util/test_os_start_process.c | |||
@@ -24,11 +24,6 @@ | |||
24 | * This testcase simply calls the os start process code | 24 | * This testcase simply calls the os start process code |
25 | * giving a file descriptor to write stdout to. If the | 25 | * giving a file descriptor to write stdout to. If the |
26 | * correct data "HELLO" is read then all is well. | 26 | * correct data "HELLO" is read then all is well. |
27 | * | ||
28 | * TODO: This test case will not work on windows because | ||
29 | * there is no cat (unless there is). Perhaps we should | ||
30 | * add a gnunet_cat program/test program to util so we can | ||
31 | * adequately test this functionality on windows? | ||
32 | */ | 27 | */ |
33 | #include "platform.h" | 28 | #include "platform.h" |
34 | #include "gnunet_common.h" | 29 | #include "gnunet_common.h" |
@@ -107,8 +102,6 @@ static void | |||
107 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 102 | task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
108 | { | 103 | { |
109 | char *fn; | 104 | char *fn; |
110 | int fd_stdout; | ||
111 | int fd_stdin; | ||
112 | 105 | ||
113 | const struct GNUNET_DISK_FileHandle *stdout_read_handle; | 106 | const struct GNUNET_DISK_FileHandle *stdout_read_handle; |
114 | 107 | ||
@@ -132,13 +125,9 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
132 | GNUNET_DISK_pipe_close_end(hello_pipe_stdout, GNUNET_DISK_PIPE_END_WRITE); | 125 | GNUNET_DISK_pipe_close_end(hello_pipe_stdout, GNUNET_DISK_PIPE_END_WRITE); |
133 | /* Close the read end of the write pipe */ | 126 | /* Close the read end of the write pipe */ |
134 | GNUNET_DISK_pipe_close_end(hello_pipe_stdin, GNUNET_DISK_PIPE_END_READ); | 127 | GNUNET_DISK_pipe_close_end(hello_pipe_stdin, GNUNET_DISK_PIPE_END_READ); |
135 | /* Get the FD to read from */ | ||
136 | GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle(hello_pipe_stdout, GNUNET_DISK_PIPE_END_READ), &fd_stdout, sizeof (int)); | ||
137 | /* Get the FD to write to */ | ||
138 | GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle(hello_pipe_stdin, GNUNET_DISK_PIPE_END_WRITE), &fd_stdin, sizeof (int)); | ||
139 | 128 | ||
140 | /* Write the test_phrase to the cat process */ | 129 | /* Write the test_phrase to the cat process */ |
141 | if (write(fd_stdin, test_phrase, strlen(test_phrase) + 1) == GNUNET_SYSERR) | 130 | if (GNUNET_DISK_file_write(hello_pipe_stdin, test_phrase, strlen(test_phrase) + 1) != GNUNET_YES) |
142 | { | 131 | { |
143 | ok = 1; | 132 | ok = 1; |
144 | return; | 133 | return; |