Skip to content
Commit 75fa3c6e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov
Browse files

tcp_read_sysctl_limits: hide a useless error, leave a warning



When running tests, there are a lot of errors like this:

 (00.000053) Error (sysctl.c:367): Can't open sysctl net/ipv4/tcp_rmem: No such file or directory

As Andrew explained, tests are running in a netns that lacks
this sysctl. Use CTL_FLAGS_OPTIONAL flag to hide the error message.

Since with this flag sysctl_op() will most probably return 0,
add an additional check for vect[0] == 0 to detect that the file
was not read and show an appropriate warning, i.e.
"TCP mem sysctls are not available. Using defaults."

Signed-off-by: default avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent b1599c3d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment