From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Chia-I Wu <olvaffe@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dan Williams <dan.j.williams@intel.com>,
AKASHI Takahiro <takahiro.akashi@linaro.org>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Baoquan He <bhe@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] resource: add a simple test for walk_iomem_res_desc()
Date: Thu, 6 Jun 2024 01:10:43 +0300 [thread overview]
Message-ID: <ZmDiYze9MEFxn50C@smile.fi.intel.com> (raw)
In-Reply-To: <20240605212840.3227774-1-olvaffe@gmail.com>
On Wed, Jun 05, 2024 at 02:28:26PM -0700, Chia-I Wu wrote:
> This mainly tests that find_next_iomem_res() does not miss resources.
...
> v2: update subject, use DEFINE_RES_NAMED and hardcoded offsets
> v3: really hardcode offsets, with 4KB intervals since 0x1000 is easier
> to read than 0x400
Right, but...
> v4: use RESOURCE_SIZE_MAX, split allocate_resource and KUNIT_ASSERT_EQ,
> and other cosmetic changes
...
> + ret = allocate_resource(&iomem_resource, &root, 0x100000,
> + 0, RESOURCE_SIZE_MAX, 0x100000, NULL, NULL);
Just double check that limits.h is included.
...
> + /* build the resource tree */
> + res[0] = DEFINE_RES_NAMED(root.start + 0x0000, 0x1000, "SYSRAM 1",
> + IORESOURCE_SYSTEM_RAM);
> + res[1] = DEFINE_RES_NAMED(root.start + 0x1000, 0x1000, "OTHER", 0);
> +
> + res[2] = DEFINE_RES_NAMED(root.start + 0x3000, 0x1000, "NESTED", 0);
> + res[3] = DEFINE_RES_NAMED(root.start + 0x3800, 0x0400, "SYSRAM 2",
> + IORESOURCE_SYSTEM_RAM);
...here is overlap with the previous resource.
And here is the gap to the next one, in case we make that overlapping gone.
> + res[4] = DEFINE_RES_NAMED(root.start + 0x4000, 0x1000, "SYSRAM 3",
> + IORESOURCE_SYSTEM_RAM);
It wasn't the case in previous data. Please, elaborate what's going on here?
...
And rather sending one version per 12h, take your time and think more about
test data. What are we testing? Are the testing data correct? Shouldn't we also
have negative test cases?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-06-05 22:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 21:28 [PATCH v4] resource: add a simple test for walk_iomem_res_desc() Chia-I Wu
2024-06-05 22:10 ` Andy Shevchenko [this message]
2024-06-05 22:52 ` Chia-I Wu
2024-06-05 23:36 ` Andy Shevchenko
2024-06-06 0:42 ` Chia-I Wu
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=ZmDiYze9MEFxn50C@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=alison.schofield@intel.com \
--cc=bhe@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olvaffe@gmail.com \
--cc=takahiro.akashi@linaro.org \
/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.