From 262ef5631aa8af01161e34ce7d9ba645e9e1393e Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Wed, 3 Jun 2020 17:49:35 +0900 Subject: [PATCH] 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 --- tests/integration/update.bats | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integration/update.bats b/tests/integration/update.bats index c4fcaf1f3..82b835b28 100644 --- a/tests/integration/update.bats +++ b/tests/integration/update.bats @@ -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