From 9a9e88a38d8fd3ba5dc9e3b0380d1f59ce9d49fb Mon Sep 17 00:00:00 2001 From: stevenhorsman Date: Fri, 28 Feb 2025 11:53:56 +0000 Subject: [PATCH] test: vfio: Attempt to fix logic This was checking that a literal string was non-zero. I'm assume it instead wanted to check if the file exists Signed-off-by: stevenhorsman --- tests/functional/vfio/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/vfio/run.sh b/tests/functional/vfio/run.sh index 93927b3505..a5dbe0bd12 100755 --- a/tests/functional/vfio/run.sh +++ b/tests/functional/vfio/run.sh @@ -316,7 +316,7 @@ main() { vfio_major="$(printf '%d' $(stat -c '0x%t' ${vfio_device}))" vfio_minor="$(printf '%d' $(stat -c '0x%T' ${vfio_device}))" - [ -n "/dev/vfio/vfio" ] || die "vfio control device not found" + [[ -f "/dev/vfio/vfio" ]] || die "vfio control device not found" vfio_ctl_major="$(printf '%d' $(stat -c '0x%t' /dev/vfio/vfio))" vfio_ctl_minor="$(printf '%d' $(stat -c '0x%T' /dev/vfio/vfio))"