From 4966d2e299a0d808d50b7e60880699023639ccb5 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Tue, 20 Jun 2023 12:21:08 +0200 Subject: [PATCH] tests: leave some space for metadata on the backend PVC In certain case, the targetcli backstores/fileio create command fails with: Could not expand file to 1073741824 bytes We can try to avoid this issue by creating a smaller backend image. We simply hardcoded 800M instead of 1G as in these tests the size of the disk doesn't matter. This is used to test the SCSI persistent reservation ioctls. Signed-off-by: Alice Frosi --- tests/storage/reservation.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/storage/reservation.go b/tests/storage/reservation.go index a098530609a8..d1a9c4deb0f8 100644 --- a/tests/storage/reservation.go +++ b/tests/storage/reservation.go @@ -94,10 +94,13 @@ var _ = SIGDescribe("[Serial]SCSI persistent reservation", Serial, func() { By(fmt.Sprintf("ldconfig: stdout: %v stderr: %v", stdout, stderr)) Expect(err).ToNot(HaveOccurred()) - // Create backend file + // Create backend file. Let some room for metedata and create a + // slightly smaller backend image, we use 800M instead of 1G. In + // this case, the disk size doesn't matter as the disk is used + // mostly to test the SCSI persistent reservation ioctls. executeTargetCli(podName, []string{ "backstores/fileio", - "create", backendDisk, "/disks/disk.img", "1G"}) + "create", backendDisk, "/disks/disk.img", "800M"}) executeTargetCli(podName, []string{ "loopback/", "create", naa}) // Create LUN