From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/4] lib: Add .modprobe
Date: Fri, 13 Oct 2023 15:50:31 +0200 [thread overview]
Message-ID: <20231013135031.GA740264@pevik> (raw)
In-Reply-To: <CAEemH2es0i-=V5W=2ZhZnN7OOq9BnFkkkSPyU1EUDWj0XHu1WA@mail.gmail.com>
Hi Li,
thanks for your input!
> > Hi all,
> > maybe .modprobe is too short name, but I'm not sure what would be better.
> > Maybe .modprobe_module ?
> .modprobe_module sounds better.
+1
> Also, I think that maybe we can support modprobe some
> third-party modules (written by users) in test case, there are
> a few managed by shell scripts, but if .modprobe_module
> manages them unify in C, it would be nice for test variety.
+1. Also I plan to move some of the LTP kernel modules - tests which use kernel
modules from LTP (e.g. delete_module, init_module, ...)to KUnit or kselftest (to
solve problem with signed modules required by distro kernels, kernel modules
from LTP are then untestable on lockdown). But maybe these modules can stay in
LTP and also be added to KUnit.
But these modules use tst_module_exists_() and SAFE_OPEN(). So you might mean
3rd party modules like nvidia or other proprietary modules, right?
Then, some of the tests in testcases/kernel/device-drivers/ might be obsolete or
also be more suitable in kselftest or KUnit or elsewhere.
...
> > > + if (tst_test->modprobe) {
> > > + const char *name;
> > > + int i;
> > > +
> > > + for (i = 0; (name = tst_test->modprobe[i]); ++i) {
> > > + /* only load module if not already loaded */
> > > + if (!module_loaded(name) &&
> > tst_check_builtin_driver(name)) {
> > Also we could make it independent on modules.builtin (NixOS based problem -
> > missing these files). I.e. we would keep only module_loaded(), remove
> > tst_check_builtin_driver(). But then we could not run rmmod / modprobe -r,
> > or we would have to ignore it's exit code (rmmod on builtin module) fails.
> Or we add one step to detect modules.builtin file, if no,
> then just print a Warning at unload in fails?
Unloading shouldn't be problem since it's in cleanup (thus TBROK => TWARN).
But I'll test it.
Or do you mean that on missing modules.builtin would test itself be working as
module is presented (have warning on that modules.* files are missing and
warning on rmmod?).
Would you do it for both .modprobe_module and .needs_drivers? Or just one
of them?
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-10-13 13:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 7:47 [LTP] [PATCH 0/4] Add .modprobe (loading modules in C API) Petr Vorel
2023-10-13 7:47 ` [LTP] [PATCH 1/4] tst_kernel: Add safe_check_driver() Petr Vorel
2023-10-13 12:24 ` Petr Vorel
2023-10-13 7:47 ` [LTP] [PATCH 2/4] lib: Add .modprobe Petr Vorel
2023-10-13 12:09 ` Li Wang
2023-10-13 12:22 ` Petr Vorel
2023-10-16 9:05 ` Li Wang
2023-10-27 12:01 ` Petr Vorel
2023-11-01 16:33 ` Cyril Hrubis
2023-11-03 15:22 ` Petr Vorel
2023-10-13 12:30 ` Petr Vorel
2023-10-13 13:27 ` Li Wang
2023-10-13 13:50 ` Petr Vorel [this message]
2023-10-16 8:28 ` Li Wang
2023-11-01 16:26 ` Cyril Hrubis
2023-11-01 16:35 ` Cyril Hrubis
2023-11-03 15:54 ` Petr Vorel
2023-11-03 16:31 ` Edward Liaw via ltp
2023-11-03 12:12 ` Petr Vorel
2023-11-03 12:21 ` Cyril Hrubis
2023-11-03 14:58 ` Petr Vorel
2023-10-13 7:47 ` [LTP] [PATCH 3/4] madvise11: Replace .needs_drivers with .modprobe Petr Vorel
2023-10-13 7:47 ` [LTP] [PATCH 4/4] can_bcm01: Move vcan to .modprobe Petr Vorel
2023-11-02 9:22 ` Richard Palethorpe
2023-11-03 15:08 ` Petr Vorel
2023-10-16 7:47 ` [LTP] [PATCH 0/4] Add .modprobe (loading modules in C API) Richard Palethorpe
2023-10-16 8:41 ` Richard Palethorpe
2023-10-16 15:12 ` Cyril Hrubis
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=20231013135031.GA740264@pevik \
--to=pvorel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox