[LTP] [PATCH] lib: Move setup_ipc() to the beginning of do_setup()
zhaogongyi
zhaogongyi@huawei.com
Thu Oct 20 13:58:02 CEST 2022
Hi,
>
> Hello,
>
> Zhao Gongyi via ltp <ltp@lists.linux.it> writes:
>
> > Move setup_ipc() to the beginning of do_setup() since we would use the
> > 'results' immediately in do_setup(), otherwise,there is no Results
> > statistics when calling the tst_brk in do_setup().
> >
> > Signed-off-by: Zhao Gongyi <zhaogongyi@huawei.com>
> > ---
> > lib/tst_test.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/tst_test.c b/lib/tst_test.c index
> > 8ccde1629..02fc6a06e 100644
> > --- a/lib/tst_test.c
> > +++ b/lib/tst_test.c
> > @@ -1096,6 +1096,8 @@ static void do_cgroup_requires(void)
> >
> > static void do_setup(int argc, char *argv[]) {
> > + setup_ipc();
> > +
>
> We can't move it to before checking if tst_test is null.
Actrually, tst_test is not null for ever since we have a definition at lint 375 in tst_test.h:
static struct tst_test test;
So, is there any problem exist that I did not see?
Regards,
Gongyi
More information about the ltp
mailing list