Commit 5bc60de5 authored by Jiri Pirko's avatar Jiri Pirko Committed by Alexei Starovoitov
Browse files

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: default avatarkernel test robot <rong.a.chen@intel.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent 95fbda1e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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):