[LTP] [PATCH] syscalls/sched_getattr02: use a fixed size for EINVAL test

Li Wang liwang@redhat.com
Sat Nov 2 04:18:02 CET 2024


Jan Stancek <jstancek@redhat.com> wrote:


> -       {&pid, &attr_copy, sizeof(struct sched_attr) - 1, 0, EINVAL},
> +       {&pid, &attr_copy, 47, 0, EINVAL},
>

"EINVAL size is invalid; that is, it is smaller than the initial version of
the sched_attr structure (48 bytes) or larger than the system page size."

Or we could add one more item for testing 'page_size + 1'.

Anyway, this workaround looks good.
Reviewed-by: Li Wang <liwang@redhat.com>


-- 
Regards,
Li Wang


More information about the ltp mailing list