From d34ff41d9706a52b31ffab2fba376e84a005c97c Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Fri, 26 Feb 2021 22:33:33 +0100 Subject: [PATCH] fix: use sparse loopback file instead of qcow2 - no nbd module in kata so can't use qemu-nbd --- .travis.yml | 1 - tests/drive.sh | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 152c917..e12dbba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,5 +7,4 @@ addons: - jq - kmod script: - - sudo apt -y install linux-modules-$(uname -r) - ./test.sh diff --git a/tests/drive.sh b/tests/drive.sh index 2675b9b..19aab95 100755 --- a/tests/drive.sh +++ b/tests/drive.sh @@ -4,12 +4,9 @@ function test_partitioning() { local img img=$(mktemp -u) - qemu-img create -f qcow2 "$img" 16G - sudo modprobe nbd - sudo qemu-nbd -c /dev/nbd0 "$img" - sudo setup_drive /dev/nbd0 - sudo parted -ms /deb/nbd0 -- print - sudo qemu-nbd -d /dev/nbd0 + dd if=/dev/zero of="$img" bs=1M seek=16384 count=0 + sudo setup_drive "$img" + sudo parted -ms "$img" -- print rm -f "$img" }