History log of /systemd/test/test-execute/exec-ioschedulingclass-realtime.service
Revision Date Author Comments Expand
cdaf5070480c09a7650589fa02b4d59c0af00112 10-Nov-2015 Filipe Brandenburger <filbranden@google.com>

test-execute: Fix systemd escaping and shell issues In most cases, systemd requires escaping $ (for systemd variable substitution) and % (for specifiers) by doubling them. This was somewhat of an issue in tests like exec-environment*.service where systemd was doing the substitutions and we were not really checking that those were available in the actual environment of the command. Fix that. Expressions such as `exit $(test ...)` are incorrect. They only work because $(test ...) will produce no output, so the command will become a bare "exit" which will exit with the status of the latest executed command which turns out to be the test... The direct approach is simply calling "test" as the last command, for which the shell will propagate the exit status. One situation where this was breaking tests was on `exit $(test ...) && $(test ...) && $(test ...)` where the second and third tests were not really executing, since the first command is actually `exit` so && was doing nothing there. Fixed it by just using `test ... && test ... && test ...` as it was initially intended. Pass -x to all shell executions for them to produce useful debugging output to stderr. Consequently, removed most of the explicit `echo`s that are no longer needed. Mark all units as Type=oneshot explicitly. Also made sure all shell variables are properly quoted. v2: Added an explicit LC_ALL=C to ionice invocations since some locales (such as French) will add a space before the colon in the output. Tested by running `sudo ./test-execute` and confirming all tests enabled on my system (essentially all of them except for the s390 one) passed. Tweaked the variables or options or expected values and confirmed the tests do indeed fail when the values are not exactly the expected ones. v2: Also tested with `LANG=fr_FR.UTF-8 sudo ./test-execute` to confirm it still works in a different locale.

exec-capabilityboundingset-invert.service exec-capabilityboundingset-merge.service exec-capabilityboundingset-reset.service exec-capabilityboundingset-simple.service exec-environment-empty.service exec-environment-multiple.service exec-environment.service exec-environmentfile.service exec-group.service exec-ignoresigpipe-no.service exec-ignoresigpipe-yes.service exec-ioschedulingclass-best-effort.service exec-ioschedulingclass-idle.service exec-ioschedulingclass-none.service exec-ioschedulingclass-realtime.service exec-oomscoreadjust-negative.service exec-oomscoreadjust-positive.service exec-personality-s390.service exec-personality-x86-64.service exec-personality-x86.service exec-privatedevices-no.service exec-privatedevices-yes.service exec-privatenetwork-yes.service exec-privatetmp-no.service exec-privatetmp-yes.service exec-runtimedirectory-mode.service exec-runtimedirectory-owner.service exec-runtimedirectory.service exec-systemcallerrornumber.service exec-systemcallfilter-failing.service exec-systemcallfilter-failing2.service exec-systemcallfilter-not-failing.service exec-systemcallfilter-not-failing2.service exec-umask-0177.service exec-umask-default.service exec-user.service exec-workingdirectory.service
ac40081621ec299a55246519726a18dd2b08678c 31-Oct-2015 Ronny Chevalier <chevalier.ronny@gmail.com>

test-execute: move all files related to a specific directory To avoid polluting test/

/systemd/Makefile.am /systemd/src/test/test-execute.c exec-capabilityboundingset-invert.service exec-capabilityboundingset-merge.service exec-capabilityboundingset-reset.service exec-capabilityboundingset-simple.service exec-environment-empty.service exec-environment-multiple.service exec-environment.service exec-environmentfile.service exec-group.service exec-ignoresigpipe-no.service exec-ignoresigpipe-yes.service exec-ioschedulingclass-best-effort.service exec-ioschedulingclass-idle.service exec-ioschedulingclass-none.service exec-ioschedulingclass-realtime.service exec-oomscoreadjust-negative.service exec-oomscoreadjust-positive.service exec-personality-s390.service exec-personality-x86-64.service exec-personality-x86.service exec-privatedevices-no.service exec-privatedevices-yes.service exec-privatenetwork-yes.service exec-privatetmp-no.service exec-privatetmp-yes.service exec-runtimedirectory-mode.service exec-runtimedirectory-owner.service exec-runtimedirectory.service exec-systemcallerrornumber.service exec-systemcallfilter-failing.service exec-systemcallfilter-failing2.service exec-systemcallfilter-not-failing.service exec-systemcallfilter-not-failing2.service exec-umask-0177.service exec-umask-default.service exec-user.service exec-workingdirectory.service