Skip to content

Commit

Permalink
Merge pull request #189 from mihalicyn/cpu-vm-test-fixup
Browse files Browse the repository at this point in the history
cpu-vm: relax cpu pinning check a bit
  • Loading branch information
tomponline authored Jun 11, 2024
2 parents 40df278 + 60ba732 commit f83e0e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/cpu-vm
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ if journalctl --quiet --no-hostname --no-pager --boot=0 --unit=snap.lxd.daemon.s
# pid 2898's current affinity list: 0-15
# pid 2899's current affinity list: 0-15
# 2894 and 2895 have affinity set, while others don't
PINNED_VCPU_NUM=$(taskset --cpu-list -a -p "${QEMU_PID}" | grep -cE ':\s+[0-9]+$')
[ "${PINNED_VCPU_NUM}" = "$(lxc config get v1 limits.cpu)" ]
PINNED_THREADS_NUM=$(taskset --cpu-list -a -p "${QEMU_PID}" | grep -cE ':\s+[0-9]+$')
[ "${PINNED_THREADS_NUM}" -ge "$(lxc config get v1 limits.cpu)" ]
else
# check that there is no pinning set
! taskset --cpu-list -a -p "${QEMU_PID}" | grep -E ':\s+[0-9]+$' || false
Expand Down

0 comments on commit f83e0e4

Please sign in to comment.