[LTP] [PATCH v2 3/3] zram/zram03: Convert into new api

Cyril Hrubis chrubis@suse.cz
Fri Dec 10 13:28:04 CET 2021


Hi!
> Also add removing zram module step in setup, so we can avoid the situation that
> zram module is being used by zram-generator.
> 
> Fixes: #888
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
> Not use lsmod to detect because tst_cmd doesn't support "lsmod |grep zram". Or
> I miss something?

We can do the same here as we do for the swap detection here.

Just SAFE_FOPEN("/proc/modules") and loop over the lines and do strstr() for zram.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list