From: Sapan Bhatia Date: Fri, 13 Jun 2008 22:09:12 +0000 (+0000) Subject: Now where'd this file come from. X-Git-Tag: vsys-0.7-8~1 X-Git-Url: http://git.onelab.eu/?p=vsys.git;a=commitdiff_plain;h=78befac2ed9d506d569f0f7fb6123e4a6831c522 Now where'd this file come from. --- diff --git a/inotify_stubs.o b/inotify_stubs.o deleted file mode 100644 index 714490f..0000000 Binary files a/inotify_stubs.o and /dev/null differ diff --git a/tests/vsys_conctest.c b/tests/vsys_conctest.c index c155f80..5bbb73c 100644 --- a/tests/vsys_conctest.c +++ b/tests/vsys_conctest.c @@ -5,13 +5,14 @@ #include #include #include +#include int main() { FILE *fp = NULL, *fp_in = NULL; FILE *out_fp = NULL, *diff_fp = NULL; - const char* topcmd = "/vservers/pl_netflow/vsys/test.out"; - const char* top_in_file = "/vservers/pl_netflow/vsys/test.in"; + const char* topcmd = "feg/test.out"; + const char* top_in_file = "feg/test.in"; char buf[4096]; int fd_in = -1, fd_out; int res; @@ -19,17 +20,18 @@ int main() int count = 1; struct timeval tv={.tv_sec=5,.tv_usec=0}; - while (count < 100) { + while (count < 10000) { fd_set readSet; int res; int nlines=0; - printf("(.)", count); + printf("(%d)", count); if ((fd_out = open(topcmd, O_RDONLY | O_NONBLOCK)) < 0) { fprintf(stderr, "error executing top\n"); exit(-1); } + if ((fd_in = open(top_in_file, O_WRONLY)) < 0) { fprintf(stderr, "error opening %s\n", top_in_file); exit(-1); @@ -45,7 +47,7 @@ int main() res = select(fd_out + 1, &readSet, NULL, NULL, &tv); if (res < 1) { - printf("select failed\n"); + printf("select failed: %d,%s\n",fd_out,strerror(errno)); exit(-1); } @@ -98,6 +100,7 @@ int main() pclose (diff_fp); fclose(fp); close(fd_in); + close(fd_out); count++; } printf("test successful.\n");