diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-12-06 02:44:20 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-12-06 02:44:20 +0100 |
commit | 4e79aeaa65f40bd6e56bd244e3b24aa35b8f279a (patch) | |
tree | 62c5986f916591b571e853e626bbc088c8bb1d99 /test/test-execute | |
parent | run: Allows the user to reset CPUAffinity= back to an empty list (diff) | |
download | systemd-4e79aeaa65f40bd6e56bd244e3b24aa35b8f279a.tar.xz systemd-4e79aeaa65f40bd6e56bd244e3b24aa35b8f279a.zip |
test-execute: add tests for CPUAffinity=
Diffstat (limited to 'test/test-execute')
-rw-r--r-- | test/test-execute/exec-cpuaffinity1.service | 6 | ||||
-rw-r--r-- | test/test-execute/exec-cpuaffinity2.service | 8 | ||||
-rw-r--r-- | test/test-execute/exec-cpuaffinity3.service | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/test/test-execute/exec-cpuaffinity1.service b/test/test-execute/exec-cpuaffinity1.service new file mode 100644 index 0000000000..84d550a385 --- /dev/null +++ b/test/test-execute/exec-cpuaffinity1.service @@ -0,0 +1,6 @@ +[Unit] +Description=Test for CPUAffinity (simple) + +[Service] +ExecStart=/bin/sh -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 1' +CPUAffinity=0 diff --git a/test/test-execute/exec-cpuaffinity2.service b/test/test-execute/exec-cpuaffinity2.service new file mode 100644 index 0000000000..0dda77f939 --- /dev/null +++ b/test/test-execute/exec-cpuaffinity2.service @@ -0,0 +1,8 @@ +[Unit] +Description=Test for CPUAffinity (reset) + +[Service] +ExecStart=/bin/sh -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 1' +CPUAffinity=0-1 3 +CPUAffinity= +CPUAffinity=0 diff --git a/test/test-execute/exec-cpuaffinity3.service b/test/test-execute/exec-cpuaffinity3.service new file mode 100644 index 0000000000..4a45d3b2d5 --- /dev/null +++ b/test/test-execute/exec-cpuaffinity3.service @@ -0,0 +1,7 @@ +[Unit] +Description=Test for CPUAffinity (merge) + +[Service] +ExecStart=/bin/sh -c 'test $$(cat /proc/self/status | grep Cpus_allowed: | rev | cut -c 1) = 7' +CPUAffinity=0,1 +CPUAffinity=1-2 |