[PATCH 3/7] Update ioctl_tee test for linux v6.18 ioctl entries

Eugene Syromyatnikov evgsyr at gmail.com
Thu Jan 29 15:01:13 UTC 2026


On Thu, Jan 29, 2026 at 2:22 PM Gleb Fotengauer-Malinovskiy
<glebfm at altlinux.org> wrote:
>
> * tests/ioctl_tee.c (main): Print TEE_IOC_SHM_REGISTER_FD instead of
> raw _IOC value in expected output.
> ---
>  tests/ioctl_tee.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/ioctl_tee.c b/tests/ioctl_tee.c
> index d8138e767..13b22c74f 100644
> --- a/tests/ioctl_tee.c
> +++ b/tests/ioctl_tee.c
> @@ -169,7 +169,7 @@ main(void)
>
>         /* Valid parameterless calls */
>         ioctl(-1, TEE_IOC_SHM_REGISTER_FD, NULL);
> -       printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0xa4, 0x8, 0x18), NULL)"
> +       printf("ioctl(-1, TEE_IOC_SHM_REGISTER_FD, NULL)"
>                RVAL_EBADF);
>         ioctl(-1, _IOC(_IOC_NONE, 0xa4, 0xa, 0), NULL);
>         printf("ioctl(-1, _IOC(_IOC_NONE, 0xa4, 0xa, 0), 0)" RVAL_EBADF);
> @@ -205,7 +205,7 @@ main(void)
>                 shm_register_fd.fd = fd;
>                 shm_register_fd.flags = TEE_IOCTL_SHM_DMA_BUF;
>                 ioctl(-1, TEE_IOC_SHM_REGISTER_FD, &shm_register_fd);
> -               printf("ioctl(-1, _IOC(_IOC_READ|_IOC_WRITE, 0xa4, 0x8, 0x18), "
> +               printf("ioctl(-1, TEE_IOC_SHM_REGISTER_FD, "
>                        "{fd=%d, flags=TEE_IOCTL_SHM_DMA_BUF})" RVAL_EBADF, fd);
>         }

I think the idea of the check here is to serve as a guard, so it
starts failing when a new ioctl command is added, so, the correct way
to address this is to add a check for TEE_IOC_SHM_REGISTER_FD and bump
the command number in "Update ioctl entries from linux v6.18 and fix
affected tests".

> --
> glebfm
>
> --
> Strace-devel mailing list
> Strace-devel at lists.strace.io
> https://lists.strace.io/mailman/listinfo/strace-devel

--
Eugene Syromyatnikov
mailto:evgsyr at gmail.com
xmpp:esyr at jabber.{ru|org}


More information about the Strace-devel mailing list