Skip to content

Commit b8e665e

Browse files
committed
qtests: Specify image format explicitly
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1416497234-29880-5-git-send-email-kwolf@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
1 parent 90c9b16 commit b8e665e

12 files changed

+21
-18
lines changed

tests/ahci-test.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,8 @@ static void qtest_shutdown(void)
487487
*/
488488
static QPCIDevice *ahci_boot(void)
489489
{
490-
qtest_boot("-drive if=none,id=drive0,file=%s,cache=writeback,serial=%s"
490+
qtest_boot("-drive if=none,id=drive0,file=%s,cache=writeback,serial=%s,"
491+
"format=raw"
491492
" -M q35 "
492493
"-device ide-hd,drive=drive0 "
493494
"-global ide-hd.ver=%s",

tests/bios-tables-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ static void test_acpi_one(const char *params, test_data *data)
716716
int i;
717717

718718
args = g_strdup_printf("-net none -display none %s "
719-
"-drive id=hd0,if=none,file=%s "
719+
"-drive id=hd0,if=none,file=%s,format=raw "
720720
"-device ide-hd,drive=hd0 ",
721721
params ? params : "", disk);
722722

tests/drive_del-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static void test_after_failed_device_add(void)
103103
static void test_drive_del_device_del(void)
104104
{
105105
/* Start with a drive used by a device that unplugs instantaneously */
106-
qtest_start("-drive if=none,id=drive0,file=/dev/null"
106+
qtest_start("-drive if=none,id=drive0,file=/dev/null,format=raw"
107107
" -device virtio-scsi-pci"
108108
" -device scsi-hd,drive=drive0,id=dev0");
109109

tests/fdc-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static void test_media_insert(void)
291291
/* Insert media in drive. DSKCHK should not be reset until a step pulse
292292
* is sent. */
293293
qmp_discard_response("{'execute':'change', 'arguments':{"
294-
" 'device':'floppy0', 'target': %s }}",
294+
" 'device':'floppy0', 'target': %s, 'arg': 'raw' }}",
295295
test_image);
296296
qmp_discard_response(""); /* ignore event
297297
(FIXME open -> open transition?!) */

tests/hd-geo-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ static int setup_ide(int argc, char *argv[], int argv_sz,
208208
{
209209
char *s1, *s2, *s3;
210210

211-
s1 = g_strdup_printf("-drive id=drive%d,if=%s",
211+
s1 = g_strdup_printf("-drive id=drive%d,if=%s,format=raw",
212212
ide_idx, dev ? "none" : "ide");
213213
s2 = dev ? g_strdup("") : g_strdup_printf(",index=%d", ide_idx);
214214

tests/i440fx-test.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,9 @@ static void test_i440fx_firmware(FirmwareTestFixture *fixture,
342342
g_assert(fw_pathname != NULL);
343343

344344
/* Better hope the user didn't put metacharacters in TMPDIR and co. */
345-
cmdline = g_strdup_printf("-S %s %s",
346-
fixture->is_bios ? "-bios" : "-pflash",
345+
cmdline = g_strdup_printf("-S %s%s", fixture->is_bios
346+
? "-bios "
347+
: "-drive if=pflash,format=raw,file=",
347348
fw_pathname);
348349
g_test_message("qemu cmdline: %s", cmdline);
349350
qtest_start(cmdline);

tests/ide-test.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static void test_bmdma_no_busmaster(void)
385385
static void test_bmdma_setup(void)
386386
{
387387
ide_test_start(
388-
"-drive file=%s,if=ide,serial=%s,cache=writeback "
388+
"-drive file=%s,if=ide,serial=%s,cache=writeback,format=raw "
389389
"-global ide-hd.ver=%s",
390390
tmp_path, "testdisk", "version");
391391
}
@@ -414,7 +414,7 @@ static void test_identify(void)
414414
int ret;
415415

416416
ide_test_start(
417-
"-drive file=%s,if=ide,serial=%s,cache=writeback "
417+
"-drive file=%s,if=ide,serial=%s,cache=writeback,format=raw "
418418
"-global ide-hd.ver=%s",
419419
tmp_path, "testdisk", "version");
420420

@@ -458,7 +458,7 @@ static void test_flush(void)
458458
uint8_t data;
459459

460460
ide_test_start(
461-
"-drive file=blkdebug::%s,if=ide,cache=writeback",
461+
"-drive file=blkdebug::%s,if=ide,cache=writeback,format=raw",
462462
tmp_path);
463463

464464
/* Delay the completion of the flush request until we explicitly do it */
@@ -526,7 +526,8 @@ static void test_retry_flush(void)
526526

527527
ide_test_start(
528528
"-vnc none "
529-
"-drive file=blkdebug:%s:%s,if=ide,cache=writeback,rerror=stop,werror=stop",
529+
"-drive file=blkdebug:%s:%s,if=ide,cache=writeback,format=raw,"
530+
"rerror=stop,werror=stop",
530531
debug_path, tmp_path);
531532

532533
/* FLUSH CACHE command on device 0*/

tests/nvme-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int main(int argc, char **argv)
2424
g_test_init(&argc, &argv, NULL);
2525
qtest_add_func("/nvme/nop", nop);
2626

27-
qtest_start("-drive id=drv0,if=none,file=/dev/null "
27+
qtest_start("-drive id=drv0,if=none,file=/dev/null,format=raw "
2828
"-device nvme,drive=drv0,serial=foo");
2929
ret = g_test_run();
3030

tests/usb-hcd-uhci-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int main(int argc, char **argv)
8787
qtest_add_func("/uhci/pci/hotplug/usb-storage", test_usb_storage_hotplug);
8888

8989
qtest_start("-device piix3-usb-uhci,id=uhci,addr=1d.0"
90-
" -drive id=drive0,if=none,file=/dev/null"
90+
" -drive id=drive0,if=none,file=/dev/null,format=raw"
9191
" -device usb-tablet,bus=uhci.0,port=1");
9292
ret = g_test_run();
9393
qtest_end();

tests/usb-hcd-xhci-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
9191
qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
9292

9393
qtest_start("-device nec-usb-xhci,id=xhci"
94-
" -drive id=drive0,if=none,file=/dev/null");
94+
" -drive id=drive0,if=none,file=/dev/null,format=raw");
9595
ret = g_test_run();
9696
qtest_end();
9797

0 commit comments

Comments
 (0)