From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] lib: initialize lib|main_pid to zero in the setup_ipc
Date: Wed, 14 May 2025 10:00:40 +0200 [thread overview]
Message-ID: <aCRNqIAGRnZQJzua@yuki.lan> (raw)
In-Reply-To: <CAEemH2cP78yxJEWi-Z_v=EuXWP+6XDQBNnGMVHKq3pYLiGQRdw@mail.gmail.com>
Hi!
> > > @@ -1393,8 +1396,6 @@ static void do_setup(int argc, char *argv[])
> > > if (tst_test->hugepages.number)
> > > tst_reserve_hugepages(&tst_test->hugepages);
> > >
> > > - setup_ipc();
> > > -
> >
> > I suppose that this has to go before the tst_reserve_hugepages() so that
> > we have results->lib_pid defined and properly clean up after the
> > hugepages. However for that to work we have to set the
> > results->lib_pid directly in the setup_ipc().
>
> In this patch, setup_ipc() is already moved up before the
> tst_reserve_hugpages(). I particularly put it after tst_test->runs_scripts,
> which is mandatory to have .child_needs_reinit initialized first.
>
> And the hugpages cleanup work is completed in tst_sys_conf_restore(0)
> in the do_cleanup, so that might not be a problem.
> I have validated that all hugetlb tests work well.
>
> Also,
>
> Or, did I miss anything?
The problem is that no library cleanup will happen unless lib_pid is
set, that means that tst_brk() will be triggered anywhere in do_setup()
the clanup will not be run because we set the lib_pid after the
do_setup() in the patch.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-05-14 8:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 5:05 [LTP] [PATCH 1/2] lib: initialize lib|main_pid to zero in the setup_ipc Li Wang via ltp
2025-05-13 5:05 ` [LTP] [PATCH 2/2] dirtyc0w_shmem: set child_needs_reinit Li Wang via ltp
2025-05-13 20:31 ` Wei Gao via ltp
2025-05-13 9:33 ` Li Wang via ltp
2025-05-13 12:09 ` Cyril Hrubis
2025-05-13 12:08 ` [LTP] [PATCH 1/2] lib: initialize lib|main_pid to zero in the setup_ipc Cyril Hrubis
2025-05-13 12:42 ` Li Wang via ltp
2025-05-14 8:00 ` Cyril Hrubis [this message]
2025-05-14 8:18 ` Li Wang via ltp
2025-05-14 8:23 ` Cyril Hrubis
2025-05-13 12:51 ` Petr Vorel
2025-05-13 13:02 ` Li Wang via ltp
2025-05-13 13:06 ` Li Wang via ltp
2025-05-13 15:41 ` Petr Vorel
2025-05-14 1:14 ` Li Wang via ltp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aCRNqIAGRnZQJzua@yuki.lan \
--to=chrubis@suse.cz \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.