1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 21:55:36 +03:00
systemd/test/test-execute/exec-ioschedulingclass-none.service
Lennart Poettering d9b8771108 test: make test-execute pass on Linux 5.15
Linux 5.15 broke kernel API:

e70344c059

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)
2021-11-24 16:15:14 +01:00

10 lines
316 B
Desktop File

# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=Test for IOSchedulingClass=none
[Service]
# Old kernels might report "none" here, new kernels "best-effort".
ExecStart=/bin/sh -x -c 'c=$$(LC_ALL=C ionice); test "$${c%%:*}" = "none" -o "$${c%%:*}" = "best-effort"'
Type=oneshot
IOSchedulingClass=none