Skip to content

Commit

Permalink
test-incus-cgroup: Fix swap amount to match recent cgroup fix
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Apr 2, 2024
1 parent a7a0d8d commit e8c2b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/test-incus-cgroup
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ echo "==> Testing memory limits"
incus config set c1 limits.memory=2GiB
[ "$(incus exec c1 -- grep ^MemTotal /proc/meminfo)" = "MemTotal: 2097152 kB" ]
if [ -e "/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes" ] || [ -e "/sys/fs/cgroup/memory.swap.max" ]; then
[ "$(incus exec c1 -- grep ^SwapTotal /proc/meminfo)" = "$(grep ^SwapTotal /proc/meminfo)" ]
[ "$(incus exec c1 -- grep ^SwapTotal /proc/meminfo)" = "SwapTotal: 2097152 kB" ]
else
[ "$(incus exec c1 -- grep ^SwapTotal /proc/meminfo)" = "SwapTotal: 0 kB" ]
fi
Expand Down

0 comments on commit e8c2b5f

Please sign in to comment.