[ovs-dev] [PATCH 02/13] cfm: Remove tabs from output.

Ben Pfaff blp at ovn.org
Mon Jun 4 21:27:39 UTC 2018


OVS uses spaces for indentation in source code and it makes sense for it to
also use spaces for indentation in output.  Spaces also consume less
horizontal space in output, which often makes it easier to read.  This
commit transitions one part of output from tabs to spaces and updates
appropriate parts of the tests to match.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 lib/cfm.c             | 20 ++++++++++----------
 tests/cfm.at          | 20 ++++++++++----------
 tests/ofproto-dpif.at |  6 +++---
 3 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/lib/cfm.c b/lib/cfm.c
index 19957a968d3a..71d2c02067e0 100644
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -1032,30 +1032,30 @@ cfm_print_details(struct ds *ds, struct cfm *cfm) OVS_REQUIRES(mutex)
 
     fault = cfm_get_fault__(cfm);
     if (fault) {
-        ds_put_cstr(ds, "\tfault: ");
+        ds_put_cstr(ds, "  fault: ");
         ds_put_cfm_fault(ds, fault);
         ds_put_cstr(ds, "\n");
     }
 
     if (cfm->health == -1) {
-        ds_put_format(ds, "\taverage health: undefined\n");
+        ds_put_format(ds, "  average health: undefined\n");
     } else {
-        ds_put_format(ds, "\taverage health: %d\n", cfm->health);
+        ds_put_format(ds, "  average health: %d\n", cfm->health);
     }
-    ds_put_format(ds, "\topstate: %s\n", cfm->opup ? "up" : "down");
-    ds_put_format(ds, "\tremote_opstate: %s\n",
+    ds_put_format(ds, "  opstate: %s\n", cfm->opup ? "up" : "down");
+    ds_put_format(ds, "  remote_opstate: %s\n",
                   cfm->remote_opup ? "up" : "down");
-    ds_put_format(ds, "\tinterval: %dms\n", cfm->ccm_interval_ms);
-    ds_put_format(ds, "\tnext CCM tx: %lldms\n",
+    ds_put_format(ds, "  interval: %dms\n", cfm->ccm_interval_ms);
+    ds_put_format(ds, "  next CCM tx: %lldms\n",
                   timer_msecs_until_expired(&cfm->tx_timer));
-    ds_put_format(ds, "\tnext fault check: %lldms\n",
+    ds_put_format(ds, "  next fault check: %lldms\n",
                   timer_msecs_until_expired(&cfm->fault_timer));
 
     HMAP_FOR_EACH (rmp, node, &cfm->remote_mps) {
         ds_put_format(ds, "Remote MPID %"PRIu64"\n", rmp->mpid);
-        ds_put_format(ds, "\trecv since check: %s\n",
+        ds_put_format(ds, "  recv since check: %s\n",
                       rmp->recv ? "true" : "false");
-        ds_put_format(ds, "\topstate: %s\n", rmp->opup? "up" : "down");
+        ds_put_format(ds, "  opstate: %s\n", rmp->opup? "up" : "down");
     }
 }
 
diff --git a/tests/cfm.at b/tests/cfm.at
index fa7604c228f7..8c8bd20adec1 100644
--- a/tests/cfm.at
+++ b/tests/cfm.at
@@ -5,12 +5,12 @@ AT_CHECK([ovs-appctl cfm/show $1 | sed -e '/next CCM tx:/d' | sed -e '/next faul
 [dnl
 ---- $1 ----
 MPID $2: extended
-	average health: $3
-	opstate: $4
-	remote_opstate: $5
-	interval: $6
+  average health: $3
+  opstate: $4
+  remote_opstate: $5
+  interval: $6
 Remote MPID $7
-	opstate: $8
+  opstate: $8
 ])
 ])
 
@@ -19,11 +19,11 @@ AT_CHECK([ovs-appctl cfm/show $1 | sed -e '/next CCM tx:/d' | sed -e '/next faul
 [dnl
 ---- $1 ----
 MPID $2: extended
-	fault: $3
-	average health: $4
-	opstate: $5
-	remote_opstate: $6
-	interval: $7
+  fault: $3
+  average health: $4
+  opstate: $5
+  remote_opstate: $6
+  interval: $7
 ])
 ])
 
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 656cdd8446ab..d827d5333116 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -8590,7 +8590,7 @@ ovs-appctl time/stop
 ovs-appctl time/warp 5000 100
 # cfm/show should show 'recv' fault.
 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
-	fault: recv
+  fault: recv
 ])
 # bfd/show should show 'up'.
 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
@@ -8613,7 +8613,7 @@ AT_CHECK([ovs-vsctl set Interface p1 bfd:enable=false])
 ovs-appctl time/warp 5000 100
 # cfm/show should show 'recv' fault.
 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
-	fault: recv
+  fault: recv
 ])
 # bfd/show should show 'down'.
 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
@@ -8633,7 +8633,7 @@ AT_CHECK([ovs-vsctl set Interface p0 bfd:enable=false])
 ovs-appctl time/warp 5000 100
 # cfm/show should show 'recv' fault.
 AT_CHECK([ovs-appctl cfm/show | sed -n '/^.*fault:.*/p'], [0], [dnl
-	fault: recv
+  fault: recv
 ])
 # bfd/show should show 'down'.
 AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
-- 
2.16.1



More information about the dev mailing list