update.bats: support systemd <= 226

The infinity value was changed in systemd 227.

systemd >= 227: "infinity"
systemd <= 226: 18446744073709551615

e.g. https://github.com/systemd/systemd/commit/03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8f#diff-423c8c1eeb2ef5b08849c3c30b7e53aeR558

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2020-06-03 17:49:35 +09:00
parent 1f366c6a01
commit 262ef5631a
+4
View File
@@ -67,6 +67,10 @@ function setup() {
;;
esac
SD_UNLIMITED="infinity"
SD_VERSION=$(systemctl --version | awk '{print $2; exit}')
if [ $SD_VERSION -lt 227 ]; then
SD_UNLIMITED="18446744073709551615"
fi
# check that initial values were properly set
check_cgroup_value "cpuset.cpus" 0