bpf: test_sysctl run failed on Debian9

Ma Xinjian
2020-04-23T09:14:42Z

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

Hi,  Andrey.

I noticed you add test_sysctl to tools/bpf, so drop this problem to you.

When I run selftests: bpf: test_sysctl, failed with
"(test_sysctl.c:1490: errno: Permission denied) >>> Loading program
(./test_sysctl_prog.o) error."

Testing env: "Debian GNU/Linux 9 (stretch)"

kernel: 5.7.0-rc2    5.7.0-rc1  5.6  both failed

Whole run log and kconfig please see the attatchment.

Error info

```

root@vm-snb-42
/usr/src/perf_selftests-x86_64-rhel-7.6-kselftests-ae83d0b416db002fe95601e7f97f64b59514d936/tools/testing/selftests/bpf#
./test_sysctl

Test case: sysctl wrong attach_type .. [PASS]
Test case: sysctl:read allow all .. [PASS]
Test case: sysctl:read deny all .. [PASS]

[snip]

libbpf: -- END LOG --
libbpf: failed to load program 'cgroup/sysctl'
libbpf: failed to load object './test_sysctl_prog.o'
(test_sysctl.c:1490: errno: Permission denied) >>> Loading program
(./test_sysctl_prog.o) error.

Test case: C prog: read tcp_mem .. [FAIL]
Summary: 37 PASSED, 3 FAILED

```

--
Best Regards.
Ma Xinjian

[-- Attachment #2: bpf_test_sysctl_log.gz --]
[-- Type: application/gzip, Size: 2761 bytes --]

[-- Attachment #3: kconfig.gz --]
[-- Type: application/gzip, Size: 49062 bytes --]