tests: Fix error path in netflow test.
authorBen Pfaff <blp@nicira.com>
Fri, 1 Feb 2013 18:26:35 +0000 (10:26 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 11 Feb 2013 21:22:01 +0000 (13:22 -0800)
Otherwise, if the test bails out before finishing, the test-netflow daemon
doesn't get killed and the test hangs.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
tests/ofproto-dpif.at

index 08645cc..8f11b82 100644 (file)
@@ -1139,7 +1139,7 @@ ovs-vsctl \
    --id=@nf create NetFlow targets=\"127.0.0.1:$NETFLOW_PORT\" \
      engine_id=1 engine_type=2 active_timeout=10 add-id-to-interface=false
 
-ON_EXIT([kill `test-netflow.pid`])
+ON_EXIT([kill `cat test-netflow.pid`])
 AT_CHECK([test-netflow --detach --no-chdir --pidfile $NETFLOW_PORT:127.0.0.1 > netflow.log])AT_CAPTURE_FILE([netflow.log])
 
 AT_CHECK([ovs-appctl time/stop])