[ovs-dev] [PATCH V3 3/3] ofproto-dpif.at: Add test for "ovs-appctl coverage/show"
alexw at nicira.com
Wed Jun 12 18:38:43 UTC 2013
This commit adds an unit test for the "ovs-appctl coverage/show".
Signed-off-by: Alex Wang <alexw at nicira.com>
tests/ofproto-dpif.at | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 9231221..823b07a 100644
@@ -2549,3 +2549,29 @@ in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b, n_subfacets:1, used:0
+AT_CHECK([ovs-appctl time/stop]) dnl Want to manipulate the clock
+AT_CHECK([ovs-appctl time/warp 1000 && ovs-appctl time/warp 1000], , [warped
+AT_CHECK([ovs-appctl coverage/show], , [stdout], )
+# Check the unixctl_received and unixctl_replied rates
+# There should be in total 4 unixctl_received counts, but the rate should only
+# show 3 counts. This is in that the "ovs-appctl coverage/show" is not included
+# in the rate calculation.
+AT_CHECK([sed -n "s/^\(unixctl_received.*\)$/\1/p" stdout], , [dnl
+unixctl_received 0.6/sec 3/min 3/hr total: 4
+# There should be in total 3 unixctl_replied counts, and the rate should also
+# shouw 3 counts, since at the time of rate calculation, the command is not replied
+AT_CHECK([sed -n "s/^\(unixctl_replied.*\)$/\1/p" stdout], , [dnl
+unixctl_replied 0.6/sec 3/min 3/hr total: 3
More information about the dev