[LTP] [PATCH 1/1] io_destroy01: TCONF when unsupported

Richard Palethorpe rpalethorpe@suse.de
Tue Sep 29 13:47:49 CEST 2020


Hello,

Yang Xu <xuyang2018.jy@cn.fujitsu.com> writes:

> Hi Petr
>
>> Hi Yang,
>>
>>> Hi Petr
>>> Why not using kconfig in tst_test struct.
>>
>> We should probably use tst_syscall().
>> But using kconfig is not 1) needed (tst_syscall() most reliable way) 2) kconfig
>> requires having kernel config available, which is not on some platforms.
> I see. At the first, I prefer to like to use kconfig because it only 
> tests io_destory one time on kernel without CONFIG_AIO  when we use -i 
> parameters,  but using libaio wrapper is stable. So it is ok.

Kconfig can even be wrong (most likely with out-of-tree patches) or we
might look at the wrong option as things are moved around
sometimes. This is another instance of us trying to guess if something
can be done without trying it.

I guess there are some things where it is not as simple as trying a
system call, but in cases where ENOSYS will be returned there is no need
to look at the config except maybe for diagnostic purposes. If you are
concerned about '-i' then you can even just make in invalid syscall in
setup to see what error it returns.

-- 
Thank you,
Richard.


More information about the ltp mailing list