• Andrey Ignatov's avatar
    selftests/bpf: Test sysctl_get_current_value helper · 11ff34f7
    Andrey Ignatov authored
    Test sysctl_get_current_value on sysctl read and write, buffers with
    enough space and too small buffers to get E2BIG and truncated result,
    etc.
    
      # ./test_sysctl
      ...
      Test case: sysctl_get_current_value sysctl:read ok, gt .. [PASS]
      Test case: sysctl_get_current_value sysctl:read ok, eq .. [PASS]
      Test case: sysctl_get_current_value sysctl:read E2BIG truncated ..  [PASS]
      Test case: sysctl_get_current_value sysctl:read EINVAL .. [PASS]
      Test case: sysctl_get_current_value sysctl:write ok .. [PASS]
      Summary: 16 PASSED, 0 FAILED
    Signed-off-by: default avatarAndrey Ignatov <rdna@fb.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    11ff34f7
test_sysctl.c 17.7 KB