<div dir="ltr">Sorry, something wrong with the header, should be V1.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 12, 2013 at 11:38 AM, Alex Wang <span dir="ltr">&lt;<a href="mailto:alexw@nicira.com" target="_blank">alexw@nicira.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This commit adds an unit test for the &quot;ovs-appctl coverage/show&quot;.<br>
<br>
Signed-off-by: Alex Wang &lt;<a href="mailto:alexw@nicira.com">alexw@nicira.com</a>&gt;<br>
---<br>
 tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a> |   26 ++++++++++++++++++++++++++<br>
 1 file changed, 26 insertions(+)<br>
<br>
diff --git a/tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a> b/tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a><br>
index 9231221..823b07a 100644<br>
--- a/tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a><br>
+++ b/tests/<a href="http://ofproto-dpif.at" target="_blank">ofproto-dpif.at</a><br>
@@ -2549,3 +2549,29 @@ in_port=1,vlan_tci=0x0000/0x0fff,dl_src=50:54:00:00:00:0b, n_subfacets:1, used:0<br>
 ])<br>
 OVS_VSWITCHD_STOP<br>
 AT_CLEANUP<br>
+<br>
+AT_SETUP([ofproto-dpif coverage/show])<br>
+OVS_VSWITCHD_START<br>
+<br>
+AT_CHECK([ovs-appctl time/stop]) dnl Want to manipulate the clock<br>
+AT_CHECK([ovs-appctl time/warp 1000 &amp;&amp; ovs-appctl time/warp 1000], [0], [warped<br>
+warped<br>
+])<br>
+AT_CHECK([ovs-appctl coverage/show], [0], [stdout], [])<br>
+<br>
+# Check the unixctl_received and unixctl_replied rates<br>
+# There should be in total 4 unixctl_received counts, but the rate should only<br>
+# show 3 counts. This is in that the &quot;ovs-appctl coverage/show&quot; is not included<br>
+# in the rate calculation.<br>
+AT_CHECK([sed -n &quot;s/^\(unixctl_received.*\)$/\1/p&quot; stdout], [0], [dnl<br>
+unixctl_received           0.6/sec       3/min         3/hr   total: 4<br>
+])<br>
+# There should be in total 3 unixctl_replied counts, and the rate should also<br>
+# shouw 3 counts, since at the time of rate calculation, the command is not replied<br>
+# yet.<br>
+AT_CHECK([sed -n &quot;s/^\(unixctl_replied.*\)$/\1/p&quot; stdout], [0], [dnl<br>
+unixctl_replied            0.6/sec       3/min         3/hr   total: 3<br>
+])<br>
+<br>
+OVS_VSWITCHD_STOP<br>
+AT_CLEANUP<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
</font></span></blockquote></div><br></div>