summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-05-25 16:50:54 -0700
committerBen Pfaff <blp@ovn.org>2018-06-11 15:31:42 -0700
commitf6d6edc0b013c7b4418be2f35308fd2192a318a7 (patch)
tree66cde99448a45b64245310132701ed531aea5ff1
parentfc002ed3a31406190c9c0abb6cd998aa5b8460d7 (diff)
downloadopenvswitch-f6d6edc0b013c7b4418be2f35308fd2192a318a7.tar.gz
cfm: Remove tabs from output.
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@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
-rw-r--r--lib/cfm.c20
-rw-r--r--tests/cfm.at20
-rw-r--r--tests/ofproto-dpif.at6
3 files changed, 23 insertions, 23 deletions
diff --git a/lib/cfm.c b/lib/cfm.c
index 19957a968..71d2c0206 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 fa7604c22..8c8bd20ad 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 656cdd844..d827d5333 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