[PATCH 3/4] virnetdevbandwidthtest: Reformat TC cmd line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Our coding style expects a long line to be broken into shorter
lines which are then aligned on the first character, for
instance:

  "some string that's broken "
  "into multiple lines"

However, one can argue that there are few cases where shifting
the alignment makes the code more readable. And this is the case
of expected cmd line for DO_TEST_SET() where a long cmd line can
be aligned on the arguments rather than the binary:

  TC " filter ..."
     " police ..."

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 tests/virnetdevbandwidthtest.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c
index f0873743b4..51e5ec016b 100644
--- a/tests/virnetdevbandwidthtest.c
+++ b/tests/virnetdevbandwidthtest.c
@@ -127,8 +127,8 @@ mymain(void)
                 TC " qdisc del dev eth0 root\n"
                 TC " qdisc del dev eth0 ingress\n"
                 TC " qdisc add dev eth0 ingress\n"
-                TC " filter add dev eth0 parent ffff: protocol all u32 match u32 0 0 "
-                "police rate 1024kbps burst 1024kb mtu 64kb drop flowid :1\n");
+                TC " filter add dev eth0 parent ffff: protocol all u32 match u32 0 0"
+                   " police rate 1024kbps burst 1024kb mtu 64kb drop flowid :1\n");
 
     DO_TEST_SET("<bandwidth>"
                 "  <inbound average='1' peak='2' floor='3' burst='4'/>"
@@ -141,8 +141,8 @@ mymain(void)
                 TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n"
                 TC " filter add dev eth0 parent 1:0 protocol all prio 1 handle 1 fw flowid 1\n"
                 TC " qdisc add dev eth0 ingress\n"
-                TC " filter add dev eth0 parent ffff: protocol all u32 match u32 0 0 "
-                "police rate 5kbps burst 7kb mtu 64kb drop flowid :1\n");
+                TC " filter add dev eth0 parent ffff: protocol all u32 match u32 0 0"
+                   " police rate 5kbps burst 7kb mtu 64kb drop flowid :1\n");
 
     DO_TEST_SET("<bandwidth>"
                 "  <inbound average='4294967295'/>"
@@ -155,9 +155,9 @@ mymain(void)
                 TC " qdisc add dev eth0 parent 1:1 handle 2: sfq perturb 10\n"
                 TC " filter add dev eth0 parent 1:0 protocol all prio 1 handle 1 fw flowid 1\n"
                 TC " qdisc add dev eth0 ingress\n"
-                TC " filter add dev eth0 parent ffff: protocol all u32 match "
-                "u32 0 0 police rate 4294967295kbps burst 4194303kb mtu 64kb "
-                "drop flowid :1\n");
+                TC " filter add dev eth0 parent ffff: protocol all u32 match"
+                   " u32 0 0 police rate 4294967295kbps burst 4194303kb mtu 64kb"
+                   " drop flowid :1\n");
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux