linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Zhang Yi <yi.zhang@huaweicloud.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, adilger.kernel@dilger.ca,
	ojaswin@linux.ibm.com, linux@roeck-us.net, yi.zhang@huawei.com,
	libaokun1@huawei.com, yukuai3@huawei.com, yangerkun@huawei.com
Subject: Re: [PATCH] ext4: fix crash on test_mb_mark_used kunit tests
Date: Fri, 25 Jul 2025 23:09:19 -0400	[thread overview]
Message-ID: <20250726030919.GA273706@mit.edu> (raw)
In-Reply-To: <2f53f9a8-380a-4fe4-8407-03d5b4e78140@huaweicloud.com>

On Sat, Jul 26, 2025 at 09:42:37AM +0800, Zhang Yi wrote:
> > In the future, we should try to make sure that when we modify data
> > structures to add or remove struct elements, that we also make sure
> > that kunit test should also be updated.
> 
> Yes, currently in the Kunit tests, the initialization and maintenance
> of data structures are too fragmented and fragile, making it easy to
> overlook during modifications. In the future, I think we should provide
> some general interfaces to handle the initialization and
> deinitialization of those data structures.

Yes. I was thinking similar thoughts; perhap some of the structure
initialization should be refactored and put in mballoc.c instead of
mballoc-test.c.  Even if we have to have some #ifdef
CONFIG_EXT4_KUNIT_TESTS so that some of the test mocks are in same
place that the structure manipulation functions in a single file.

      	       		 	      		- Ted
						

  reply	other threads:[~2025-07-26  3:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-25  2:16 [PATCH] ext4: fix crash on test_mb_mark_used kunit tests Zhang Yi
2025-07-25 11:06 ` Jan Kara
2025-07-25 13:15   ` Theodore Ts'o
2025-07-26  1:42     ` Zhang Yi
2025-07-26  3:09       ` Theodore Ts'o [this message]
2025-07-26  1:47     ` Baokun Li

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=20250726030919.GA273706@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=jack@suse.cz \
    --cc=libaokun1@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ojaswin@linux.ibm.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yi.zhang@huaweicloud.com \
    --cc=yukuai3@huawei.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;
as well as URLs for NNTP newsgroup(s).