[LTP] [PATCH v7 3/4] ioctl_loop01.c: Add new support .needs_cmds
Li Wang
liwang@redhat.com
Mon Jan 19 04:00:07 CET 2026
Wei Gao <wegao@suse.com> wrote:
>
> > Can we just reuse the 'tst_test->needs_cmds.present' result?
> >
> You cannot access tst_test->needs_cmds.present directly as if it were a
> single variable,
> because needs_cmds is an array (a list) of structures. To get the status
> of a specific command
> like "parted", you must iterate through that list to find the entry
> matching that name.
>
So how about using: tst_test->needs_cmds[0].present?
--
Regards,
Li Wang
More information about the ltp
mailing list