[ovs-dev] [PATCH 08/13] bond: Remove tabs from output.

Ben Pfaff blp at ovn.org
Mon Jun 4 21:27:45 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>
---
 ofproto/bond.c        |  8 ++++----
 tests/lacp.at         | 52 +++++++++++++++++++++++++--------------------------
 tests/ofproto-dpif.at | 20 ++++++++++----------
 3 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/ofproto/bond.c b/ofproto/bond.c
index 11d28e1379b9..f87cdba7908f 100644
--- a/ofproto/bond.c
+++ b/ofproto/bond.c
@@ -1374,15 +1374,15 @@ bond_print_details(struct ds *ds, const struct bond *bond)
         ds_put_format(ds, "\nslave %s: %s\n",
                       slave->name, slave->enabled ? "enabled" : "disabled");
         if (slave == bond->active_slave) {
-            ds_put_cstr(ds, "\tactive slave\n");
+            ds_put_cstr(ds, "  active slave\n");
         }
         if (slave->delay_expires != LLONG_MAX) {
-            ds_put_format(ds, "\t%s expires in %lld ms\n",
+            ds_put_format(ds, "  %s expires in %lld ms\n",
                           slave->enabled ? "downdelay" : "updelay",
                           slave->delay_expires - time_msec());
         }
 
-        ds_put_format(ds, "\tmay_enable: %s\n",
+        ds_put_format(ds, "  may_enable: %s\n",
                       slave->may_enable ? "true" : "false");
 
         if (!bond_is_balanced(bond)) {
@@ -1400,7 +1400,7 @@ bond_print_details(struct ds *ds, const struct bond *bond)
 
             be_tx_k = be->tx_bytes / 1024;
             if (be_tx_k) {
-                ds_put_format(ds, "\thash %d: %"PRIu64" kB load\n",
+                ds_put_format(ds, "  hash %d: %"PRIu64" kB load\n",
                           hash, be_tx_k);
             }
 
diff --git a/tests/lacp.at b/tests/lacp.at
index 6dd949010bdf..ee8100858541 100644
--- a/tests/lacp.at
+++ b/tests/lacp.at
@@ -128,10 +128,10 @@ lacp_fallback_ab: false
 active slave mac: 00:00:00:00:00:00(none)
 
 slave p1: disabled
-	may_enable: false
+  may_enable: false
 
 slave p2: disabled
-	may_enable: false
+  may_enable: false
 
 ])
 OVS_VSWITCHD_STOP
@@ -292,10 +292,10 @@ lacp_status: negotiated
 lacp_fallback_ab: false
 
 slave p0: enabled
-	may_enable: true
+  may_enable: true
 
 slave p1: enabled
-	may_enable: true
+  may_enable: true
 
 ---- bond1 ----
 bond_mode: balance-tcp
@@ -307,15 +307,15 @@ lacp_status: negotiated
 lacp_fallback_ab: false
 
 slave p2: enabled
-	may_enable: true
+  may_enable: true
 
 slave p3: enabled
-	may_enable: true
+  may_enable: true
 
 ])
 AT_CHECK([grep 'active slave$' stdout], [0], [dnl
-	active slave
-	active slave
+  active slave
+  active slave
 ])
 
 # Redirect the patch link between p0 and p2 so that no packets get
@@ -430,11 +430,11 @@ lacp_fallback_ab: false
 <active slave mac del>
 
 slave p0: disabled
-	may_enable: false
+  may_enable: false
 
 slave p1: enabled
-	active slave
-	may_enable: true
+  active slave
+  may_enable: true
 
 ---- bond1 ----
 bond_mode: balance-tcp
@@ -447,11 +447,11 @@ lacp_fallback_ab: false
 <active slave mac del>
 
 slave p2: disabled
-	may_enable: false
+  may_enable: false
 
 slave p3: enabled
-	active slave
-	may_enable: true
+  active slave
+  may_enable: true
 
 ])
 
@@ -562,11 +562,11 @@ lacp_fallback_ab: false
 <active slave mac del>
 
 slave p0: disabled
-	may_enable: false
+  may_enable: false
 
 slave p1: enabled
-	active slave
-	may_enable: true
+  active slave
+  may_enable: true
 
 ---- bond1 ----
 bond_mode: balance-tcp
@@ -579,11 +579,11 @@ lacp_fallback_ab: false
 <active slave mac del>
 
 slave p2: disabled
-	may_enable: false
+  may_enable: false
 
 slave p3: enabled
-	active slave
-	may_enable: true
+  active slave
+  may_enable: true
 
 ])
 
@@ -699,11 +699,11 @@ lacp_fallback_ab: false
 <active slave mac del>
 
 slave p0: enabled
-	may_enable: true
+  may_enable: true
 
 slave p1: enabled
-	active slave
-	may_enable: true
+  active slave
+  may_enable: true
 
 ---- bond1 ----
 bond_mode: balance-tcp
@@ -716,11 +716,11 @@ lacp_fallback_ab: false
 <active slave mac del>
 
 slave p2: enabled
-	may_enable: true
+  may_enable: true
 
 slave p3: enabled
-	active slave
-	may_enable: true
+  active slave
+  may_enable: true
 
 ])
 
diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index 2bfbfa2f3445..f9ae8b28213c 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -8601,10 +8601,10 @@ AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
 ])
 # bond/show should show 'may-enable: true' for all slaves.
 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
-	may_enable: true
-	may_enable: true
-	may_enable: true
-	may_enable: true
+  may_enable: true
+  may_enable: true
+  may_enable: true
+  may_enable: true
 ])
 
 # now disable the bfd on p1.
@@ -8622,8 +8622,8 @@ AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
 ])
 # bond/show should show 'may-enable: false' for p0.
 AT_CHECK([ovs-appctl bond/show br0bond | sed -n '/^.*may_enable:.*/p'], [0], [dnl
-	may_enable: false
-	may_enable: true
+  may_enable: false
+  may_enable: true
 ])
 
 # now enable the bfd on p1 and disable bfd on p0.
@@ -8642,10 +8642,10 @@ AT_CHECK([ovs-appctl bfd/show | sed -n '/^.*Session State:.*/p'], [0], [dnl
 ])
 # bond/show should show 'may-enable: false' for p0 and p1.
 AT_CHECK([ovs-appctl bond/show | sed -n '/^.*may_enable:.*/p'], [0], [dnl
-	may_enable: false
-	may_enable: true
-	may_enable: false
-	may_enable: true
+  may_enable: false
+  may_enable: true
+  may_enable: false
+  may_enable: true
 ])
 
 OVS_VSWITCHD_STOP
-- 
2.16.1



More information about the dev mailing list