]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ahci-test: Create smaller test ISO images
authorJohn Snow <jsnow@redhat.com>
Mon, 14 Nov 2016 16:15:54 +0000 (11:15 -0500)
committerJohn Snow <jsnow@redhat.com>
Mon, 14 Nov 2016 16:15:54 +0000 (11:15 -0500)
These can simply be the size of the number of sectors we're reading,
plus one for a buffer. We don't need them to be any larger.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1477970211-25754-3-git-send-email-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
tests/ahci-test.c

index 70bcafa9e4c09f62eb7eb1058c30217cd0ff85d9..a271cad7abbc0b4b4144eb697309772cdb95a849 100644 (file)
@@ -1494,9 +1494,10 @@ static void ahci_test_cdrom(int nsectors, bool dma)
         .atapi_dma = dma,
         .post_cb = ahci_cb_cmp_buff,
     };
+    uint64_t iso_size = ATAPI_SECTOR_SIZE * (nsectors + 1);
 
     /* Prepare ISO and fill 'tx' buffer */
-    fd = prepare_iso(1024 * 1024, &tx, &iso);
+    fd = prepare_iso(iso_size, &tx, &iso);
     opts.opaque = tx;
 
     /* Standard startup wonkery, but use ide-cd and our special iso file */