public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/4] lib: Add .modprobe
Date: Wed, 1 Nov 2023 17:33:00 +0100	[thread overview]
Message-ID: <ZUJ9vJG2gSdyBfAF@yuki> (raw)
In-Reply-To: <20231027120104.GA657078@pevik>

Hi!
> > What about renaming it as tst_module_is_loaded() and move into tst_kernel.h?
> > I guess we could make use of it widely for checking module loading or not.
> 
> I can do that, but lib/tst_kernel.c uses the old API. I guess it would fit
> better in lib/tst_module.c, but that also uses the old API. Most of the tests
> are converted, but at least these modules are still in the old API and use
> tst_module_load from tst_module.h:
>
> IMHO We need another file, which would be new API only. I'm also not sure if
> it's a good idea to put another file with just single function to it. We already
> have 38 lib/tst_*.c files which use new API. Any tip, what to use?
> Or should I really put it into lib/tst_module.c ain include/tst_module.h, but
> not into include/old/old_module.h (as we want old tests to be converted first?).

I would just put the new functions into tst_module.h and we can put the
into tst_module_new.c in lib/ and move the function to tst_module.c once
the tst_module.c has been converted to new API.

> > And here print the name to tell people the module is loaded.
> +1

+1

> > This part could be as a separate function like tst_load_module() and
> > built single into another lib. We prefer to keep the main tst_test.c
> > as a simple outline.
> 
> +1 for a separate function, it should be in the same file as
> tst_module_is_loaded().

+1

> > On the other hand, the extern functions can be used separately to let
> > modules to be loaded and unloaded during the test iteration.
> > It gives us more flexibility in test case design.
> 
> Having it as the separate function would allow to use it in
> kvm_pagefault01.c and zram03.c - tiny simplification as they now call
> SAFE_CMD().
> 
> kvm_pagefault01.c and can_common.h use them parameters, it might be worth
> to implement them.
> 
> > Print unload module name.
> +1

+1

> > > +               }
> > > +       }
> 
> 
> > Here as well. something maybe like tst_unload_module().
> 
> +1

+1


-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-11-01 16:32 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 [this message]
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
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=ZUJ9vJG2gSdyBfAF@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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