[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v17 14/23] tests: Use null-co:// instead of /dev/nul
From: |
Fam Zheng |
Subject: |
[Qemu-block] [PATCH v17 14/23] tests: Use null-co:// instead of /dev/null as the dummy image |
Date: |
Wed, 3 May 2017 00:35:49 +0800 |
Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
tests/drive_del-test.c | 2 +-
tests/nvme-test.c | 2 +-
tests/usb-hcd-uhci-test.c | 2 +-
tests/usb-hcd-xhci-test.c | 2 +-
tests/virtio-blk-test.c | 2 +-
tests/virtio-scsi-test.c | 5 +++--
6 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/tests/drive_del-test.c b/tests/drive_del-test.c
index 121b9c9..2175139 100644
--- a/tests/drive_del-test.c
+++ b/tests/drive_del-test.c
@@ -92,7 +92,7 @@ static void test_after_failed_device_add(void)
static void test_drive_del_device_del(void)
{
/* Start with a drive used by a device that unplugs instantaneously */
- qtest_start("-drive if=none,id=drive0,file=/dev/null,format=raw"
+ qtest_start("-drive if=none,id=drive0,file=null-co://,format=raw"
" -device virtio-scsi-pci"
" -device scsi-hd,drive=drive0,id=dev0");
diff --git a/tests/nvme-test.c b/tests/nvme-test.c
index c8bece4..7674a44 100644
--- a/tests/nvme-test.c
+++ b/tests/nvme-test.c
@@ -22,7 +22,7 @@ int main(int argc, char **argv)
g_test_init(&argc, &argv, NULL);
qtest_add_func("/nvme/nop", nop);
- qtest_start("-drive id=drv0,if=none,file=/dev/null,format=raw "
+ qtest_start("-drive id=drv0,if=none,file=null-co://,format=raw "
"-device nvme,drive=drv0,serial=foo");
ret = g_test_run();
diff --git a/tests/usb-hcd-uhci-test.c b/tests/usb-hcd-uhci-test.c
index f25bae5..5b500fe 100644
--- a/tests/usb-hcd-uhci-test.c
+++ b/tests/usb-hcd-uhci-test.c
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
const char *cmd = "-device piix3-usb-uhci,id=uhci,addr=1d.0"
- " -drive id=drive0,if=none,file=/dev/null,format=raw"
+ " -drive id=drive0,if=none,file=null-co://,format=raw"
" -device usb-tablet,bus=uhci.0,port=1";
int ret;
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
index 22513e9..031764d 100644
--- a/tests/usb-hcd-xhci-test.c
+++ b/tests/usb-hcd-xhci-test.c
@@ -89,7 +89,7 @@ int main(int argc, char **argv)
qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
qtest_start("-device nec-usb-xhci,id=xhci"
- " -drive id=drive0,if=none,file=/dev/null,format=raw");
+ " -drive id=drive0,if=none,file=null-co://,format=raw");
ret = g_test_run();
qtest_end();
diff --git a/tests/virtio-blk-test.c b/tests/virtio-blk-test.c
index 1eee95d..fd2078c 100644
--- a/tests/virtio-blk-test.c
+++ b/tests/virtio-blk-test.c
@@ -63,7 +63,7 @@ static QOSState *pci_test_start(void)
const char *arch = qtest_get_arch();
char *tmp_path;
const char *cmd = "-drive if=none,id=drive0,file=%s,format=raw "
- "-drive if=none,id=drive1,file=/dev/null,format=raw "
+ "-drive if=none,id=drive1,file=null-co://,format=raw "
"-device virtio-blk-pci,id=drv0,drive=drive0,"
"addr=%x.%x";
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c
index 0eabd56..8b0f77a 100644
--- a/tests/virtio-scsi-test.c
+++ b/tests/virtio-scsi-test.c
@@ -35,7 +35,7 @@ typedef struct {
static QOSState *qvirtio_scsi_start(const char *extra_opts)
{
const char *arch = qtest_get_arch();
- const char *cmd = "-drive id=drv0,if=none,file=/dev/null,format=raw "
+ const char *cmd = "-drive id=drv0,if=none,file=null-co://,format=raw "
"-device virtio-scsi-pci,id=vs0 "
"-device scsi-hd,bus=vs0.0,drive=drv0 %s";
@@ -195,7 +195,8 @@ static void hotplug(void)
QDict *response;
QOSState *qs;
- qs = qvirtio_scsi_start("-drive
id=drv1,if=none,file=/dev/null,format=raw");
+ qs = qvirtio_scsi_start(
+ "-drive id=drv1,if=none,file=null-co://,format=raw");
response = qmp("{\"execute\": \"device_add\","
" \"arguments\": {"
" \"driver\": \"scsi-hd\","
--
2.9.3
- [Qemu-block] [PATCH v17 04/23] qemu-img: Add --force-share option to subcommands, (continued)
- [Qemu-block] [PATCH v17 04/23] qemu-img: Add --force-share option to subcommands, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 05/23] qemu-img: Update documentation for -U, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 06/23] qemu-io: Add --force-share option, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 08/23] iotests: 046: Prepare for image locking, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 07/23] iotests: 030: Prepare for image locking, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 09/23] iotests: 055: Don't attach the target image already for drive-backup, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 11/23] iotests: 087: Don't attach test image twice, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 10/23] iotests: 085: Avoid image locking conflict, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 12/23] iotests: 091: Quit QEMU before checking image, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 13/23] iotests: 172: Use separate images for multiple devices, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 14/23] tests: Use null-co:// instead of /dev/null as the dummy image,
Fam Zheng <=
- [Qemu-block] [PATCH v17 15/23] file-posix: Add 'locking' option, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 16/23] file-win32: Error out if locking=on, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 17/23] tests: Disable image lock in test-replication, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 18/23] block: Reuse bs as backing hd for drive-backup sync=none, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 19/23] osdep: Add qemu_lock_fd and qemu_unlock_fd, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 20/23] osdep: Fall back to posix lock when OFD lock is unavailable, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 21/23] file-posix: Add image locking to perm operations, Fam Zheng, 2017/05/02
- [Qemu-block] [PATCH v17 23/23] tests: Add POSIX image locking test case 182, Fam Zheng, 2017/05/02