ecore_pipe: remove fmemopen related routine 16/130216/1
authorMinchul Lee <slotus.lee@samsung.com>
Fri, 19 May 2017 12:11:44 +0000 (21:11 +0900)
committerMinchul Lee <slotus.lee@samsung.com>
Fri, 19 May 2017 12:11:48 +0000 (21:11 +0900)
The return value of the fmemopen is changed from Tizen 3.0.
Tizen 3.0 and Desktop returned NULL for the commented routine.
But, from Tizen 4.0 it returns pointer. it makes tc failure.

Change-Id: I0f7aefe7fa3c49c9837ad11d1361011e77f2dcc0
Signed-off-by: Minchul Lee <slotus.lee@samsung.com>
TC/ecore/ecore_pipe/utc_ecore_pipe_read_fd.c
TC/ecore/ecore_pipe/utc_ecore_pipe_write_fd.c

index 45eebfb72243d74479d8c5e632489dbf9e2fe53f..4bd23dc56e1f05023b25b82ae920596fa56f470c 100644 (file)
@@ -91,7 +91,10 @@ START_TEST(utc_ecore_pipe_read_fd_p2)
     Eina_Bool ok = EINA_FALSE;
     char rbuf[] = "test_buffer";
     char wbuf[1024] = {0,};
-    int fd_read_2, fd_write_2;
+    int fd_read_2 = -1;
+    int fd_write_2 = 0;
+
+#if 0 /* fmemopen had returned NULL on Tizen 3.0. But, it returns pointer on Unified binary. */
     FILE *fd_read = fmemopen(rbuf, strlen(rbuf), "r");
     if (!fd_read)
       {
@@ -107,6 +110,7 @@ START_TEST(utc_ecore_pipe_read_fd_p2)
       }
     else
        fd_write_2 = fileno(fd_write);
+#endif
 
     pipe1 = ecore_pipe_full_add(Pipe_Cb, NULL, fileno(stdin), fileno(stdout), EINA_FALSE, EINA_FALSE);
     pipe2 = ecore_pipe_full_add(Pipe_Cb, NULL, fd_read_2, fd_write_2, EINA_FALSE, EINA_FALSE);
@@ -121,8 +125,10 @@ START_TEST(utc_ecore_pipe_read_fd_p2)
     }
     ecore_pipe_del(pipe1);
     ecore_pipe_del(pipe2);
+#if 0 /* fmemopen had returned NULL on Tizen 3.0. But, it returns pointer on Unified binary. */
     close(fd_read);
     close(fd_write);
+#endif
 
     if (ok != EINA_TRUE)
     {
index 5741c9b4698c11f90ce1f2d8207173c6de2a970c..48b1aa10590fdbfcade0af45cc751d560048280e 100644 (file)
@@ -91,7 +91,10 @@ START_TEST(utc_ecore_pipe_write_fd_p2)
     Eina_Bool ok = EINA_FALSE;
     char rbuf[] = "test_buffer";
     char wbuf[1024] = {0,};
-    int fd_read_2, fd_write_2;
+    int fd_read_2 = -1;
+    int fd_write_2 = 0;
+
+#if 0 /* fmemopen had returned NULL on Tizen 3.0. But, it returns pointer on Unified binary. */
     FILE *fd_read = fmemopen(rbuf, strlen(rbuf), "r");
     if (!fd_read)
       {
@@ -107,6 +110,7 @@ START_TEST(utc_ecore_pipe_write_fd_p2)
       }
     else
        fd_write_2 = fileno(fd_write);
+#endif
 
     pipe1 = ecore_pipe_full_add(Pipe_Cb, NULL, fileno(stdin), fileno(stdout), EINA_FALSE, EINA_FALSE);
     pipe2 = ecore_pipe_full_add(Pipe_Cb, NULL, fd_read_2, fd_write_2, EINA_FALSE, EINA_FALSE);
@@ -120,8 +124,10 @@ START_TEST(utc_ecore_pipe_write_fd_p2)
     }
     ecore_pipe_del(pipe1);
     ecore_pipe_del(pipe2);
+#if 0 /* fmemopen had returned NULL on Tizen 3.0. But, it returns pointer on Unified binary. */
     close(fd_read);
     close(fd_write);
+#endif
 
     if (ok != EINA_TRUE)
     {