From: Sapan Bhatia Date: Mon, 26 Jan 2009 19:57:47 +0000 (+0000) Subject: Wait for pl_netflow to show up before starting. X-Git-Tag: tests-4.3-0~21 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c658deb2cdcd73a288dd98e462599e4d2f9da613;p=tests.git Wait for pl_netflow to show up before starting. --- diff --git a/qaapi/qa/tests/node/pf2test.pl b/qaapi/qa/tests/node/pf2test.pl index d1c95bf..ceb81b5 100755 --- a/qaapi/qa/tests/node/pf2test.pl +++ b/qaapi/qa/tests/node/pf2test.pl @@ -8,6 +8,14 @@ print "Preparing..."; system("cp /var/log/messages /tmp/pf2_test"); + +# Wait for pl_netflow to come up + +$timeout=600; + +until ((-f "/var/run/vservers/pl_netflow" && -d "/home/pl_netflow") || ($timeout==0)) {sleep (15);print "Waiting for pl_netflow to show up...\n";$timeout-=15;} + +if ($timeout>0) { # ping magic IP address print "Sending out packet...\n"; system("su -c \"ping -I eth0 -c 1 10.0.0.8\" $netflow_slice -"); @@ -32,6 +40,10 @@ if ($success) { else { print "[FAILED]"; } +} +else { + die("[FAILED] Timed out.. pl_netflow didn't come up for 10 minutes...\n"); +} close PIP; diff --git a/qaapi/qa/tests/node/support/vsys_conctest.c b/qaapi/qa/tests/node/support/vsys_conctest.c index 8a40f21..587d531 100644 --- a/qaapi/qa/tests/node/support/vsys_conctest.c +++ b/qaapi/qa/tests/node/support/vsys_conctest.c @@ -129,6 +129,7 @@ int main(int argc,char *argv[]) if (nlines<5) { printf("Test returned different results - run again to verify\n"); + printf("%s\n",buf); exit(-1); }