Re: [LTP] [PATCH v3] mseal02: Handle multiple errnos for 32-bit compat mode

Petr Vorel
2026-03-26T10:43:57Z

Hi all,

> +++ b/testcases/kernel/syscalls/mseal/mseal02.c
> @@ -29,20 +29,22 @@ static struct tcase {
> size_t *len;
> unsigned long flags;
> int exp_err;
> + int compat_err;
> } tcases[] = {
> - {&start_addr, &page_size, ULONG_MAX, EINVAL},
> - {&unaligned_start_addr, &page_size, 0, EINVAL},
> - {&start_addr, &overflow_size, 0, EINVAL},
> - {&unallocated_start_addr, &twopages_size, 0, ENOMEM},
> - {&unallocated_end_addr, &twopages_size, 0, ENOMEM},
> - {&start_addr, &fourpages_size, 0, ENOMEM},
> + {.addr = &start_addr, .len = &page_size, .flags = ULONG_MAX, .exp_err = EINVAL},
> + {.addr = &unaligned_start_addr, .len = &page_size, .flags = 0, .exp_err = EINVAL},
> + {.addr = &start_addr, .len = &overflow_size, .flags = 0, .exp_err = EINVAL, .compat_err = ENOMEM},
> + {.addr = &unallocated_start_addr, .len = &twopages_size, .flags = 0, .exp_err = ENOMEM},
> + {.addr = &unallocated_end_addr, .len = &twopages_size, .flags = 0, .exp_err = ENOMEM},
> + {.addr = &start_addr, .len = &fourpages_size, .flags = 0, .exp_err = ENOMEM},

FYI I remove useless .flags = 0, in following commit.
55e16df13a ("mseal02: Remove useless zero initialization")
(The default zero initialization can shorten code in some cases.)

Kind regards,
Petr