Skip to content

Commit

Permalink
test-incus-cgroup: Fix SwapTotal check to match current LXCFS
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Oct 23, 2023
1 parent cb7db1a commit c5770fa
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 @@ -119,7 +119,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)" = "SwapTotal: 2097152 kB" ]
[ "$(incus exec c1 -- grep ^SwapTotal /proc/meminfo)" = "$(grep ^SwapTotal /proc/meminfo)" ]
else
[ "$(incus exec c1 -- grep ^SwapTotal /proc/meminfo)" = "SwapTotal: 0 kB" ]
fi
Expand Down

0 comments on commit c5770fa

Please sign in to comment.