[LTP] [PATCH 2/3] zram/zram_lib.sh: Skip test if zram module can not be removed

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Mon Dec 13 09:05:09 CET 2021


Hi Petr
> Hi Xu,
>
> ...
>>>> ps: zram01 need to rmmod and modprobe zram. So if kernel built with
>>>> CONFIG_ZRAM=y, we also need to TCONF. But it is another story.
>>> +1
>
> We already have v3, but I got confused here in v1, thus asking.
>
>> Since zram_lib.sh uses tst_needs_driver to search module in
>> modules.dep/modules.builtin. Maybe we can introduce a new macro
>> TST_NEEDS_MODULES (like TST_NEEDS_DIRVERS)?
> I got lost here, did you suggest zram_lib.sh to switch to use $TST_NEEDS_MODULE?
Sorry, I don't know ltp shell api already have this TST_NEEDS_MODULE 
macro and so suggest to add a new macro wrongly.

Yes, I want to use TST_NEEDS_MODULE instead of TST_NEEDS_DIRVERS because 
the former is more accurate.

But it seems  our TST_NEEDS_MODULE only can check custom kernel module 
but can't check system kernel module(like ext4.ko.xz, xfs.ext4.ko.xz).

ps: kconfig shell api can also do the thing by using "config_zram=m". So 
I may use kconfig shell api in here in the feature.

Best Regards
Yang Xu
>
>> The difference between TST_NEEDS_MODULES and TST_NEEDS_DIRVERS is that
>> the former needs module, but the latter needs module or builtin.
> Yes, and TST_NEEDS_DRIVERS is already used in zram_lib.sh.
>
> Kind regards,
> Petr
>
>> But I am not sure whether have many shell case needs this(Like network.)
>> Of course, kconfig shell api also can do this.
>
>> Ok, I am back to this case and write my v2 patch.
>
>> Best Regards
>> Yang Xu
>>> Kind regards,
>>> Petr


More information about the ltp mailing list