[LTP] [PATCH 1/1] io_destroy01: TCONF when unsupported
Petr Vorel
pvorel@suse.cz
Wed Sep 30 11:10:21 CEST 2020
Hi,
> 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.
@Yang: Yes, have a look at various foo_supported_by_kernel() helper functions in
include/lapi/ (added by Viresh Kumar).
Kind regards,
Petr
More information about the ltp
mailing list