X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fvsys_conctest.c;h=e4b6913f500ae61c3ffff6613e6c155ba4c653d2;hb=acbdd1601fcfb161089d326e7e32b74b76f441e3;hp=b1a17faae0ba16e74ccb056af665d32f7d27db4b;hpb=ff59db26ff8e6f8ba6969ed93bb4cca88a3b7c2d;p=vsys.git diff --git a/tests/vsys_conctest.c b/tests/vsys_conctest.c index b1a17fa..e4b6913 100644 --- a/tests/vsys_conctest.c +++ b/tests/vsys_conctest.c @@ -11,8 +11,8 @@ int main() { FILE *fp = NULL, *fp_in = NULL; FILE *out_fp = NULL, *diff_fp = NULL; - const char* topcmd = "/vsys/vtop.out"; - const char* top_in_file = "/vsys/vtop.in"; + const char* topcmd = "fe/test.out"; + const char* top_in_file = "fe/test.in"; char buf[4096]; int fd_in = -1, fd_out; int res; @@ -25,6 +25,7 @@ int main() int res; int nlines=0; + //usleep(200); printf("(%d)", count);fflush(stdout); if ((fd_out = open(topcmd, O_RDONLY | O_NONBLOCK)) < 0) { @@ -32,10 +33,12 @@ int main() exit(-1); } + printf("Opening...\n"); if ((fd_in = open(top_in_file, O_WRONLY)) < 0) { fprintf(stderr, "error opening %s\n", top_in_file); exit(-1); } + printf("Open.\n"); if ((flag = fcntl(fd_out, F_GETFL)) == -1) { printf("fcntl get failed\n"); @@ -46,7 +49,10 @@ int main() FD_ZERO(&readSet); FD_SET(fd_out, &readSet); + printf("Selecting...\n"); + sleep(1); res = select(fd_out + 1, &readSet, NULL, NULL, NULL); + printf("Selected...\n"); if (res < 0) { if (errno == EINTR || errno == EAGAIN) { printf(".");