From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 1/2] tst_kernel: Fix search for foo-x86-64 module
Date: Wed, 16 Mar 2022 06:34:45 +0000 [thread overview]
Message-ID: <6231852C.5020506@fujitsu.com> (raw)
In-Reply-To: <20220315122516.3864-2-pvorel@suse.cz>
Hi Petr
I don't understand why we must serach foo-x86-64 module, so what problem
do you meet?
I used 5.17-rc8, it still use foo-x86_64 named rule for
kernel/arch/x86/crypto/libblake2s-x86_64.ko.
If kernel has libblake2s-x86_64 module, then tst_check_driver will use
libblake2s_x86_64 to find, it should succeed.
If kernel doesn't have libblake2s-x86_64 module, then tst_ckeck_driver
will search twice ,the first time use libblake2s-x86_64 and the second
time use libblake2s_x86_64, then search failed.
Best Regards
Yang Xu
> Although modules.{builtin,dep} contain modules with both dashes and
> underscores and use this consistently, there the only exception: modules
> for x86_64 arch are always named x86_64 no matter whether they use
> dashes or underscore for the rest. E.g. libblake2s-x86-64.
>
> modinfo works with all 4 combinations of libblake2s[-_]x86[-_]64,
> thus fix tst_search_driver() to allow the same.
>
> before:
> tst_check_driver 3 TPASS: tst_check_drivers libblake2s-x86_64 2>/dev/null passed as expected
> libblake2s-x86-64tst_check_driver 3 TFAIL: tst_check_drivers libblake2s-x86-64 failed unexpectedly
>
> after fix:
> tst_check_driver 3 TPASS: tst_check_drivers libblake2s-x86_64 2>/dev/null passed as expected
> tst_check_driver 3 TPASS: tst_check_drivers libblake2s-x86-64 2>/dev/null passed as expected
>
> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> ---
> lib/tst_kernel.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/tst_kernel.c b/lib/tst_kernel.c
> index 6db85bff0e..ecf4b917e7 100644
> --- a/lib/tst_kernel.c
> +++ b/lib/tst_kernel.c
> @@ -116,6 +116,11 @@ static int tst_search_driver(const char *driver, const char *file)
> return -1;
> }
>
> + /* always search for x86_64 */
> + char *fix = strstr(driver, "x86-64");
> + if (fix)
> + fix[3] = '_';
> +
> SAFE_ASPRINTF(NULL,&search, "/%s.ko", driver);
>
> f = SAFE_FOPEN(NULL, path, "r");
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-03-16 6:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 12:25 [LTP] [PATCH 0/2] Fix tst_search_driver for x86-64 modules Petr Vorel
2022-03-15 12:25 ` [LTP] [PATCH 1/2] tst_kernel: Fix search for foo-x86-64 module Petr Vorel
2022-03-16 6:34 ` xuyang2018.jy [this message]
2022-03-16 14:11 ` Petr Vorel
2022-03-18 7:40 ` Li Wang
2022-03-18 9:50 ` Petr Vorel
2022-03-21 8:19 ` Li Wang
2022-03-15 12:25 ` [LTP] [PATCH 2/2] tst_check_driver.sh: Add test for x68_64 module Petr Vorel
2022-07-27 13:05 ` 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=6231852C.5020506@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--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 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.