From 3725559ae10d10caa34583a447e76e3dcdf56d1b Mon Sep 17 00:00:00 2001 From: Albrecht Lohofener Date: Sun, 12 Jan 2025 15:27:51 +0100 Subject: [PATCH] Add sleep when PCI pass-through fails. This is necessary to catch logs during automated tests. --- src/run_openwrt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/run_openwrt.sh b/src/run_openwrt.sh index efc8d1b..7ce3ed6 100755 --- a/src/run_openwrt.sh +++ b/src/run_openwrt.sh @@ -164,6 +164,7 @@ attach_pci_device () { echo "vfio-pci" > "$PCI_PATH/driver_override" if ! echo "$PCI_DEVICE" > /sys/bus/pci/drivers/vfio-pci/bind 2>/dev/null; then error "Failed to bind PCI device $PCI_DEVICE to vfio-pci. Please double check if your system supports IOMMU and if CPU virtualization features (e.g. Intel VT-d) is enabled in your bios." + sleep 10 # Wait 10 seconds before the container stops. This is important for the automated tests to access the logs before they will be deleted exit 1 fi