Skip to content

Commit

Permalink
tests: Port test-sflow and test-netflow to Windows.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
shettyg committed Jun 30, 2014
1 parent 175cf4d commit 8f26aeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/test-netflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/test-sflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8f26aeb

Please sign in to comment.