All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: Steve Sistare <steven.sistare@oracle.com>
Cc: <iommu@lists.linux.dev>, Jason Gunthorpe <jgg@nvidia.com>,
	Kevin Tian <kevin.tian@intel.com>
Subject: Re: [PATCH V5 9/9] iommufd: map file selftest
Date: Wed, 23 Oct 2024 13:15:40 -0700	[thread overview]
Message-ID: <ZxlZbBP3XE6alSPe@Asurada-Nvidia> (raw)
In-Reply-To: <1729630838-24586-10-git-send-email-steven.sistare@oracle.com>

On Tue, Oct 22, 2024 at 02:00:38PM -0700, Steve Sistare wrote:

> Add test cases to exercise IOMMU_IOAS_MAP_FILE.
> 
> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>

LGTM overall.

Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>

With some nits:

> ---
>  tools/testing/selftests/iommu/iommufd.c          | 136 ++++++++++++++++++++---
>  tools/testing/selftests/iommu/iommufd_fail_nth.c |  39 +++++++
>  tools/testing/selftests/iommu/iommufd_utils.h    |  57 ++++++++++
>  3 files changed, 217 insertions(+), 15 deletions(-)
> 
> diff --git a/tools/testing/selftests/iommu/iommufd.c b/tools/testing/selftests/iommu/iommufd.c
> index 4927b9a..3d62951 100644
> --- a/tools/testing/selftests/iommu/iommufd.c
> +++ b/tools/testing/selftests/iommu/iommufd.c
> @@ -3,6 +3,7 @@
>  #include <stdlib.h>
>  #include <sys/mman.h>
>  #include <sys/eventfd.h>
> +#include <asm/unistd.h>

Can we add it to the top of the list for an alphabetical order?

>  TEST_F(iommufd_mock_domain, ro_unshare)
>  {
>         uint8_t *buf;
>         __u64 iova;
>         int fd;
> 
> +       if (variant->file)
> +               SKIP(return, "redundant test");

Why is it redundant? A line of comments maybe?

> +/* iopt_area_fill_domains() and iopt_area_fill_domain() */
> +TEST_FAIL_NTH(basic_fail_nth, map_file_domain)
> +{
[...]
> +       if (_test_ioctl_ioas_map_file(self->fd, ioas_id, mfd, 0, 262144, &iova,
> +                                IOMMU_IOAS_MAP_WRITEABLE |
> +                                        IOMMU_IOAS_MAP_READABLE))
[...]
> +#define test_ioctl_ioas_map_id_file(ioas_id, mfd, start, length, iova_p)     \
> +       ASSERT_EQ(0, _test_ioctl_ioas_map_file(self->fd, ioas_id, mfd,       \
> +                                         start, length, iova_p,             \
> +                                         IOMMU_IOAS_MAP_WRITEABLE |         \
> +                                                 IOMMU_IOAS_MAP_READABLE))
> +

The indentations are a bit odd here. Would you please do git-
clang-format to fix them?

Thanks
Nicolin

  parent reply	other threads:[~2024-10-23 20:16 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 21:00 [PATCH V5 0/9] iommu_ioas_map_file Steve Sistare
2024-10-22 21:00 ` [PATCH V5 1/9] mm/gup: folio_add_pins Steve Sistare
2024-10-22 21:00 ` [PATCH V5 2/9] iommufd: rename uptr in iopt_alloc_iova Steve Sistare
2024-10-23  7:05   ` Tian, Kevin
2024-10-22 21:00 ` [PATCH V5 3/9] iommufd: generalize iopt_pages address Steve Sistare
2024-10-23  7:08   ` Tian, Kevin
2024-10-23 13:33     ` Steven Sistare
2024-10-22 21:00 ` [PATCH V5 4/9] iommufd: pfn reader local variables Steve Sistare
2024-10-23  7:09   ` Tian, Kevin
2024-10-22 21:00 ` [PATCH V5 5/9] iommufd: folio subroutines Steve Sistare
2024-10-23  7:16   ` Tian, Kevin
2024-10-23  7:21   ` Tian, Kevin
2024-10-23 13:03     ` Jason Gunthorpe
2024-10-24  6:14       ` Tian, Kevin
2024-10-23 13:04     ` Steven Sistare
2024-10-23 13:01   ` Jason Gunthorpe
2024-10-22 21:00 ` [PATCH V5 6/9] iommufd: pfn reader for file mappings Steve Sistare
2024-10-23  7:40   ` Tian, Kevin
2024-10-23 13:06     ` Steven Sistare
2024-10-24  6:17       ` Tian, Kevin
2024-10-23 13:15     ` Jason Gunthorpe
2024-10-23 13:24   ` Jason Gunthorpe
2024-10-22 21:00 ` [PATCH V5 7/9] iommufd: IOMMU_IOAS_MAP_FILE Steve Sistare
2024-10-23  7:45   ` Tian, Kevin
2024-10-23 13:22     ` Steven Sistare
2024-10-22 21:00 ` [PATCH V5 8/9] iommufd: file mappings for mdev Steve Sistare
2024-10-23  8:01   ` Tian, Kevin
2024-10-23 13:16     ` Jason Gunthorpe
2024-10-22 21:00 ` [PATCH V5 9/9] iommufd: map file selftest Steve Sistare
2024-10-23 13:52   ` Steven Sistare
2024-10-23 20:15   ` Nicolin Chen [this message]
2024-10-23 20:45     ` Steven Sistare
2024-10-24  0:36       ` Nicolin Chen

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=ZxlZbBP3XE6alSPe@Asurada-Nvidia \
    --to=nicolinc@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=steven.sistare@oracle.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 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.