All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH] device-drivers/block/block_dev_kernel: Delete test_genhd.c
Date: Wed, 23 Jul 2025 21:09:40 +0200	[thread overview]
Message-ID: <20250723190940.GA162896@pevik> (raw)
In-Reply-To: <20250723011807.15857-1-yangtiezhu@loongson.cn>

Hi Tiezhu,

> test_genhd.c is not used any more, just delete it. While at it,

Thanks for your work, merged.

> update README to reflect the reality.

See below...

> Suggested-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  testcases/kernel/device-drivers/block/README  | 17 +-----
>  .../block/block_dev_kernel/test_genhd.c       | 53 -------------------
>  2 files changed, 2 insertions(+), 68 deletions(-)
>  delete mode 100644 testcases/kernel/device-drivers/block/block_dev_kernel/test_genhd.c

> diff --git a/testcases/kernel/device-drivers/block/README b/testcases/kernel/device-drivers/block/README
> index 812436bb8..1490fd295 100644
> --- a/testcases/kernel/device-drivers/block/README
> +++ b/testcases/kernel/device-drivers/block/README
> @@ -5,19 +5,6 @@ Module under test: linux/block/genhd.c
>   -----------------------------+---------------+---------------
>    register_blkdev()           | linux/fs.h    | ltp_block_dev.c
>    unregister_blkdev()         | linux/fs.h    | ltp_block_dev.c
> -  blk_register_region()       | linux/genhd.h |
> -  blk_unregister_region()     | linux/genhd.h |
> -  add_disk()                  | linux/genhd.h |

Internal kernel header <linux/genhd.h> was merged into in <linux/blkdev.h> in
v5.18-rc1. That means that functions was moved there. Also, some functions was
renamed, although I did not investigate whether before this change (i.e. renamed
in <linux/genhd.h>) or after in <linux/blkdev.h>. I suppose both.

Also at least add_disk() and del_gendisk() is in <linux/blkdev.h> and it's being
tested in other LTP modules:

$ git grep -l add_disk
testcases/kernel/device-drivers/include/includeTest.c
testcases/kernel/device-drivers/nls/nlsTest.c
testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c

$ git grep -l del_gendisk
testcases/kernel/device-drivers/include/includeTest.c
testcases/kernel/device-drivers/nls/nlsTest.c
testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c

These are outside of testcases/kernel/device-drivers/block/. I wonder if this
README makes sense when there are other kernel modules using block driver
related functions. But anyway, outdated README is just expected in these old
modules with questionable usability (sometimes I think we should just delete
them all and let kernel internals being tested in Kunit).

Kind regards,
Petr

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

      reply	other threads:[~2025-07-23 19:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23  1:18 [LTP] [PATCH] device-drivers/block/block_dev_kernel: Delete test_genhd.c Tiezhu Yang
2025-07-23 19:09 ` Petr Vorel [this message]

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=20250723190940.GA162896@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=yangtiezhu@loongson.cn \
    /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.