[LTP] [PATCH 1/1] lib: Skip tst_{disable, enable}_oom_protection() for non-root

Cyril Hrubis chrubis@suse.cz
Wed Dec 22 11:40:45 CET 2021


Hi!
> We use just FILE_PRINTF(), but we check the result and TWARN, which causes the
> failure in CI.

Which is why I argued that we should add a version that does not print
anything and just returns if the operation was successful or not. I
guess it could be called TRY_FILE_PRINTF() or something.

> I've sent v2, which checks CAP_SYS_ADMIN and CAP_SYS_RESOURCE,
> but feel free just to bring simpler solution.

I still think that the most acurate test would be just writing to the
file and checking the result.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list