All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 0/2] Improve ioprio tests
@ 2023-06-08  0:53 Damien Le Moal
  2023-06-08  0:53 ` [LTP] [PATCH v2 1/2] ioprio: use ioprio.h kernel header if it exists Damien Le Moal
  2023-06-08  0:53 ` [LTP] [PATCH v2 2/2] ioprio: Use IOPRIO_PRIO_NUM to check prio range Damien Le Moal
  0 siblings, 2 replies; 6+ messages in thread
From: Damien Le Moal @ 2023-06-08  0:53 UTC (permalink / raw)
  To: ltp, Linus Walleij; +Cc: Niklas Cassel

The ioprio syscall tests rely on ltp internal definitions of the
IOPRIO_XXX() macro defining priority classes and levels. With changes
to the ioprio API to support command duration limits, these internal
definitions are incomplete, causing test case ioprio_set03 to fail.

Avoid this issue by having the iprio tests use the kernel header file
definitions if that header exists. This enables additional checks in
the header file [1] which restores the expected results with test
ioprio_set03.

[1] https://lore.kernel.org/linux-block/20230530061307.525644-1-dlemoal@kernel.org/

Note: a review of this patch on the kernel block mailing list would be
very appreciated.

Changes from v1:
 - Added Linus's review tag
 - Resend with being subscribed to ltp list this time :)

Damien Le Moal (2):
  ioprio: use ioprio.h kernel header if it exists
  ioprio: Use IOPRIO_PRIO_NUM to check prio range

 configure.ac                                  |  1 +
 testcases/kernel/syscalls/ioprio/ioprio.h     | 33 ++++++++++++++-----
 .../kernel/syscalls/ioprio/ioprio_set03.c     |  2 +-
 3 files changed, 26 insertions(+), 10 deletions(-)

-- 
2.40.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-06-20 18:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08  0:53 [LTP] [PATCH v2 0/2] Improve ioprio tests Damien Le Moal
2023-06-08  0:53 ` [LTP] [PATCH v2 1/2] ioprio: use ioprio.h kernel header if it exists Damien Le Moal
2023-06-20 10:14   ` Petr Vorel
2023-06-20 13:01     ` Damien Le Moal
2023-06-20 18:52     ` Linus Walleij
2023-06-08  0:53 ` [LTP] [PATCH v2 2/2] ioprio: Use IOPRIO_PRIO_NUM to check prio range Damien Le Moal

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.