On 8/19/19 3:59 AM, Ilya Leoshkevich wrote: > A lot of test_sysctl sub-tests fail due to handling strings as a bunch > of immediate values in a little-endian-specific manner. > > Fix by wrapping all immediates in bpf_ntohl and the new bpf_be64_to_cpu. > > Also, sometimes tests fail because sysctl() unexpectedly succeeds with > an inappropriate "Unexpected failure" message and a random errno. Zero > out errno before calling sysctl() and replace the message with > "Unexpected success". > > Fixes: 1f5fa9ab6e2e ("selftests/bpf: Test BPF_CGROUP_SYSCTL") > Fixes: 9a1027e52535 ("selftests/bpf: Test file_pos field in bpf_sysctl ctx") > Fixes: 6041c67f28d8 ("selftests/bpf: Test bpf_sysctl_get_name helper") > Fixes: 11ff34f74e32 ("selftests/bpf: Test sysctl_get_current_value helper") > Fixes: 786047dd08de ("selftests/bpf: Test bpf_sysctl_{get,set}_new_value helpers") > Fixes: 8549ddc832d6 ("selftests/bpf: Test bpf_strtol and bpf_strtoul helpers") > Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx> Acked-by: Yonghong Song <yhs@xxxxxx>