gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10957 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r10957 - gnunet/src/util
Date: Sat, 17 Apr 2010 11:21:29 +0200

Author: durner
Date: 2010-04-17 11:21:29 +0200 (Sat, 17 Apr 2010)
New Revision: 10957

Modified:
   gnunet/src/util/test_os_start_process.c
Log:
don't bypass GNUnet IO

Modified: gnunet/src/util/test_os_start_process.c
===================================================================
--- gnunet/src/util/test_os_start_process.c     2010-04-16 21:29:50 UTC (rev 
10956)
+++ gnunet/src/util/test_os_start_process.c     2010-04-17 09:21:29 UTC (rev 
10957)
@@ -24,11 +24,6 @@
  * This testcase simply calls the os start process code
  * giving a file descriptor to write stdout to.  If the
  * correct data "HELLO" is read then all is well.
- *
- * TODO: This test case will not work on windows because
- * there is no cat (unless there is).  Perhaps we should
- * add a gnunet_cat program/test program to util so we can
- * adequately test this functionality on windows?
  */
 #include "platform.h"
 #include "gnunet_common.h"
@@ -107,8 +102,6 @@
 task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   char *fn;
-  int fd_stdout;
-  int fd_stdin;
 
   const struct GNUNET_DISK_FileHandle *stdout_read_handle;
 
@@ -132,13 +125,9 @@
   GNUNET_DISK_pipe_close_end(hello_pipe_stdout, GNUNET_DISK_PIPE_END_WRITE);
   /* Close the read end of the write pipe */
   GNUNET_DISK_pipe_close_end(hello_pipe_stdin, GNUNET_DISK_PIPE_END_READ);
-  /* Get the FD to read from */
-  GNUNET_DISK_internal_file_handle_ 
(GNUNET_DISK_pipe_handle(hello_pipe_stdout, GNUNET_DISK_PIPE_END_READ), 
&fd_stdout, sizeof (int));
-  /* Get the FD to write to */
-  GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle(hello_pipe_stdin, 
GNUNET_DISK_PIPE_END_WRITE), &fd_stdin, sizeof (int));
 
   /* Write the test_phrase to the cat process */
-  if (write(fd_stdin, test_phrase, strlen(test_phrase) + 1) == GNUNET_SYSERR)
+  if (GNUNET_DISK_file_write(hello_pipe_stdin, test_phrase, 
strlen(test_phrase) + 1) != GNUNET_YES)
     {
       ok = 1;
       return;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]