test: make test-execute pass on Linux 5.15
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Nov 2021 14:58:50 +0000 (15:58 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Jan 2022 17:56:23 +0000 (18:56 +0100)
commit8be872769b475b9a664ca8b26fb1bb0e246eeb65
tree32a3a0481ff0a9a76b4f888b809693b233b074f7
parente05915315fdf21ee51ec1501e02d04ba1e9af045
test: make test-execute pass on Linux 5.15

Linux 5.15 broke kernel API:

https://github.com/torvalds/linux/commit/e70344c05995a190a56bbd1a23dc2218bcc8c924

Previously setting IOPRIO_CLASS_NONE for a process would then report
IOPRIO_CLASS_NONE back. But since 5.15 it reports IOPRIO_CLASS_BE
instead. Since IOPRIO_CLASS_NONE is an alias for a special setting of
IOPRIO_CLASS_BE this makes some sense, but it's also a kernel API
breakage that our testsuite trips up on.

(I made some minimal effort to inform the kernel people about this API
breakage during the 5.15 rc phase, but noone was interested.)

Either way let's hadle this gracefully in our test suite and accept
"best-effort" too when "none" was set.

(This is only triggable if the tests are run on 5.15 with full privs)

(cherry picked from commit d9b8771108cf2955efc3852b477391017d2c599a)
test/test-execute/exec-ioschedulingclass-none.service