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

Petr Vorel pvorel@suse.cz
Tue Feb 22 19:31:29 CET 2022


Hi Nikita,

> Hi!
> > LTP sometimes uses sysctl under 'tst_net_run' wrapper

> > Using shell redirection under wrapper is quite tricky if possible at all.
Can you be more specific when sysctl with tst_net_run does not work?

> Ah, right. But I guess that adding a simple tool that would behave just
> as echo but the first parameter would be filename may be cleaner
> solution than wrapping around the sysctl command.
+1. If really requested please create C binary testcases/lib/tst_sysctl.c.
Code which use simple SAFE_FILE_PRINTF() as many C code does would be fairly
simple, more portable and probably faster than shell script. FYI we tend to
rewrite shell code into C.

Kind regards,
Petr


More information about the ltp mailing list