Skip to content

Commit

Permalink
Revert "selftests: bpf: Don't try to read files without read permission"
Browse files Browse the repository at this point in the history
This reverts commit 5bc60de ("selftests: bpf: Don't try to read
files without read permission").

Quoted commit does not work at all, and was never tested.
Script requires root permissions (and tests for them)
and os.access() will always return true for root.

The correct fix is needed in the bpf tree, so let's just
revert and save ourselves the merge conflict.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Pirko <jiri@resnulli.us>
Link: https://lore.kernel.org/bpf/20191101005127.1355-1-jakub.kicinski@netronome.com
  • Loading branch information
Jakub Kicinski authored and Daniel Borkmann committed Nov 1, 2019
1 parent 0608711 commit 75b0bfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/test_offload.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def _debugfs_dir_read(self, path):
if f == "ports":
continue
p = os.path.join(path, f)
if os.path.isfile(p) and os.access(p, os.R_OK):
if os.path.isfile(p):
_, out = cmd('cat %s/%s' % (path, f))
dfs[f] = out.strip()
elif os.path.isdir(p):
Expand Down

0 comments on commit 75b0bfd

Please sign in to comment.