From: Jaehoon Chung <jh80.chung@samsung.com>
To: Loic Poulain <loic.poulain@linaro.org>,
sjg@chromium.org, peng.fan@nxp.com
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH v2 3/3] test: dm: mmc: Check block erasing boundaries
Date: Fri, 10 Mar 2023 11:32:06 +0900 [thread overview]
Message-ID: <c02a01b9-81de-c967-263f-7e7218943e23@samsung.com> (raw)
In-Reply-To: <20230126092419.534514-3-loic.poulain@linaro.org>
On 1/26/23 18:24, Loic Poulain wrote:
> Verify that erasing blocks does not impact adjacent ones.
> - Write four blocks [0 1 2 3]
> - Erase two blocks [ 1 2 ]
> - Verify [0 1 2 3 ]
>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Applied to u-boot-mmc/master.
Best Regards,
Jaehoon Chung
> ---
> v2: Add this change to the series
>
> test/dm/mmc.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/test/dm/mmc.c b/test/dm/mmc.c
> index f744452ff2..b1eb8bee2f 100644
> --- a/test/dm/mmc.c
> +++ b/test/dm/mmc.c
> @@ -30,7 +30,7 @@ static int dm_test_mmc_blk(struct unit_test_state *uts)
> struct udevice *dev;
> struct blk_desc *dev_desc;
> int i;
> - char write[1024], read[1024];
> + char write[4 * 512], read[4 * 512];
>
> ut_assertok(uclass_get_device(UCLASS_MMC, 0, &dev));
> ut_assertok(blk_get_device_by_str("mmc", "0", &dev_desc));
> @@ -39,14 +39,14 @@ static int dm_test_mmc_blk(struct unit_test_state *uts)
> ut_asserteq(512, dev_desc->blksz);
> for (i = 0; i < sizeof(write); i++)
> write[i] = i;
> - ut_asserteq(2, blk_dwrite(dev_desc, 0, 2, write));
> - ut_asserteq(2, blk_dread(dev_desc, 0, 2, read));
> + ut_asserteq(4, blk_dwrite(dev_desc, 0, 4, write));
> + ut_asserteq(4, blk_dread(dev_desc, 0, 4, read));
> ut_asserteq_mem(write, read, sizeof(write));
>
> - /* Now erase them */
> - memset(write, '\0', sizeof(write));
> - ut_asserteq(2, blk_derase(dev_desc, 0, 2));
> - ut_asserteq(2, blk_dread(dev_desc, 0, 2, read));
> + /* Now erase two of them [1 - 2] and verify all blocks */
> + memset(&write[512], '\0', 2 * 512);
> + ut_asserteq(2, blk_derase(dev_desc, 1, 2));
> + ut_asserteq(4, blk_dread(dev_desc, 0, 4, read));
> ut_asserteq_mem(write, read, sizeof(write));
>
> return 0;
next prev parent reply other threads:[~2023-03-10 2:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230126092431epcas1p49aa1d01605df7cfcf0d2f2a4e5e8600c@epcas1p4.samsung.com>
2023-01-26 9:24 ` [PATCH v2 1/3] mmc: Check support for TRIM operations Loic Poulain
2023-01-26 9:24 ` [PATCH v2 2/3] mmc: erase: Use TRIM erase when available Loic Poulain
2023-01-28 22:01 ` Simon Glass
2023-02-01 11:39 ` Loic Poulain
2023-02-06 5:05 ` Jaehoon Chung
2023-02-08 8:08 ` Loic Poulain
2023-02-08 9:03 ` Jaehoon Chung
[not found] ` <CGME20230310023122epcas1p2e19d3aa9274c88d14992bd878dc8d1ca@epcas1p2.samsung.com>
2023-03-10 2:31 ` Jaehoon Chung
2023-01-26 9:24 ` [PATCH v2 3/3] test: dm: mmc: Check block erasing boundaries Loic Poulain
2023-01-27 14:30 ` Simon Glass
2023-02-08 8:13 ` Loic Poulain
[not found] ` <CGME20230310023206epcas1p1df08c1dbe2cb70efdd91ef47d7e95c78@epcas1p1.samsung.com>
2023-03-10 2:32 ` Jaehoon Chung [this message]
2023-01-28 22:01 ` [PATCH v2 1/3] mmc: Check support for TRIM operations Simon Glass
2023-02-06 4:54 ` Jaehoon Chung
[not found] ` <CGME20230310023103epcas1p4e4763c672faff833c978f8e91252119c@epcas1p4.samsung.com>
2023-03-10 2:31 ` Jaehoon Chung
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=c02a01b9-81de-c967-263f-7e7218943e23@samsung.com \
--to=jh80.chung@samsung.com \
--cc=loic.poulain@linaro.org \
--cc=peng.fan@nxp.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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.