[LTP] [PATCH] testcases/lib: introduce sysctl wrapper

Cyril Hrubis chrubis@suse.cz
Tue Feb 22 17:09:25 CET 2022


Hi!
> Linux sysctl utility does not propagate errors returned from proc writes
> to it's exit code:
> 
> > sysctl -q -w net.ipv4.tcp_congestion_control=dctcp
> sysctl: setting key "net.ipv4.tcp_congestion_control": Operation not permitted
> > echo $?
> 0

I wonder why we use sysctl in the first place, all that it does in our
case is write to /proc/sys/net/.... file. I guess that it may be easier
if we just echo the value into the corresponding files instead.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list