From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1PZM-00043o-Vw for qemu-devel@nongnu.org; Mon, 31 Oct 2016 23:17:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1PZM-0002Fe-6V for qemu-devel@nongnu.org; Mon, 31 Oct 2016 23:17:00 -0400 From: John Snow Date: Mon, 31 Oct 2016 23:16:50 -0400 Message-Id: <1477970211-25754-3-git-send-email-jsnow@redhat.com> In-Reply-To: <1477970211-25754-1-git-send-email-jsnow@redhat.com> References: <1477970211-25754-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [PATCH v2 2/3] ahci-test: Create smaller test ISO images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, hpoussin@reactos.org, qemu-devel@nongnu.org, John Snow 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 --- tests/ahci-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 70bcafa..a271cad 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -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 */ -- 2.7.4