mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-24 02:03:54 +03:00
test-execute: add tests for IOSchedulingClass
This commit is contained in:
parent
c388dfea5a
commit
a622675862
@ -1570,6 +1570,10 @@ EXTRA_DIST += \
|
||||
test/exec-environmentfile.service \
|
||||
test/exec-oomscoreadjust-positive.service \
|
||||
test/exec-oomscoreadjust-negative.service \
|
||||
test/exec-ioschedulingclass-best-effort.service \
|
||||
test/exec-ioschedulingclass-idle.service \
|
||||
test/exec-ioschedulingclass-none.service \
|
||||
test/exec-ioschedulingclass-realtime.service \
|
||||
test/bus-policy/hello.conf \
|
||||
test/bus-policy/methods.conf \
|
||||
test/bus-policy/ownerships.conf \
|
||||
|
@ -216,6 +216,13 @@ static void test_exec_oomscoreadjust(Manager *m) {
|
||||
test(m, "exec-oomscoreadjust-negative.service", 0, CLD_EXITED);
|
||||
}
|
||||
|
||||
static void test_exec_ioschedulingclass(Manager *m) {
|
||||
test(m, "exec-ioschedulingclass-none.service", 0, CLD_EXITED);
|
||||
test(m, "exec-ioschedulingclass-idle.service", 0, CLD_EXITED);
|
||||
test(m, "exec-ioschedulingclass-realtime.service", 0, CLD_EXITED);
|
||||
test(m, "exec-ioschedulingclass-best-effort.service", 0, CLD_EXITED);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
test_function_t tests[] = {
|
||||
test_exec_workingdirectory,
|
||||
@ -234,6 +241,7 @@ int main(int argc, char *argv[]) {
|
||||
test_exec_runtimedirectory,
|
||||
test_exec_capabilityboundingset,
|
||||
test_exec_oomscoreadjust,
|
||||
test_exec_ioschedulingclass,
|
||||
NULL,
|
||||
};
|
||||
test_function_t *test = NULL;
|
||||
|
7
test/exec-ioschedulingclass-best-effort.service
Normal file
7
test/exec-ioschedulingclass-best-effort.service
Normal file
@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test for IOSchedulingClass=best-effort
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c 'c=$(ionice); echo $c; [[ "$c" == best-effort* ]]'
|
||||
Type=oneshot
|
||||
IOSchedulingClass=best-effort
|
7
test/exec-ioschedulingclass-idle.service
Normal file
7
test/exec-ioschedulingclass-idle.service
Normal file
@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test for IOSchedulingClass=idle
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c 'c=$(ionice); echo $c; [[ "$c" == idle* ]]'
|
||||
Type=oneshot
|
||||
IOSchedulingClass=idle
|
7
test/exec-ioschedulingclass-none.service
Normal file
7
test/exec-ioschedulingclass-none.service
Normal file
@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test for IOSchedulingClass=none
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c 'c=$(ionice); echo $c; [[ "$c" == none* ]]'
|
||||
Type=oneshot
|
||||
IOSchedulingClass=none
|
7
test/exec-ioschedulingclass-realtime.service
Normal file
7
test/exec-ioschedulingclass-realtime.service
Normal file
@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Test for IOSchedulingClass=realtime
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/bash -c 'c=$(ionice); echo $c; [[ "$c" == realtime* ]]'
|
||||
Type=oneshot
|
||||
IOSchedulingClass=realtime
|
Loading…
x
Reference in New Issue
Block a user