Skip to content

Commit

Permalink
ci: Correctly test for existence of /dev/kvm
Browse files Browse the repository at this point in the history
/dev/kvm is not a regular file -- it's a character device.

Fixes: 82e3978 ("ci: Set kvm perms")
  • Loading branch information
danobi committed Dec 5, 2023
1 parent cffd94a commit 5b49862
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ jobs:
- name: Enable KVM group perms
run: |
# Only configure kvm perms if kvm is available
[[ -f /dev/kvm ]] || exit 0
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
if [[ -e /dev/kvm ]]; then
echo "Updating KVM permissions"
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
fi
- name: Run integration tests
run: make test
Expand Down

0 comments on commit 5b49862

Please sign in to comment.