From: Petr Vorel <pvorel@suse.cz>
To: Edward Liaw <edliaw@google.com>
Cc: ltp@lists.linux.it, Richard Palethorpe <rpalethorpe@suse.com>
Subject: Re: [LTP] [PATCH 1/1] lib/tst_module.c: Replace "rmmod" with "modprobe -r"
Date: Fri, 3 Nov 2023 23:16:30 +0100 [thread overview]
Message-ID: <20231103221630.GA1149500@pevik> (raw)
In-Reply-To: <CAG4es9UBvDeQr6Rm-XU_t=O14OTudTT3yeZQDMexqv98B8cbZA@mail.gmail.com>
Hi Edward,
> Hi,
> On Fri, Nov 3, 2023 at 9:03 AM Petr Vorel <pvorel@suse.cz> wrote:
> > "modprobe -r" will remove also the dependencies loaded for kernel
> > modules.
> > Suggested-by: Cyril Hrubis <chrubis@suse.cz>
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > lib/tst_module.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > diff --git a/lib/tst_module.c b/lib/tst_module.c
> > index 9bd443623..e52bb6e00 100644
> > --- a/lib/tst_module.c
> > +++ b/lib/tst_module.c
> > @@ -105,7 +105,7 @@ void tst_module_unload_(void (cleanup_fn)(void), const char *mod_name)
> > {
> > int i, rc;
> > - const char *const argv[] = { "rmmod", mod_name, NULL };
> > + const char *const argv[] = { "modprobe", "-r", mod_name, NULL };
> > rc = 1;
> > for (i = 0; i < 50; i++) {
> > --
> > 2.42.0
> This is fine with all the supported versions of Android GKI.
> Reviewed-by: Edward Liaw <edliaw@google.com>
Thanks for confirmation. Although this patch will not be merged, we know we can
use 'modprobe -r'.
BTW is it ok for AOSP which uses latest LTP to rely on modules.builtin and
modules.dep? (there is #ifdef __ANDROID__ in tst_search_driver()).
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-11-03 22:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 16:03 [LTP] [PATCH 1/1] lib/tst_module.c: Replace "rmmod" with "modprobe -r" Petr Vorel
2023-11-03 16:53 ` Edward Liaw via ltp
2023-11-03 22:16 ` Petr Vorel [this message]
2023-11-03 23:02 ` Edward Liaw via ltp
2023-11-03 18:54 ` Petr Vorel
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=20231103221630.GA1149500@pevik \
--to=pvorel@suse.cz \
--cc=edliaw@google.com \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox