linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alice Ferrazzi <alice.ferrazzi@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: ast@kernel.org, daniel@iogearbox.net, shuah@kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alice Ferrazzi <alice.ferrazzi@gmail.com>
Subject: [PATCH 7/7] selftest/bpf: fix E501 line too long
Date: Tue, 11 Dec 2018 20:56:07 +0900	[thread overview]
Message-ID: <20181211115607.13774-8-alice.ferrazzi@gmail.com> (raw)
In-Reply-To: <20181211115607.13774-1-alice.ferrazzi@gmail.com>

fix PEP8 style issues

Signed-off-by: Alice Ferrazzi <alice.ferrazzi@gmail.com>
---
 tools/testing/selftests/bpf/test_offload.py | 35 +++++++++++++--------
 1 file changed, 22 insertions(+), 13 deletions(-)

diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selftests/bpf/test_offload.py
index b06cc0eea0eb..3f78da0f87d5 100755
--- a/tools/testing/selftests/bpf/test_offload.py
+++ b/tools/testing/selftests/bpf/test_offload.py
@@ -208,7 +208,8 @@ def bpftool_prog_list_wait(expected=0, n_retry=20):
         if nprogs == expected:
             return
         time.sleep(0.05)
-    raise Exception("Time out waiting for program counts to stabilize want %d, have %d" % (expected, nprogs))
+    raise Exception("Time out waiting for program counts \
+to stabilize want %d, have %d" % (expected, nprogs))
 
 
 def bpftool_map_list_wait(expected=0, n_retry=20):
@@ -217,7 +218,8 @@ def bpftool_map_list_wait(expected=0, n_retry=20):
         if nmaps == expected:
             return
         time.sleep(0.05)
-    raise Exception("Time out waiting for map counts to stabilize want %d, have %d" % (expected, nmaps))
+    raise Exception("Time out waiting for map counts to \
+stabilize want %d, have %d" % (expected, nmaps))
 
 
 def bpftool_prog_load(sample, file_name, maps=[], prog_type="xdp", dev=None,
@@ -413,7 +415,8 @@ class NetdevSim:
             if nbound == bound and nprogs == total:
                 return
             time.sleep(0.05)
-        raise Exception("Time out waiting for program counts to stabilize want %d/%d, have %d bound, %d loaded" % (
+        raise Exception("Time out waiting for program counts to \
+stabilize want %d/%d, have %d bound, %d loaded" % (
             bound, total, nbound, nprogs))
 
     def set_ns(self, ns):
@@ -533,7 +536,7 @@ class NetdevSim:
         return ethtool(self, "-K", args, fail=fail)
 
 
-################################################################################
+###############################################################################
 def clean_up():
     global files, netns, devs
 
@@ -617,7 +620,8 @@ def check_extack_nsim(output, reference, args):
 
 
 def check_no_extack(res, needle):
-    fail((res[1] + res[2]).count(needle) or (res[1] + res[2]).count("Warning:"),
+    fail((res[1] + res[2]).count(needle) or (res[1] +
+         res[2]).count("Warning:"),
          "Found '%s' in command output, leaky extack?" % (needle))
 
 
@@ -778,8 +782,9 @@ try:
     start_test("Test TC replace bad flags...")
     for i in range(3):
         for j in range(3):
-            ret, _ = sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1,
-                                            skip_sw=(j == 1), skip_hw=(j == 2),
+            ret, _ = sim.cls_bpf_add_filter(obj, op="replace", prio=1,
+                                            handle=1, skip_sw=(j == 1),
+                                            skip_hw=(j == 2),
                                             fail=False)
             fail(bool(ret) != bool(j),
                  "Software TC incorrect load in replace test, iteration %d" %
@@ -824,9 +829,11 @@ try:
     fail(dprog["state"] != "xlated", "Offloaded program state not translated")
     fail(dprog["loaded"] != "Y", "Offloaded program is not loaded")
 
-    start_test("Test disabling TC offloads is rejected while filters installed...")
+    start_test("Test disabling TC offloads is rejected while \
+filters installed...")
     ret, _ = sim.set_ethtool_tc_offloads(False, fail=False)
-    fail(ret == 0, "Driver should refuse to disable TC offloads with filters installed...")
+    fail(ret == 0, "Driver should refuse to disable TC offloads with filters \
+installed...")
 
     start_test("Test qdisc removal frees things...")
     sim.tc_flush_filters()
@@ -922,7 +929,8 @@ try:
     offload = bpf_pinned("/sys/fs/bpf/offload")
     ret, _, err = sim.set_xdp(offload, "drv", fail=False, include_stderr=True)
     fail(ret == 0, "attached offloaded XDP program to drv")
-    check_extack(err, "using device-bound program without HW_MODE flag is not supported.", args)
+    check_extack(err, "using device-bound program without HW_MODE flag is not \
+supported.", args)
     rm("/sys/fs/bpf/offload")
     sim.wait_for_flush()
 
@@ -1072,8 +1080,8 @@ try:
     delay_msec = 500
     sim.dfs["bpf_bind_verifier_delay"] = delay_msec
     start = time.time()
-    cmd_line = "tc filter add dev %s ingress bpf %s da skip_sw" % \
-               (sim['ifname'], obj)
+    cmd_line = "tc filter add dev %s ingress bpf %s da skip_sw" %
+    (sim['ifname'], obj)
     tc_proc = cmd(cmd_line, background=True, fail=False)
     # Wait for the verifier to start
     while sim.dfs_num_bound_progs() <= 2:
@@ -1244,7 +1252,8 @@ try:
     ret, _ = simA.set_xdp(progB, "offload", force=True, JSON=False, fail=False)
     fail(ret == 0, "cross-ASIC program allowed")
     for d in simB:
-        ret, _ = d.set_xdp(progA, "offload", force=True, JSON=False, fail=False)
+        ret, _ = d.set_xdp(progA, "offload", force=True, JSON=False,
+                           fail=False)
         fail(ret == 0, "cross-ASIC program allowed")
 
     start_test("Test multi-dev ASIC cross-dev install...")
-- 
2.19.2


  parent reply	other threads:[~2018-12-11 11:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 11:56 [PATCH 0/7] selftest/bpf fix PEP8 warnings Alice Ferrazzi
2018-12-11 11:56 ` [PATCH 1/7] selftest/bpf: Fix trailing semicolon in the statement Alice Ferrazzi
2018-12-11 11:56 ` [PATCH 2/7] selftest/bpf: optimize import Alice Ferrazzi
2018-12-11 11:56 ` [PATCH 3/7] selftest/bpf: PEP 8: multiple statements on one line (colon) Alice Ferrazzi
2018-12-11 11:56 ` [PATCH 4/7] selftest/bpf: test_offload PEP8 format style fix Alice Ferrazzi
2018-12-12 18:41   ` Jakub Kicinski
2018-12-11 11:56 ` [PATCH 5/7] selftest/bpf: Fix PEP8 ambiguous variable name Alice Ferrazzi
2018-12-11 11:56 ` [PATCH 6/7] selftest/bpf: remove redundant parenthesis Alice Ferrazzi
2018-12-12 19:04   ` Jakub Kicinski
2018-12-12 21:15     ` Edward Cree
2018-12-13  0:25       ` Jakub Kicinski
2018-12-11 11:56 ` Alice Ferrazzi [this message]
2018-12-12 10:24   ` [PATCH 7/7] selftest/bpf: fix E501 line too long Daniel Borkmann
2018-12-12 19:06     ` Jakub Kicinski
2018-12-25  0:35   ` [LKP] [selftest/bpf] b870be2f1b: kernel_selftests.bpf.test_offload.py.fail kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181211115607.13774-8-alice.ferrazzi@gmail.com \
    --to=alice.ferrazzi@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).