[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/20] virtio-scsi-test: Add test case for tail unali
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 05/20] virtio-scsi-test: Add test case for tail unaligned WRITE SAME |
Date: |
Wed, 12 Aug 2015 15:36:58 +0200 |
From: Fam Zheng <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
tests/virtio-scsi-test.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c
index 6e91ca9..66d8491 100644
--- a/tests/virtio-scsi-test.c
+++ b/tests/virtio-scsi-test.c
@@ -239,9 +239,12 @@ static void hotplug(void)
static void test_unaligned_write_same(void)
{
QVirtIOSCSI *vs;
- uint8_t buf[512] = { 0 };
- const uint8_t write_same_cdb[CDB_SIZE] = { 0x41, 0x00, 0x00, 0x00, 0x00,
+ uint8_t buf1[512] = { 0 };
+ uint8_t buf2[512] = { 1 };
+ const uint8_t write_same_cdb_1[CDB_SIZE] = { 0x41, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x02, 0x00 };
+ const uint8_t write_same_cdb_2[CDB_SIZE] = { 0x41, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x33, 0x00, 0x00 };
qvirtio_scsi_start("-drive file=blkdebug::null-co://,if=none,id=dr1"
",format=raw,file.align=4k "
@@ -249,7 +252,10 @@ static void test_unaligned_write_same(void)
vs = qvirtio_scsi_pci_init(PCI_SLOT);
g_assert_cmphex(0, ==,
- virtio_scsi_do_command(vs, write_same_cdb, NULL, 0, buf, 512, NULL));
+ virtio_scsi_do_command(vs, write_same_cdb_1, NULL, 0, buf1, 512,
NULL));
+
+ g_assert_cmphex(0, ==,
+ virtio_scsi_do_command(vs, write_same_cdb_2, NULL, 0, buf2, 512,
NULL));
qvirtio_scsi_pci_free(vs);
qvirtio_scsi_stop();
--
2.4.3
- [Qemu-devel] [PULL 00/20] SCSI, build, TCG, RCU, misc patches for 2015-08-12, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 03/20] tests: virtio-scsi: clear unit attention after reset, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 02/20] scsi-disk: fix cmd.mode field typo, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 01/20] virtio-scsi: use virtqueue_map_sg() when loading requests, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 04/20] scsi-disk: Fix assertion failure on WRITE SAME, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 05/20] virtio-scsi-test: Add test case for tail unaligned WRITE SAME,
Paolo Bonzini <=
- [Qemu-devel] [PULL 06/20] vhost/scsi: call vhost_dev_cleanup() at unrealize() time, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 08/20] cpu_defs: Simplify CPUTLB padding logic, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 09/20] configure: Default to enable module build, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 07/20] cpu-exec: Do not invalidate original TB in cpu_exec_nocache(), Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 10/20] exec: drop cpu_can_do_io, just read cpu->can_do_io, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 11/20] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu(), Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 12/20] exec: use macro ROUND_UP for alignment, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 14/20] qemu-nbd: remove unnecessary qemu_notify_event(), Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 15/20] configure: only add CONFIG_RDMA to config-host.h once, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 13/20] vhost-scsi: Clarify vhost_virtqueue_mask argument, Paolo Bonzini, 2015/08/12