After the change, both of them compile. test-netflow related
unit tests pass.

test-sflow related tests do not pass because
of LOOPBACK_INTERFACE constraints for 'agent'.
(It should be revisited later.)

Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>
---
v2-v3:
 * Skip creating Windows events from the client. They are now automatically
   created through poll_fd_wait().
---
 tests/test-netflow.c |    3 ++-
 tests/test-sflow.c   |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/test-netflow.c b/tests/test-netflow.c
index 1243f83..76f9bae 100644
--- a/tests/test-netflow.c
+++ b/tests/test-netflow.c
@@ -181,6 +181,7 @@ test_netflow_main(int argc, char *argv[])
 
     proctitle_init(argc, argv);
     set_program_name(argv[0]);
+    service_start(&argc, &argv);
     parse_options(argc, argv);
 
     if (argc - optind != 1) {
@@ -214,7 +215,7 @@ test_netflow_main(int argc, char *argv[])
 
         ofpbuf_clear(&buf);
         do {
-            retval = read(sock, ofpbuf_data(&buf), buf.allocated);
+            retval = recv(sock, ofpbuf_data(&buf), buf.allocated, 0);
         } while (retval < 0 && errno == EINTR);
         if (retval > 0) {
             ofpbuf_put_uninit(&buf, retval);
diff --git a/tests/test-sflow.c b/tests/test-sflow.c
index fa8b5c5..b91fd41 100644
--- a/tests/test-sflow.c
+++ b/tests/test-sflow.c
@@ -499,6 +499,7 @@ test_sflow_main(int argc, char *argv[])
 
     proctitle_init(argc, argv);
     set_program_name(argv[0]);
+    service_start(&argc, &argv);
     parse_options(argc, argv);
 
     if (argc - optind != 1) {
@@ -531,7 +532,7 @@ test_sflow_main(int argc, char *argv[])
 
         ofpbuf_clear(&buf);
         do {
-            retval = read(sock, ofpbuf_data(&buf), buf.allocated);
+            retval = recv(sock, ofpbuf_data(&buf), buf.allocated, 0);
         } while (retval < 0 && errno == EINTR);
         if (retval > 0) {
             ofpbuf_put_uninit(&buf, retval);
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to