From: Sapan Bhatia Date: Wed, 30 Jul 2008 19:27:19 +0000 (+0000) Subject: Updated vsys conc test X-Git-Tag: tests-4.3-0~131 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b2924317d05082713aa755cbb45a700bc31a39f4;p=tests.git Updated vsys conc test --- diff --git a/qaapi/qa/tests/node/support/vsys_conctest.c b/qaapi/qa/tests/node/support/vsys_conctest.c index d4750c4..99c22fd 100644 --- a/qaapi/qa/tests/node/support/vsys_conctest.c +++ b/qaapi/qa/tests/node/support/vsys_conctest.c @@ -8,19 +8,28 @@ #include #include -int main() +#define IMAPIG 1024 + +int main(int argc,char *argv[]) { 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"; - char buf[4096]; + + if (argc<2) { + printf("usage: vsys_conctest \n"); + exit(-1); + } + const char topcmd[IMAPIG]; + const char top_in_file[IMAPIG]; + char buf[IMAPIG*8]; int fd_in = -1, fd_out; int res; int flag,flag2; int count = 1; struct timeval tv={.tv_sec=5,.tv_usec=0}; + sprintf("%s/vsys/test.out",argv[1]); + sprintf("%s/vsys/test.in",argv[1]); while (count < 200000) { fd_set readSet; int res;