summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-10-15 12:00:56 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-10-15 16:27:25 -0700
commit5bc60de50dfea235634fdf38cbc992fb968d113b (patch)
tree58efff58d729d9be645a768dd9ae01164bfd756f
parent95fbda1e37384b9c270218b52718c83ddf4bb34e (diff)
downloadtalos-op-linux-5bc60de50dfea235634fdf38cbc992fb968d113b.tar.gz
talos-op-linux-5bc60de50dfea235634fdf38cbc992fb968d113b.zip
selftests: bpf: Don't try to read files without read permission
Recently couple of files that are write only were added to netdevsim debugfs. Don't read these files and avoid error. Reported-by: kernel test robot <rong.a.chen@intel.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
-rwxr-xr-xtools/testing/selftests/bpf/test_offload.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selftests/bpf/test_offload.py
index 15a666329a34..c44c650bde3a 100755
--- a/tools/testing/selftests/bpf/test_offload.py
+++ b/tools/testing/selftests/bpf/test_offload.py
@@ -312,7 +312,7 @@ class DebugfsDir:
if f == "ports":
continue
p = os.path.join(path, f)
- if os.path.isfile(p):
+ if os.path.isfile(p) and os.access(p, os.R_OK):
_, out = cmd('cat %s/%s' % (path, f))
dfs[f] = out.strip()
elif os.path.isdir(p):
OpenPOWER on IntegriCloud