Linux IOMMU Development
 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 V6 9/9] iommufd: map file selftest
Date: Thu, 24 Oct 2024 11:53:18 -0700	[thread overview]
Message-ID: <ZxqXnnANqpeFq7XA@Asurada-Nvidia> (raw)
In-Reply-To: <1729783554-56916-10-git-send-email-steven.sistare@oracle.com>

On Thu, Oct 24, 2024 at 08:25:54AM -0700, Steve Sistare wrote:
> +static void
> +test_basic_file(struct __test_metadata *_metadata,
> +               struct _test_data_iommufd_mock_domain *self,
> +               const struct _fixture_variant_iommufd_mock_domain *variant)
> +{
> +       size_t buf_size = self->mmap_buf_size;
> +       uint8_t *buf;
> +       __u64 iova;
> +       int mfd_tmp;
> +       int prot = PROT_READ | PROT_WRITE;
> +
> +       /* Simple one page map */
> +       test_ioctl_ioas_map_file(mfd, 0, PAGE_SIZE, &iova);
> +       check_mock_iova(mfd_buffer, iova, PAGE_SIZE);
> +
> +       buf = memfd_mmap(buf_size, prot, MAP_SHARED, &mfd_tmp);
> +       ASSERT_NE(MAP_FAILED, buf);
> +
> +       /* EFAULT half way through mapping */
> +       ASSERT_EQ(0, munmap(buf + buf_size / 2, buf_size / 2));
> +       test_err_ioctl_ioas_map_file(EFAULT, 0, buf_size, &iova);
> +
> +       /* EFAULT on first page */
> +       ASSERT_EQ(0, munmap(buf, buf_size / 2));
> +       test_err_ioctl_ioas_map_file(EFAULT, 0, buf_size, &iova);

I am seeing build errors:

  CC       iommufd
iommufd.c: In function ‘test_basic_file’:
iommufd.c:1529:64: error: macro "test_err_ioctl_ioas_map_file" requires 5 arguments, but only 4 given
 1529 |         test_err_ioctl_ioas_map_file(EFAULT, 0, buf_size, &iova);
      |                                                                ^
In file included from iommufd.c:11:
iommufd_utils.h:636: note: macro "test_err_ioctl_ioas_map_file" defined here
  636 | #define test_err_ioctl_ioas_map_file(_errno, mfd, start, length, iova_p)     \
      |
iommufd.c:1529:9: error: ‘test_err_ioctl_ioas_map_file’ undeclared (first use in this function); did you mean ‘_test_ioctl_ioas_map_file’?
 1529 |         test_err_ioctl_ioas_map_file(EFAULT, 0, buf_size, &iova);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         _test_ioctl_ioas_map_file
iommufd.c:1529:9: note: each undeclared identifier is reported only once for each function it appears in
iommufd.c:1533:64: error: macro "test_err_ioctl_ioas_map_file" requires 5 arguments, but only 4 given
 1533 |         test_err_ioctl_ioas_map_file(EFAULT, 0, buf_size, &iova);
      |                                                                ^
In file included from iommufd.c:11:
iommufd_utils.h:636: note: macro "test_err_ioctl_ioas_map_file" defined here
  636 | #define test_err_ioctl_ioas_map_file(_errno, mfd, start, length, iova_p)     \
      |

Can you check?

Thanks
Nicolin

  parent reply	other threads:[~2024-10-24 18:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 15:25 [PATCH V6 0/9] iommu_ioas_map_file Steve Sistare
2024-10-24 15:25 ` [PATCH V6 1/9] mm/gup: folio_add_pins Steve Sistare
2024-10-24 15:25 ` [PATCH V6 2/9] iommufd: rename uptr in iopt_alloc_iova Steve Sistare
2024-10-24 15:25 ` [PATCH V6 3/9] iommufd: generalize iopt_pages address Steve Sistare
2024-10-24 15:25 ` [PATCH V6 4/9] iommufd: pfn reader local variables Steve Sistare
2024-10-24 15:25 ` [PATCH V6 5/9] iommufd: folio subroutines Steve Sistare
2024-10-24 15:25 ` [PATCH V6 6/9] iommufd: pfn reader for file mappings Steve Sistare
2024-10-24 15:25 ` [PATCH V6 7/9] iommufd: IOMMU_IOAS_MAP_FILE Steve Sistare
2024-10-25  8:20   ` Tian, Kevin
2024-10-24 15:25 ` [PATCH V6 8/9] iommufd: file mappings for mdev Steve Sistare
2024-10-25  8:21   ` Tian, Kevin
2024-10-24 15:25 ` [PATCH V6 9/9] iommufd: map file selftest Steve Sistare
2024-10-24 15:28   ` Steven Sistare
2024-10-24 18:53   ` Nicolin Chen [this message]
2024-10-24 19:14     ` Steven Sistare
2024-10-24 19:23       ` Nicolin Chen
2024-10-24 22:34       ` Jason Gunthorpe

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=ZxqXnnANqpeFq7XA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox