From: Jakub Kicinski Date: Fri, 1 Nov 2019 00:51:27 +0000 (-0700) Subject: Revert "selftests: bpf: Don't try to read files without read permission" X-Git-Tag: microblaze-v5.6-rc1~181^2~249^2~3 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=75b0bfd2e1a7d0c698b617f5e5ceaf056bdcaef7;p=linux-2.6-microblaze.git Revert "selftests: bpf: Don't try to read files without read permission" This reverts commit 5bc60de50dfe ("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 Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Jiri Pirko Link: https://lore.kernel.org/bpf/20191101005127.1355-1-jakub.kicinski@netronome.com --- diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selftests/bpf/test_offload.py index c44c650bde3a..15a666329a34 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) 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):